Skip to content

feat(web): group new-thread project picker by connection#4295

Open
jbmcguire wants to merge 1 commit into
pingdotgg:mainfrom
jbmcguire:feat/group-new-thread-picker-by-connection
Open

feat(web): group new-thread project picker by connection#4295
jbmcguire wants to merge 1 commit into
pingdotgg:mainfrom
jbmcguire:feat/group-new-thread-picker-by-connection

Conversation

@jbmcguire

@jbmcguire jbmcguire commented Jul 22, 2026

Copy link
Copy Markdown

What Changed

The command palette's "New thread in..." project picker now groups projects under one heading per connection (machine), instead of rendering a single flat list. Group headings use the same resolved environment labels as the add-project flow ("This device" / the machine's name), ordered primary-first. The group containing the active project moves to the top with that project as its first row (replacing the old flat-list bubble-to-top behavior). Machine names are added to each row's search terms, so filtering by a visible heading like "Work laptop" narrows to that machine instead of emptying the list.

Behavior is unchanged when only one connection is known: the picker keeps its flat "Projects" heading. Projects whose connection is gone from the catalog stay visible under a fallback heading rather than disappearing.

Scope: CommandPalette.logic.ts (two new pure functions), CommandPalette.tsx (wiring for the submenu and the sidebar-triggered open-intent view), and unit tests.

Why

With the same repo checked out on several machines, the flat picker showed identical entries — three rows distinguishable only by truncated paths. Grouping by connection makes it obvious which machine each project lives on.

UI Changes

Before: one flat "Projects" list where same-named projects from different machines repeat back-to-back.
After: one section per connection, machine name as the heading, active project's machine on top.

Screenshots

file-9d92d8afa54f824685315ca29b3e037f image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (coming in a comment)
  • I included a video for animation/interaction changes (n/a — no motion changes)

Verification

  • vp test run src/components/CommandPalette.logic.test.ts — 11/11 passing (grouping, catalog ordering, single-connection collapse, removed-connection fallback, prioritization, heading search)
  • tsgo --noEmit and vp lint clean (two pre-existing no-unstable-nested-components warnings unchanged from main)
  • Integrated check via an isolated vp run dev environment in the in-app browser (single-connection collapse path)

🤖 Generated with Claude Code

Note

Group projects by environment connection in the new-thread project picker

  • Adds buildProjectActionGroups to CommandPalette.logic.ts to group projects by environmentId, ordered by a provided environment label catalog, with each item searchable by its environment label.
  • Adds prioritizeProjectGroupItem to sort groups so the current project's environment group appears first, with the current project at the top.
  • Updates CommandPalette.tsx to replace the flat projectThreadItems list with grouped output from these two functions in the 'New thread in...' submenu.
  • When only one environment is known and only one group exists, the group is labeled 'Projects' instead of the environment name.

Macroscope summarized 09a3483.

With the same repo checked out on several machines, the flat "New thread
in..." list showed identical project names with only a truncated path to
tell them apart. Group the picker by environment so each connection's
projects sit under its machine name, keep the active project's group and
row on top, and collapse back to the flat "Projects" heading when only
one environment is known. Machine names are searchable so filtering by a
visible heading doesn't empty the list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9ec38be8-4b06-4a57-a96c-5369b005b758

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 22, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature that changes how projects are grouped and displayed in the command palette picker. While well-scoped and tested, new UI features with non-trivial logic warrant human review.

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

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