Skip to content

Add configurable add-project shortcut#4258

Open
colonelpanic8 wants to merge 6 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/add-project-shortcut
Open

Add configurable add-project shortcut#4258
colonelpanic8 wants to merge 6 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/add-project-shortcut

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • add Add project to the New thread in… view
  • introduce the configurable project.add keybinding with a default of alt+a
  • route the shortcut through the existing command-palette add-project flow and show the effective binding beside the action

Why

T3 Code already models user-facing shortcuts as named, configurable commands. Using that same system keeps shortcut conflict resolution, per-user overrides, and the Keybindings settings UI consistent instead of hard-coding a palette-only key. Plain Alt+A is unused by the app; Ctrl+A remains available for standard Select All behavior.

Validation

  • vp test packages/contracts/src/keybindings.test.ts apps/web/src/keybindings.test.ts apps/server/src/keybindings.test.ts
  • vp check
  • vp run typecheck

Exact-head evidence

Revalidated at ac10e74 on current main (9a0a071): focused tests, vp check, and vp run typecheck passed. The capture uses only disposable local projects.

Alt+A opens the Add project flow


Note

Low Risk
UI and keybinding wiring only; no auth, data, or server API changes beyond default binding registration.

Overview
Adds a named project.add keybinding (default alt+a, disabled when the terminal is focused) wired through contracts, shared defaults, and server/web tests so it respects user overrides like other commands.

The command palette global handler now opens the add-project flow on project.add (skipping editable fields and key repeat), shows the binding on the Add project action, and surfaces that action in New thread in… via buildNewThreadInGroups.

Add-project navigation tracks stack depth with shouldResetPaletteFlowOnPop / resetAddProjectFlowState so nested palette views reset environment/clone state only when leaving the flow, and re-entry is guarded while a flow is already active.

Reviewed by Cursor Bugbot for commit ac10e74. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add project.add keybinding (Alt+A) to open the add-project flow from the command palette

  • Registers project.add as a valid keybinding command with a default binding of Alt+A (when terminal is not focused) across contracts, shared, and server layers.
  • Extends the CommandPalette keydown handler to intercept project.add and open the add-project flow, skipping editable targets via the new isEditableKeyboardTarget helper.
  • Adds an addProjectAction entry (with shortcut annotation project.add) to the main action list and the 'New thread in...' palette view, built via the new buildNewThreadInGroups helper.
  • Tracks add-project flow depth with addProjectFlowBaseDepthRef so that popping the view stack past the flow's entry point resets its state via resetAddProjectFlowState.

Macroscope summarized ac10e74.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Run ID: 556b49c3-5db3-4fcb-9400-e4ce71039b2c

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/CommandPalette.tsx
@macroscopeapp

macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing keyboard shortcut feature (alt+a for add-project) with changes to global keyboard handling, flow state management, and UI additions. New user-facing features warrant human review to ensure the behavior and UX align with team expectations.

You can customize Macroscope's approvability policy. Learn more.

Comment thread packages/shared/src/keybindings.ts
Comment thread packages/shared/src/keybindings.ts
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Jul 22, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from e7cb807 to 42b605f Compare July 22, 2026 12:06
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 22, 2026 12:19

Dismissing prior approval to re-evaluate 51e185e

@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch 2 times, most recently from d0623a7 to 681668e Compare July 22, 2026 15:43
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from 681668e to 48a7327 Compare July 22, 2026 16:22

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 48a7327. Configure here.

Comment thread apps/web/src/components/CommandPalette.tsx
Comment thread apps/web/src/components/CommandPalette.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant