[feature] ⌘K jumps straight to a folder or a recording - #333
Merged
Merged
Conversation
Reaching a recording meant aiming: pick the right folder in the tree, scan the grid, click the card. Three deliberate acts for something you could already name. The library's search box only helps after you have picked the scope it searches, so it can't answer "where did I put that one". ⌘K opens a switcher over the whole tree at once — folders, the fixed nodes, orgs and their shared folders, and every local recording by title. ↑↓ moves, ↵ lands. Empty query lists the tree, so the palette never opens blank. Every row is a PLACE, never an action: ↵ on a highlighted row can only navigate. A palette that mixes destinations and verbs makes ↵ a gamble over a list your finger is already scrolling. The ranking is a pure module (lib/library/quickSwitch) rather than logic inside the component, so the ordering is pinned by tests instead of by clicking around. Counts come from the same buildOwnershipIndex/countByNode pass the sidebar uses, so a row means the same thing in both. Closes #332 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✅ SonarQube Quality Gate passed — pathorsAI_parley0 open issues on this PR. |
SonarQube typescript:S7778 on the quick switcher: `unassigned` and `voice` were pushed back to back. One call with both arguments, same order. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3 tasks
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.
What this changes
⌘K(Ctrl+Kon Windows) opens a quick switcher over the main window. One field, one flat ranked list, covering everything you can navigate to at once:Not filed yet/未分類,Voice typing,Home↑↓move,↵lands,esccloses; rows are clickable and highlight on hover. An empty query lists the tree rather than nothing, so the palette never opens blank. Each row carries a muted right-hand line saying where it lives — a recording shows its folder, an org folder shows its org — so two similarly named things are tellable apart without opening either.It never opens over a running meeting, for the same reason the shell hides the tree there.
Why
Reaching a recording meant aiming: pick the right folder in the tree, scan the grid, click the card. Three deliberate acts for something the user could already name in two keystrokes. The library's search box only helps after you have picked the scope it searches, so it can't answer "where did I put that one".
Closes #332. Related to #330 — the other half of the same complaint, that finding one specific meeting means remembering where you filed it.
Notes for review
↵on a highlighted row can only navigate — it can't rename, delete, share or start a meeting. A palette that mixes destinations and verbs makes↵a gamble over a list your finger is already scrolling through. Actions stay on the row and on the card.src/lib/library/quickSwitch.ts) rather than logic buried in the component, so the ordering is pinned by tests instead of by clicking around. Greedy subsequence scan with word-start / contiguity / prefix / exact bonuses — a folder list is tens of rows, not tens of thousands, and a scorer you can read in one sitting is worth more here than the last few percent of ranking quality. CJK subsequences work (和車finds和運租車).buildOwnershipIndex+countByNodefromlib/library/scope), so a row means the same thing in both places — the invariant [refactor] 方案 C:App Shell — 持久左側欄、History/Settings 收編成路由、公司即資料夾 #195 exists to protect.radix-uiDialogprimitive already used byui/sheet.tsx; noui/dialog.tsxwas added since nothing else needs one yet.useLibraryTreealready holds. Opening the palette warmsensureOrgFoldersfor the next open; it never blocks on a fetch, so what isn't cached simply isn't listed.How it was verified
bunx tsc --noEmitpassesbunx vitest runpasses — 29 files, 325 testsbun run tauri dev) and exercised the changesrc/lib/library/quickSwitch.test.tszh-TWandeninsrc/i18n/messages.ts🤖 Generated with Claude Code