Skip to content

fix(web): project picker jump shortcuts follow the filtered rows - #31159

Closed
smirea wants to merge 1 commit into
pingdotgg:mainfrom
smirea:fix/palette-jump-shortcuts-follow-filter
Closed

smirea wants to merge 1 commit into
pingdotgg:mainfrom
smirea:fix/palette-jump-shortcuts-follow-filter

Conversation

@smirea

@smirea smirea commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Problem

In the desktop project picker (⌘N, or "New thread in..." in the command palette), the ⌘1–⌘9 jump shortcuts are numbered from the unfiltered list. After typing, the remaining rows keep their old numbers in the new ranked order (for example ⌘8, ⌘6, ⌘9). A project past the ninth row has no number even when it is the top match. A number whose row was filtered out does nothing. Fixes #31153.

Change

The picker no longer numbers its rows when it builds them. Its group is marked jumpShortcuts, and filterCommandPaletteGroups numbers the rows in that group after it filters and ranks them. Rows that have their own shortcut, such as "No project" (chat.newWithoutProject), keep that shortcut and are skipped. The palette's keydown handler already looks up the pressed jump shortcut in the displayed rows, so the visible numbers and the keys now match.

Without a query the numbers are the same as before. The rows still keep their opening order while the palette is open (useOrderWhileOpen), so pinning a row does not move a number to a different row.

The "New thread in X" suggestions in the root search copied the child rows' jump numbers. They no longer have them.

Scope and approval

This is a small, focused fix for an obvious bug: the shortcut hints and their keys did not match the rows on screen. It changes only how the picker assigns numbers. #8268 fixed the same bug in the same way and was closed during the cleanup of PRs written with older models, not on its merits.

Verification

  • Added a case to CommandPalette.logic.test.ts. It fails on main and passes with this change. With 13 projects and "No project" in the list, it checks that the unfiltered numbers stay the same, that row 13 has no number, and that typing s numbers sync-engine, stefan-utils, and scripts as ⌘1, ⌘2, ⌘3 in the order they are shown.
  • vp run check:changed: format, lint, knip, typecheck, and the tests beside the change all pass. The command palette browser tests pass too (10/10).
  • Manual check in vp run dev:desktop. Jump shortcuts are desktop only (isDesktop). The test data was a copy of real data made with migrate-dev-db (15 projects).

Before (main): with s typed, sync-engine (top match) has no number, server is ⌘1, stefan-utils is ⌘5, and scripts has no number. Pressing ⌘2 does nothing.

Before: filtered rows show no number, cmd-1, cmd-5, no number

After: the same query shows ⌘1–⌘4 from top to bottom.

After: filtered rows show cmd-1 to cmd-4 in order

Pressing ⌘3 then starts a new thread in stefan-utils, the third row:

After pressing cmd-3: new thread in stefan-utils

I did not check this on Windows or Linux. Mobile has no jump shortcuts.

Made with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T21:50:21.593891Z c5f8e0c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 4, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c5f8e0c

Macroscope's review found this PR approvable — Project-picker jump shortcuts now follow the filtered, displayed row order while preserving dedicated shortcuts. The change is limited to picker navigation and leaves the underlying actions unchanged.

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

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The command palette now assigns jump shortcuts to eligible project rows in their displayed order. Filtered results are renumbered, existing item shortcuts are preserved, and groups without jump shortcuts enabled remain unchanged.

Changes: Project jump shortcuts

Layer / File(s) Summary
Shortcut assignment and filtered results
apps/web/src/components/CommandPalette.logic.ts, apps/web/src/components/CommandPalette.logic.test.ts
CommandPaletteGroup gains the optional jumpShortcuts flag. A helper assigns available thread-jump commands to eligible items in display order. Empty-query and ranked search results use the helper. The test checks shortcut numbering after filtering.
Project picker group wiring
apps/web/src/components/CommandPalette.tsx
Project groups enable jump shortcuts when project rows are present. The palette removes its separate enumeration pass and uses the ordered project rows directly. The fallback group contains only the Add project action and does not enable jump shortcuts.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested labels: size:S

Suggested reviewers: juliusmarminge, maria-rcks, macroscopeapp

Merge Risk: Minimal · up to c5f8e

Project shortcuts follow filtered rows; no concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title names the main change: project picker jump shortcuts (⌘1–⌘9) are now numbered after filtering, so they follow the visible rows. It matches the changeset in CommandPalette.logic.ts, CommandPa…
Description check Passed The description follows the repository template. It has Problem, Change, Scope and approval, and Verification sections. The Problem section gives the bug, the expected behavior, and the reproduction s…
Linked Issues check Passed The direct coding requirement in #31153 is met. CommandPalette.logic.ts applies jump shortcuts after filtering and ranking for groups marked jumpShortcuts. It skips rows with an existing shortcut,…
Out of Scope Changes check Passed The changes stay within #31153. They update project-group metadata, move shortcut assignment into post-filter group processing, remove the obsolete pre-filter numbering pass, and add focused regressio…
Full details: Title check

Explanation

The title names the main change: project picker jump shortcuts (⌘1–⌘9) are now numbered after filtering, so they follow the visible rows. It matches the changeset in CommandPalette.logic.ts, CommandPalette.tsx, and the new test. It is a conventional commit title in plain language and is specific enough for a reviewer scanning history.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, Change, Scope and approval, and Verification sections. The Problem section gives the bug, the expected behavior, and the reproduction steps (typing a filter in the ⌘N project picker). The Change section explains why the fix is in the palette logic and the keydown handler. The Scope section gives the issue link (#31153) and a reason the change is small. The Verification section lists the focused test, the check command, the browser tests (10/10), and a manual check with before and after screenshots. It states what was not checked (Windows, Linux, mobile). The scope section relies on a closed PR (#8268) and does not link a maintainer approval comment for the direction, so that point is weaker than the rest. The template asks for a maintainer approval link or an explicit exemption, and the author gives an exemption argument rather than a link. This is a minor gap and does not make the description largely incomplete.

Full details: Linked Issues check

Explanation

The direct coding requirement in #31153 is met. CommandPalette.logic.ts applies jump shortcuts after filtering and ranking for groups marked jumpShortcuts. It skips rows with an existing shortcut, such as chat.newWithoutProject, and assigns the remaining shortcuts in displayed order. CommandPalette.tsx marks the project group and preserves the opening-order list. The added test covers unfiltered numbering, the ninth-row limit, the fixed shortcut, and filtered s results numbered thread.jump.1 through thread.jump.3.

Full details: Out of Scope Changes check

Explanation

The changes stay within #31153. They update project-group metadata, move shortcut assignment into post-filter group processing, remove the obsolete pre-filter numbering pass, and add focused regression coverage. The fallback group without project rows does not enable jump shortcuts. No unrelated product behavior is changed.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a21d788 and c5f8e0c.

Files selected for processing: 3
  • apps/web/src/components/CommandPalette.logic.test.ts
  • apps/web/src/components/CommandPalette.logic.ts
  • apps/web/src/components/CommandPalette.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Copy link
Copy Markdown
Member

Thanks for this. https://git.cafe/pingdotgg/t3code/pulls/31174 makes the same change and is the one being kept.

#31174 fixes the same filtered project-picker shortcuts with a smaller production change that preserves the existing root-search suggestions. It also includes a browser regression showing that pressing the shortcut starts a thread in the displayed project.

Your regression case covers useful details, including ranked results beyond the original nine-project cutoff and preserving the dedicated No project shortcut. Those remain useful coverage for the fix we keep.

Closing as a duplicate.

@smirea
smirea deleted the fix/palette-jump-shortcuts-follow-filter branch November 10, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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.

[Bug]: Project picker jump shortcuts keep their unfiltered numbers after typing

3 participants