Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Unify the new thread project picker - #4263

Open
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal
Open

Unify the new thread project picker#4263
colonelpanic8 wants to merge 10 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/replace-ctrl-n-thread-modal

Conversation

@colonelpanic8

@colonelpanic8colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route every new-thread entry point through one command-palette project picker
  • prioritize the project from the current route or thread context
  • preserve loading and empty states, Add project, and repeat-shortcut refresh behavior
  • remove the duplicate Sidebar V2 picker and its separate keyboard-navigation path

Why

T3 Code originally had two project-picker experiences for starting a thread. The command-palette picker was searchable and already served the Ctrl+K flow, while Ctrl+N and the Sidebar V2 button used a separate sidebar-owned modal. Consolidating them gives every entry point the same interaction and removes duplicate UI and keyboard-navigation code.

PR #4269 landed the basic route into the command palette after this PR opened. That means the current main screenshot below is an intermediate state, while the first screenshot is the real product before-state of the consolidation this PR proposed.

UI comparison

Before: standalone Sidebar V2 dialog

The original new-thread flow used a separate project dialog. It duplicated the Ctrl+K picker and did not support incremental filtering.

Original Sidebar V2 new-thread dialog

Current main after #4269

main now routes into the command palette, but the intermediate picker still shows the new-thread shortcut on every project row and does not include Add project in the same result set.

Current main new-thread picker

This PR

This PR keeps the command-palette picker, prioritizes the contextual project, and includes Add project as a keyboard-addressable action.

New-thread picker on this PR

It also uses the same incremental search behavior as Ctrl+K → New thread in…:

New-thread picker filtered to Canvas Components

Validation

  • web package typecheck
  • targeted lint on changed files
  • CommandPalette.logic.test.ts and keybindings.test.ts (56 tests)
  • isolated end-to-end web verification: Ctrl+N opens the Projects command-palette submenu and selecting a project creates a fresh draft
  • compared against Ctrl+K → New thread in… to confirm both entry points render the same picker

Exact-head evidence

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

Unified new-thread picker filtered to Cedar Docs


Note

Medium Risk
Touches thread-creation entry points, global shortcuts, and command-palette navigation across Sidebar V2 and chat routes; behavior changes for zero-project and multi-project cases but logic is largely extracted and unit-tested.

Overview
Unifies starting a new thread behind a single command-palette project picker instead of mixed sidebar and palette flows.

The palette gains a dedicated new-thread-in view: grouped project rows, Add project always in an Actions group (including the > actions filter), and empty/loading copy via new logic helpers. Opening can pass preferredProjectRef on the event bus; resolution combines that with sidebar project scope and thread/route context through resolveNewThreadPickerProjectRef / resolveScopedNewThreadProjectRef, with scope lifted to a shared sidebarProjectScopeStore.

Sidebar V2 and chat route shortcuts (Ctrl+N / chat.new) use resolveChatNewShortcutBehavior: multi-project or zero-project Sidebar V2 opens the picker (with preference); single-project still creates immediately and can close an open palette first. chat.new may refresh while the palette is open; other chat shortcuts stay suppressed. The sidebar New thread control is no longer disabled when there are no projects.

Supporting changes: closeCommandPalette on the bus, add-project back-navigation fix when popping views, and removal of per-row chat.new shortcut on picker projects.

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

Note

Unify the new thread project picker in the command palette with scoped project resolution

  • Adds a dedicated 'New thread in…' project picker view to the command palette, replacing inline project embedding with a structured group built by buildNewThreadPickerGroups
  • The picker resolves an effective preferred project from explicit preference, sidebar scope, or contextual project via resolveNewThreadPickerProjectRef and resolveScopedNewThreadProjectRef
  • Clicking 'New thread' in SidebarV2 now opens the project picker when multiple or zero projects exist, passing a preferredProjectRef; the button is no longer disabled with zero projects
  • Global chat shortcuts (ChatRouteGlobalShortcuts) suppress unrelated shortcuts while the palette is open and close the palette before immediate thread creation
  • Adds closeCommandPalette/onCloseCommandPalette event utilities and a shared sidebarProjectScopeStore for cross-component scope sharing
  • Behavioral Change: resolveChatNewShortcutBehavior replaces a simple project-count check with a three-way decision (open-project-picker, create-immediately, dismiss-and-create) affecting keyboard shortcut behavior

Macroscope summarized e2550fb.

Current combined-stack UI evidence (2026-07-24)

Captured from PR head a5e53a9ce55272a331c6ba6443d3601c82363020 on upstream main ece05087a70e94efcd57441337fa1249559362ba, using combined integration 4dd4cef40 and package /nix/store/pf7fjqw8ykkdgayf3ywsbgxxp6wi1m42-t3code-0.0.29-patched-main-20260724.

The animation shows the Sidebar V2 New thread control opening the shared Projects picker, filtering to Atlas API, and Enter creating the new draft in that project. The picker retains Add project and keyboard hints. All names and paths are disposable seed data.

Unified Sidebar V2 new-thread interaction

Unified new-thread picker with projects and Add project

@coderabbitai

coderabbitaiBot 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: 4e74653d-7ec6-4f05-a6aa-8c7a4e1babfa

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-actionsgithub-actionsBot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeappBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing functionality: a unified project picker for new threads with modified keyboard shortcut behavior, new state management, and changed command palette interactions. These feature-level changes to the thread creation workflow warrant human review.

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

Comment threadapps/web/src/components/SidebarV2.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/commandPaletteContext.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/SidebarV2.tsx Outdated
@juliusmarminge

Copy link
Copy Markdown
Member

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES
CleanShot 2026-07-22 at 14 32 06@2x

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 393a8ab to ae058e8CompareJuly 22, 2026 14:46
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8

Copy link
Copy Markdown
ContributorAuthor

BEFORE/AFTER SCREENSHOTS FOR UI CHANGES CleanShot 2026-07-22 at 14 32 06@2x

this just gets rid of a duplicated modal where one version is clearly superior to the other. You really need a screenshot for that?

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 942961d to 95ef9caCompareJuly 22, 2026 15:44
Comment threadapps/web/src/routes/_chat.tsx Outdated
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 22, 2026 15:52

Dismissing prior approval to re-evaluate 891f36e

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 891f36e to f2fecdbCompareJuly 22, 2026 16:09
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 584440b to dfc3277CompareJuly 22, 2026 16:22
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 9fb451d to 420ec83CompareJuly 22, 2026 23:21
Comment threadapps/web/src/components/CommandPalette.tsx Outdated
Comment threadapps/web/src/routes/_chat.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 420ec83 to 6e0d514CompareJuly 22, 2026 23:43
macroscopeapp[bot]
macroscopeappBot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 6e0d514 to 287631fCompareJuly 23, 2026 16:05
Comment threadapps/web/src/components/CommandPalette.tsx
Comment threadapps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 287631f to 7df1729CompareJuly 23, 2026 16:11
@macroscopeapp
macroscopeappBot dismissed their stale reviewJuly 23, 2026 16:11

Dismissing prior approval to re-evaluate 7df1729

@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from ef15fa2 to 200eed6CompareJuly 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
@colonelpanic8
colonelpanic8force-pushed the t3code/replace-ctrl-n-thread-modal branch from 200eed6 to 5745e70CompareJuly 28, 2026 02:07

@cursorcursorBot 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 13906ad. Configure here.

Comment threadapps/web/src/components/CommandPalette.logic.ts
Comment threadapps/web/src/components/CommandPalette.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL500-999 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@colonelpanic8@juliusmarminge