Repository navigation
feat(desktop): support searching project names in global search (#2033) - #2035
Merged
Merged
Conversation
PR quality triageChanged areas: area:desktop CLI core policy: No CLI-core policy block detected. Missing-test policy: No missing-test policy block detected. Coverage baseline policy: No coverage-baseline policy block detected. CLI core files:
Coverage policy files:
Required check plan:
Test coverage signals:
Risk notes:
Hard merge gates come from the deterministic GitHub Actions contract lanes above. |
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 #2033
Adds project name search to the desktop global search palette (
Cmd+K/Ctrl+K/ sidebar search trigger) and locates/expands the chosen project in the sidebar:projectSearch.ts): Indexes non-archived workspace projects and archive-only projects consistently withSidebar.groupByProject, matching case-insensitively across custom display names, original folder names, and normalized paths (/and\), ranked by exact > prefix > title substring > folder name > path match > recency, with highlight ranges for both title and path excerpts.GlobalSearchModal.tsx): Displays matching projects immediately in aProjectssection aboveChatswithout waiting for debounced full-text session search, preserves project results when chat search has zero hits or fails, supports unified keyboard navigation across both sections, and resolves custom project display names / Windows paths on session rows.Sidebar.tsx): Selecting a project closes the modal, expands a collapsed sidebar, exits archive/task views, restores a hidden project and merges preference persistence atomically in a single write, expands a collapsed project group, scrolls the project header button into view, and focuses + briefly highlights it.search.global.placeholderand addedprojectsTitle,chatsTitle,projectSessionCountOne,projectSessionCount, andprojectArchivedOnlyacross all 5 locale files (en,zh,zh-TW,jp,kr).Feature Quality Contract
desktopdesktop/src/components/search/projectSearch.test.ts(6 unit tests covering aggregation, archive-only projects, staleprojectSessionTotalsexclusion, ranking, highlights, Windows/CJK paths, and limits)desktop/src/components/search/GlobalSearchModal.test.tsx(26 component tests including 5 new tests for instant project matching, custom/original/archive-only matching, cross-section keyboard navigation, error resilience, and standalone fallback)desktop/src/components/layout/Sidebar.test.tsx(139 tests including 3 new end-to-end sidebar search-to-locate tests covering task-view exit + hidden-project restore atomic persistence, collapsed project/sidebar expansion, and header scroll/focus)bun run check:coverage: passed (5 passed, 0 failed)bun run check:agent-flow: passed (9 passed, 0 failed)bun run check:agent-e2e: passed (mock-llm 34 passed / 0 failed, replay 21 passed / 0 failed)Verification
bun run check:impact; if I claim PR-ready/full validation, I also ranbun run verify.Risk
allow-cli-core-change.allow-missing-tests.allow-coverage-baseline-change.