Skip to content

Add configurable add-project shortcut - #4258

Closed
colonelpanic8 wants to merge 9 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/add-project-shortcut
Closed

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

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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 ac10e74ae628 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 changes only; no auth or data-layer changes. Main risk is Alt+A conflicting with typing in the palette search when open, which is intentional.

Overview
Adds a new project.add keybinding command (default alt+a, disabled in terminal focus) across contracts, shared defaults, and server config, so users can rebind it like other shortcuts.

The command palette’s global key handler now routes project.add into the existing add-project flow (not only commandPalette.toggle), with shouldHandleCommandPaletteShortcut so Alt+A does not steal focus from editors unless the palette is already open; key repeat is ignored.

Add project is surfaced in New thread in… via buildNewThreadInGroups with the binding shown on the action. The add-project wizard tracks stack depth to avoid reopening while active and fully resets clone/environment state when backing out to the parent view.

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

Note

Add configurable project.add shortcut (Alt+A) to open the add-project flow

  • Registers project.add as a new static keybinding command with a default alt+a binding (outside terminal focus) in keybindings.ts and keybindings.ts.
  • The global keydown handler in CommandPalette.tsx now opens the add-project flow when project.add fires, skipping editable targets unless the palette is already open.
  • The New thread in... submenu now includes an Add project action with the shortcut displayed alongside the project list.
  • Add-project flow tracks its stack depth via addProjectFlowBaseDepthRef to prevent duplicate openings and resets state when the user pops back to or above that depth.

Macroscope summarized dad869d.

@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 Plus

Run ID: 3fa60fe5-9512-4169-baaa-5c04d316a2b8

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 (Alt+A) for the add-project command, including new shortcut handling logic and state management for flow tracking. While well-tested and from an experienced contributor, new feature capabilities warrant human review.

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 3 times, most recently from 681668e to 48a7327 Compare July 22, 2026 16:22
Comment thread apps/web/src/components/CommandPalette.tsx
Comment thread apps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from ac10e74 to b9a4196 Compare July 22, 2026 23:41
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch 9 times, most recently from 2e0cf21 to d1740c6 Compare July 23, 2026 22:38
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from 88cfcca to 7c2a7f9 Compare July 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
# Conflicts:
#	apps/web/src/components/CommandPalette.logic.test.ts
#	apps/web/src/components/CommandPalette.tsx
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
# Conflicts:
#	apps/web/src/components/CommandPalette.logic.test.ts
#	apps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from 7c2a7f9 to 0dcb2e9 Compare July 28, 2026 02:07
@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 28, 2026
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from 0dcb2e9 to dad869d Compare July 28, 2026 02:50
@t3dotgg

t3dotgg commented Aug 28, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

This adds a global command, setting, server validation, palette action, and default Alt+A binding for the existing Add project flow. The shortcut does not justify the extra command and default key chord across eight files.

If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.

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.

2 participants