Skip to content

Add environment-aware new thread picker#4426

Open
colonelpanic8 wants to merge 4 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/remote-environment-thread-creation
Open

Add environment-aware new thread picker#4426
colonelpanic8 wants to merge 4 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/remote-environment-thread-creation

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 24, 2026

Copy link
Copy Markdown

What Changed

  • Added a chat.newEnvironment command on Mod+Shift+N.
  • Added a two-stage new-thread flow: choose an environment, then choose a project available on that environment.
  • Presents every environment in one flat Run on list; the primary environment is labeled with its runtime hostname instead of Local.
  • Keeps existing Mod+N project/context behavior unchanged.
  • Migrates only the previous exact Mod+Shift+N chat.newLocal default while preserving custom chat.newLocal bindings.

Why

Thread creation previously collapsed projects across environments and silently selected one machine. This makes execution location explicit without treating local as a separate mode.

UI Changes

Environment selection:

Choose an environment

Environment-scoped project selection:

Choose a project

Checklist

  • Focused keybinding and environment-grouping tests pass (92 tests).
  • Targeted formatting and lint checks pass.
  • Integrated web verification covers environment -> project -> draft.
  • Repository-wide vp check completes with only existing warnings outside this change.
  • Repository-wide vp run typecheck is blocked by the existing interactive Astro dependency prompt and existing unrelated web type errors; changed packages/files introduce no reported type errors.

Note

Medium Risk
User-visible shortcut behavior changes for anyone on the old default binding, and thread creation now depends on environment shell bootstrap timing in the command palette.

Overview
Adds an environment-first way to start threads: Mod+Shift+N now binds to chat.newEnvironment and opens a “New thread on…” command palette flow (environment → projects on that machine). chat.newLocal is no longer the default on that shortcut; custom chat.newLocal bindings (e.g. other keys) are unchanged.

The palette gains a new-thread-on open intent, resolveNewThreadOnIntent to defer until environment shells load and close when no environments have projects, and buildSidebarProjectPickerEntries optional targetEnvironmentId so project lists don’t fall back to another environment’s copy of a repo.

Server startup migrates persisted configs that still have the exact legacy mod+shift+nchat.newLocal rule to chat.newEnvironment, while leaving other chat.newLocal entries alone.

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

Note

Add environment-aware new thread picker triggered by chat.newEnvironment shortcut

  • Adds a 'New thread on…' command palette flow that lets users pick an environment then a project when starting a new thread, bound to Shift+Mod+N by default.
  • Introduces resolveNewThreadOnIntent to gate palette opening based on load state; the palette defers display until environment data is ready and closes if no targets exist.
  • Extends buildSidebarProjectPickerEntries to accept an optional targetEnvironmentId, filtering project picker entries to a specific environment.
  • Migrates the legacy mod+shift+n → chat.newLocal default keybinding to chat.newEnvironment on startup, leaving any user-defined chat.newLocal bindings intact.
  • Behavioral Change: Shift+Mod+N now opens the environment picker instead of directly creating a local thread for users who had the previous default binding.

Macroscope summarized a93d1ea.

@coderabbitai

coderabbitai Bot commented Jul 24, 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: 6d8b4617-c23b-4a1c-89d6-da3091938c3e

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

❤️ Share

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 24, 2026
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature (environment-aware thread picker) with new UI workflow, new keybinding command, and migration logic. New features warrant human review to ensure the intended behavior and UX are correct.

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

Comment thread apps/web/src/components/CommandPalette.logic.ts
@colonelpanic8
colonelpanic8 force-pushed the t3code/remote-environment-thread-creation branch from f1dd61f to cf4f7c9 Compare July 24, 2026 06:04
@colonelpanic8
colonelpanic8 force-pushed the t3code/remote-environment-thread-creation branch 2 times, most recently from fb31222 to 139d17e Compare July 25, 2026 00:04
Comment thread apps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8 force-pushed the t3code/remote-environment-thread-creation branch from 1b619d5 to a93d1ea Compare July 25, 2026 03:23

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

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 a93d1ea. Configure here.

return;
}
openNewThreadOnFlow();
}, [environmentShellsLoaded, newThreadEnvironmentItems.length, openIntent, setOpen]);

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.

Deferred intent resets palette navigation

Medium Severity

The new-thread-on command palette flow can discard user selections. The palette displays "New thread on..." items before all environment shells are bootstrapped. If a user navigates into a submenu during this time, the openNewThreadOnFlow later clears the view stack, resetting their in-progress selection once bootstrapping completes.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a93d1ea. Configure here.

colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 25, 2026
Original local work that existed only in the pingdotgg#4426 stack-compat patch; no
topic branch defines it. CommandPalette.tsx imports these three symbols.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant