fix(web): new thread picker updates as projects load#22409

closed1
main
GitHub fork: fix/multi-host-project-picker-reconciliation
opened12d agobyAAlex
View on GitHubTwo-way sync enabledPR last imported 2d ago

Problem

Opening ⌘N during startup can show a row for each host checkout, or an extra “No project” row, even after project metadata and host configuration arrive. The composer uses the current projects; the open picker keeps the rows captured when its submenu was pushed. Reopening the picker makes it look fixed.

#22242 restored grouped selection but also removed the submenu’s live-row refresh branch.

Change

Give “New thread in…” its own submenu key at both entry points and render its current project choices while it stays open. Grouping, contextual host selection, and thread creation keep their existing behavior.

Scope and approval

Small follow-up to #22242 for an obvious stale-view bug. This changes the shared web/Electron picker only. Mobile has a separate selector; no server, provider, RPC, or contract changes are needed.

Verification

  • After rebasing onto upstream 41967084e3, vp run check:changed passes: formatting, targeted lint, knip, affected web/scripts typechecks, and 21 tests across CommandPalette.projects.browser.test.tsx and CommandPalette.logic.test.ts. The four picker regression cases were moved out of the focus-test file deleted upstream; the original production fix is unchanged.
  • All four new browser regression cases fail on the baseline and pass with the fix. Both opening paths cover late scratch configuration, repository identities merging host checkouts, and selecting a newly arrived project.
  • Web typecheck, targeted lint, formatting, and git diff --check pass.
  • Real web client with the sanitized demo fixtures from t3/use-sanitized-demo-test-fixtures: open ⌘N, then deliver a project update through the existing command service so a second checkout resolves to the same repository. Baseline retains two T3 Code rows; this branch collapses them without reopening. Captures use two local checkouts on one isolated server; cross-host arrivals are covered by the browser regression fixtures. A packaged desktop cold start was not tested.
Before: metadata arrived, duplicate remainsAfter: metadata arrived, picker regroups
BeforeAfter
Before recordingAfter recording

Model: GPT-6.1 Sol | Harness: Codex in T3 Code

Checks

24 successful · 13 skipped
All checks passed
40dcff2
Synced from GitHub

Approvability

Verdict: Approved at 40dcff2

Macroscope's review found this PR approvable — This is a narrowly scoped web command-palette bug fix that keeps the existing “New thread in…” project rows current while metadata arrives. It adds targeted browser regression coverage without changing APIs, schemas, defaults, or deployment behavior.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3cb39396-c928-4262-b711-26674118406f
📥 Commits

Reviewing files that changed from the base of the PR and between a0f0b4a65e335fa9af5895778b0e0d306cd280b7 and 40dcff29248bbaa0e20a5bcbefc5049f2f6ca63e.

📒 Files selected for processing: 2
  • apps/web/src/components/CommandPalette.projects.browser.test.tsx
  • apps/web/src/components/CommandPalette.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The command palette now uses "new-thread-in" consistently for its new-thread submenu group. Browser tests cover project-picker behavior through shortcut and submenu entry points, including project updates and selection while the picker is open.

Changes: Command palette project picker

Layer / File(s)Summary
Align submenu grouping and verify project-picker behavior
apps/web/src/components/CommandPalette.tsx, apps/web/src/components/CommandPalette.projects.browser.test.tsx
The submenu uses "new-thread-in" when created, opened from an intent, and selected for display. Browser tests cover duplicate scratch-project rows, repository regrouping, and selection of newly added projects.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: t3dotgg, saphid

Merge Risk: ⚪ Minimal · up to 40dcf

The picker updates its project choices while open through both entry paths. No issue requiring resolution before merge was identified.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Description checkPassedThe description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the stale picker-row issue, the fix, scope, regression coverage, test results, observed UI…
Title checkPassedThe title clearly and concisely describes the main fix: updating the new-thread picker as projects load.
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the stale picker-row issue, the fix, scope, regression coverage, test results, observed UI behavior, evidence, and the untested packaged desktop cold start.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Added 1 commit

  • fix(web): new thread picker updates as projects load40dcff2