Repository navigation
feat: search bar for keys in nested filter groups - #3368
Conversation
🦋 Changeset detectedLatest commit: 770cfb1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
|
| > | ||
| <div className={classes.filterGroupPanel}> | ||
| {childFilters.length === 0 ? ( | ||
| {childFilters.length > FILTER_SEARCH_MIN_ITEMS && ( |
There was a problem hiding this comment.
🔵 minor — Key search keeps filtering after its input is hidden, which can leave the group stuck on "No properties found"
childFilters comes from facet results (useFetchFacets in DBSearchPageFilters/hooks.ts), so changing the date range or query can drop the key count to 5 or fewer. When that happens the input stops rendering, but matchingChildFilters still applies the old search. Example: type k8s, then narrow the time range so that 4 keys come back and none of them match. The header still says {4}, the body says "No properties found", and there is no input left to clear the search. Fix: only apply the filter while the input is shown (const query = childFilters.length > FILTER_SEARCH_MIN_ITEMS ? search.trim().toLowerCase() : ''), or reset search when the input goes away. Add a test that rerenders with fewer childFilters after typing a search.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
2 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 2 minor 1 posted as inline comment(s) on the changed lines. 1 listed below. Findings outside the changed lines1 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
E2E Test Results✅ All tests passed • 411 passed • 1 skipped • 1404s
Tests ran across 4 shards in parallel. |
| > | ||
| <div className={classes.filterGroupPanel}> | ||
| {childFilters.length === 0 ? ( | ||
| {childFilters.length > FILTER_SEARCH_MIN_ITEMS && ( |
There was a problem hiding this comment.
Hidden search keeps hiding keys
When a refresh leaves an existing group with five or fewer keys, this condition hides the search input but keeps its query active. NestedFilterGroup keeps the same React key, so nonmatching keys stay hidden with no way to clear the search—even after collapsing and reopening the group. Users can see “No properties found” despite valid keys being available.
Keep the input visible while search is nonempty, or stop applying the query when the input disappears.
| {childFilters.length > FILTER_SEARCH_MIN_ITEMS && ( | |
| {(childFilters.length > FILTER_SEARCH_MIN_ITEMS || search !== '') && ( |
Deep Review✅ No critical issues found. This is a clean, well-scoped refactor: the value-search 🔵 P3 nitpicks (4)
Reviewers (10): correctness, testing, maintainability, project-standards, kieran-typescript, julik-frontend-races, adversarial, previous-comments, agent-native, learnings-researcher. Testing gaps: The new No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
Summary
Adds a search bar for nested filter groups (maps) that allows filtering down the keys you'd like to look at.
Screenshots or video
export-1791925793514.mp4
How to test on Vercel preview
Preview routes:
Steps:
References