Repository navigation
Prevent Search from jumping to duplicate Recent results - #1111
Merged
pratikbuilds merged 3 commits intoOct 17, 2026
Merged
Conversation
pratikbuilds
marked this pull request as ready for review
October 7, 2026 14:13
Contributor
|
@pratikbuilds do we need to solve/change anyting in react-ui here as well? |
TheGreatAxios
requested changes
Oct 7, 2026
TheGreatAxios
left a comment
Contributor
There was a problem hiding this comment.
Review · Request changes
Deduplicates command-palette results by id so an item already displayed in an earlier group (e.g. Recent) is omitted from later groups.
Findings
apps/web/src/command-palette/command-groups.ts:71-73— the dedupe filter is correct across the empty-query Recents, scoped, and query-matching paths (verified with a temporary reproduction test, 4 pass / 0 fail: recents-first dedupe keeps the first occurrence and order; scoped"#"skips unscoped pages without dropping the surviving id; query path keeps the matching item). The gap is regression coverage: there is nocommand-palette/*.test.ts, and grep finds no test touchingbuildCommandPaletteGroups. This branch's entire behavior is the dedupe, and issue #1108's scroll-jump is subtle enough to regress unnoticed. Add a permanent unit test beside the module exercising the three paths before merge.apps/web/src/command-palette/command-groups.ts:70— the// ponytail:comment prefix reads as a personal handle leftover in a public repo; drop the prefix and keep only the rationale.- Commit
f85904210— subject "Prevent duplicate search results across groups" omits the repo'sCL-####ticket-id convention used throughout recent history; considerPrevent duplicate search results across groups (CL-1108).
Cited: temporary repro test (tmp/critique-tests/dedupe.test.ts, 4 pass/0 fail, since removed); git diff origin/main...HEAD = one file +4/−1; full apps/web bun test is inconclusive (13 pre-existing module-resolution failures, none touching command-palette — environment noise in the review worktree).
TheGreatAxios
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1108. Hovering Workflows under Pages could jump Search back to its duplicate in Recent. Skip results whose IDs already appear in a displayed group, keeping Recent first.
Evidence
After: Workflows appears once. Hovering the bottom result preserves scrollTop at 316px; mouse selection and ArrowUp/ArrowDown/Enter navigation work, with no browser console errors.
bun run build, typecheck, lint, and formatting pass. All 189 web unit tests pass.bun run checkfails on the same baseline issue reproduced before changes: five packages declare test scripts but contain no tests:@corbits/approvals,@corbits/deferred-tools,@corbits/url-path,@corbits/worker, and@corbits/workflows.DATABASE_URLwas unset.Merge Danger
Door: Two-way. Revert the grouping change and its regression tests.
Blast Radius: Search. Later groups omit results already displayed in an earlier group; query matching, scope eligibility, and selection IDs stay intact.