chore: refactor DBSearchPage into smaller files#2207
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
E2E Test Results✅ All tests passed • 163 passed • 3 skipped • 1230s
Tests ran across 4 shards in parallel. |
PR ReviewPure refactor of
No security or correctness bugs spotted; the new test coverage and the preserved direct-trace behavior tests are good safety nets. |
ad4bc22 to
492685e
Compare
492685e to
a486238
Compare
|
@claude review |
|
@claude review |
|
@claude review |
Deep Review🔴 P0/P1 -- must fix
🟡 P2 -- recommended
🔵 P3 nitpicks (10)
Reviewers (9): correctness (no findings), testing, maintainability, project-standards, adversarial, kieran-typescript, previous-comments, agent-native (no parity gaps), learnings-researcher (no prior solutions in Testing gaps:
|
| onTableError: (error: Error | ClickHouseQueryError) => void; | ||
| onSortingChange: (sortState: SortingState | null) => void; | ||
| onAcceptWhereSuggestion: (corrected: string) => void; | ||
| }; |
There was a problem hiding this comment.
This prop list is a little crazy.. we could ship this but I wonder if some of this could go into context to reduce the prop passing a bit. We would need to watch out for performance regressions if we are storing too much in context though
|
Did a test of all the search features and didn't notice any regressions, lots of AI Agent feedback above thats worth checking but IMO this is a worthwhile improvement! |
Summary
packages/app/src/DBSearchPage.tsxinto acomponents/DBSearchPage/directory of focused files, generated via the refactor-component skill.SearchTopBar,SearchResultsArea,SearchResultsView,SearchPatternView,SaveSearchModal,SavedSearchHeader,SearchErrorDisplay,SearchQueryRow,SearchSubmitButton,ResumeLiveTailButton,SourceModals,SearchNumRows,SearchResultsCountGroup), plus sharedhooks.tsxandutils.tsmodules.pages/search/index.tsx, pages/search/[savedSearchId].tsx) to consume the new barrel atcomponents/DBSearchPage.components/DBSearchPage/__tests__/, adding new unit tests forSearchErrorDisplay,SearchTopBar, andutils.Why
DBSearchPage.tsxhad grown well past the 300-line guideline inAGENTS.mdand was painful to navigate, review, and test. Breaking it apart by responsibility makes the search page easier to reason about and gives each piece its own seam for unit testing — without changing runtime behaviour.How to test locally or on Vercel