Skip to content

fix(web): renumber project picker jump shortcuts to match filtered results - #8268

Closed
kacpergumieniuk wants to merge 2 commits into
pingdotgg:mainfrom
kacpergumieniuk:fix/new-thread-picker-shortcuts
Closed

kacpergumieniuk wants to merge 2 commits into
pingdotgg:mainfrom
kacpergumieniuk:fix/new-thread-picker-shortcuts

Conversation

@kacpergumieniuk

@kacpergumieniuk kacpergumieniuk commented Aug 26, 2026 •

Copy link
Copy Markdown

What Changed

In the "New Thread" project picker (and the "New thread in..." command palette submenu), the ⌘1–⌘9 jump shortcut hints were assigned from each project's position in the unfiltered list, at view-construction time. After typing in the search box, the visible rows kept their original numbers — the only remaining result could still show ⌘4 — and pressing ⌘1 did nothing if the item that owned thread.jump.1 had been filtered out. The filter's rank-based re-sorting caused the same mismatch even when no rows were dropped.

This PR moves the enumeration out of view construction and into filterCommandPaletteGroups, which runs on every query change: groups that opt in via a new enumerateShortcuts flag get thread.jump.N assigned after filtering and ranking.

  • apps/web/src/components/CommandPalette.logic.ts — CommandPaletteGroup.enumerateShortcuts flag; enumeration applied in filterCommandPaletteGroups (both the empty-query and filtered paths)
  • apps/web/src/components/CommandPalette.tsx — stop baking shortcuts into projectThreadItems; mark the two picker groups with enumerateShortcuts: true

Most of the CommandPalette.tsx diff is re-indentation from removing the enumerateCommandPaletteItems(...) wrapper — with whitespace ignored the change is 20(+) / 9(−) lines.

Why

Shortcut hints and their handlers should always follow visible positions. Enumerating after the filter runs makes that hold by construction: the keydown handler already resolves items from the displayed groups, so hints and handlers can no longer disagree with what is on screen. Other palette items with static shortcuts (chat.new, filePicker.toggle, …) are untouched.

UI Changes

Projects: Alpha ⌘1, Beta ⌘2, Gamma ⌘3, Delta ⌘4. Typing "delta" leaves a single visible row.

Before

The row still shows the stale ⌘4, and pressing ⌘1 does nothing (the item owning thread.jump.1 was filtered out):

before: filtered row still shows cmd-4

Video: before-bug.mp4

After

The filtered row renumbers to ⌘1, and pressing ⌘1 opens a new thread in Delta:

after: filtered row renumbered to cmd-1

Video: after-fix.mp4

Verification

  • vp run test in apps/web: full suite passes (2859 tests / 281 files)
  • vp run typecheck (apps/web), vp lint, vp fmt --check clean
  • Verified manually in an isolated dev environment (recordings above): the filtered picker renumbers to ⌘1 and ⌘1 executes the visible item; on main the same flow shows the stale hint and a dead ⌘1

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Made with Claude Fable 5 in Claude Code.

Note

Fix command palette jump shortcuts to match filtered project results

  • Moves shortcut enumeration from component build-time to filtering time via a new enumerateShortcuts group flag and withEnumeratedShortcuts helper, so jump keybindings (THREAD_JUMP_KEYBINDING_COMMANDS) are assigned after filtering and match the visible results
  • Broadens enumerateCommandPaletteItems to accept both CommandPaletteActionItem and CommandPaletteSubmenuItem arrays
  • OpenCommandPaletteDialog no longer pre-enumerates projectThreadItems; the Projects view and New-thread submenu groups now set enumerateShortcuts: true and pass raw items
  • Risk: groups that previously relied on pre-enumerated shortcuts from the component must now opt in via enumerateShortcuts: true in CommandPalette.logic.ts, otherwise their items will have no shortcuts

Macroscope summarized 3f589a5.

…sults

The new-thread project picker baked mod+1..9 shortcut hints into items
once, from their position in the full project list. Filtering (or the
rank-based reordering the filter applies) kept the stale numbers, so
the only visible project could still show mod+4 while pressing mod+1
did nothing.

Shortcuts are now assigned in filterCommandPaletteGroups, after
filtering and ranking, for groups marked enumerateShortcuts, so hints
and handlers always follow visible positions.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 92c2570d-ead9-4d1e-8cc4-60a39cbaaef6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 26, 2026
@StiensWout

Copy link
Copy Markdown
Contributor

cc @maria-rcks think this is good to go :)

@macroscopeapp

macroscopeapp Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 3f589a5

Macroscope's review found this PR approvable — This is a focused web bug fix that moves project-picker shortcut assignment to the existing post-filter path, affecting only shortcut labels and activation for visible project results. The change is localized, preserves unrelated command-palette behavior, and introduces no schema, deployment, security, billing, or authentication impact.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 26, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 26, 2026 09:17

Dismissing prior approval to re-evaluate 3f589a5

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 26, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Sep 30, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 30, 2026 23:20

Dismissing prior approval to re-evaluate 3f589a5

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Hi! We are cleaning up open PRs, and this one appears to have been created with an older model (fable 5). If this change is really important, we recommend rebuilding the PR with a newer model if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants