fix(clients): distinguish projects across environments
What Changed
- show
workspace path · environmentwhen project choosers span multiple environments - apply the same identity to command-palette project search/new-thread actions, the draft project menu, and the mobile new-task chooser
- keep the remote environment visible below the web/desktop composer for non-Git projects without showing irrelevant workspace or branch controls
- centralize the project description formatter, add focused regression coverage, and document the behavior
Why
When two connected environments expose the same workspace path, rows such as /Users/henry/Desktop were visually identical. A new thread could therefore be started on the wrong machine with no way to tell before selection.
The missing composer identity had a separate cause: the entire context strip was gated on isGitRepo, so remote non-Git projects hid their environment. It was unrelated to interrupting the thread.
UI Changes
The captures use two isolated servers that both expose /Users/henry/Desktop; Remote Mac is the neutral test-only label for the second server.
Project chooser
| Before | After |
|---|---|
![]() |
![]() |
Remote non-Git composer
| Before | After |
|---|---|
![]() |
![]() |
Verification
vp test run packages/client-runtime/src/state/projectGrouping.test.ts apps/web/src/components/CommandPalette.logic.test.ts apps/web/src/environmentGrouping.test.ts apps/web/src/components/BranchToolbar.logic.test.ts(83 tests)- scoped typechecks for client runtime, web, and mobile
- touched-file lint and
git diff --check - integrated desktop pass with paired local/remote environments sharing the same project path
Checklist
- [x] This PR is small and focused
- [x] I explained what changed and why
- [x] I included before/after screenshots for the UI changes
- [x] Video is not applicable; there are no animation or timing changes
Created by gpt-5.6-sol using the Codex harness in T3 Code.
[!NOTE] Low Risk Mostly UI labeling and visibility rules with unit tests; no auth or data-path changes. Composer strip gating is the only behavioral surface worth a quick manual check on remote non-Git projects.
Overview When several environments expose the same workspace path or repo, project pickers now show
path · environmentso users can pick the right machine. SharedbuildProjectPickerDescriptiondrives command palette search, “new thread in project”, the draft project menu, and the mobile new-task list.Mobile project lists use
expandRepositoryGroupProjectsso grouped repos still surface one row per environment, not only the first member of each repository group.On web/desktop,
shouldShowComposerContextStripandshowWorkspaceControlskeep the composer context strip for remote non-Git projects (environment only) while hiding branch/worktree controls that do not apply. Docs note the chooser and composer behavior.Reviewed by Cursor Bugbot for commit fb58657f16b69099eaebd9e9101f9504483c1b0a. Bugbot is set up for automated code reviews on this repo. Configure here.
[!NOTE]
Show environment labels in project pickers when multiple environments are connected
- Adds
buildProjectPickerDescriptionto generate environment-aware project description strings, used across the command palette, draft hero, and mobile project picker.- Expands
expandRepositoryGroupProjectsto flatten all scoped projects from repository groups rather than selecting only the first, so all per-environment entries appear in selection lists.BranchToolbargains ashowWorkspaceControlsprop (defaulttrue) to hide branch/workspace controls for non-git projects while still rendering the environment selector.shouldShowComposerContextStripis added to control whether the composer context strip renders for non-git projects based on environment indicator visibility.- Behavioral Change:
logicalProjectsinNewTaskFlowProvidernow includes all projects per repository group instead of only the first, which may affect downstream project selection and context resolution.Macroscope summarized fb58657.
Summary by CodeRabbit
-
New Features
- Project pickers now show environment names alongside workspace paths when multiple environments are connected.
- Remote conversations display the active environment below the composer.
- Environment selection remains available when workspace and branch controls are hidden.
- Project search and “New thread” actions include environment details for clearer identification.
- Mobile project pickers now include projects from all connected environments.
-
Documentation
- Updated remote access guidance to explain environment labels in project selectors and conversations.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: eb0fc8f1-d72e-428b-88c0-a550d9729bb2
📥 Commits
Reviewing files that changed from the base of the PR and between 7401507f32c64d6aea5ccffc539da89a002fcec7 and fb58657f16b69099eaebd9e9101f9504483c1b0a.
📒 Files selected for processing (4)
apps/mobile/src/features/threads/NewTaskRouteScreen.tsxapps/mobile/src/features/threads/new-task-flow-provider.tsxapps/mobile/src/lib/repositoryGroups.test.tsapps/mobile/src/lib/repositoryGroups.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
📝 Walkthrough
Walkthrough
The change adds environment-aware project descriptions to web and mobile pickers. Mobile flows now expand repository groups into individual projects. Composer context visibility and toolbar controls now account for Git and environment state.
Changes
Environment context and project selection
| Layer / File(s) | Summary |
|---|---|
Shared project description helper packages/client-runtime/src/state/projectGrouping.ts, packages/client-runtime/src/state/projectGrouping.test.ts |
buildProjectPickerDescription combines workspace roots with environment labels when enabled. Tests cover both label states. |
Mobile repository project expansion apps/mobile/src/lib/repositoryGroups.ts, apps/mobile/src/lib/repositoryGroups.test.ts, apps/mobile/src/features/threads/new-task-flow-provider.tsx, apps/mobile/src/features/threads/NewTaskRouteScreen.tsx |
Mobile flows expand repository groups into environment-scoped projects and render environment-aware descriptions. |
Environment-aware web project pickers apps/web/src/components/CommandPalette.logic.ts, apps/web/src/components/CommandPalette.logic.test.ts, apps/web/src/components/CommandPalette.tsx, apps/web/src/components/chat/DraftHeroHeadline.tsx |
Project selectors resolve environment labels, display them when multiple environments exist, and include them in search terms. |
Remote access documentation docs/user/remote-access.md |
The documentation describes environment metadata in project selectors and below the composer. |
Composer context toolbar
| Layer / File(s) | Summary |
|---|---|
Composer context visibility apps/web/src/components/BranchToolbar.logic.ts, apps/web/src/components/BranchToolbar.logic.test.ts |
shouldShowComposerContextStrip shows the strip for active Git projects or eligible environment indicators. Tests cover the visibility combinations. |
Conditional toolbar controls apps/web/src/components/BranchToolbar.tsx, apps/web/src/components/ChatView.tsx |
BranchToolbar accepts showWorkspaceControls. ChatView disables workspace controls for non-Git locations while retaining the environment selector when applicable. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Sequence Diagram(s)
sequenceDiagram
participant ChatView
participant shouldShowComposerContextStrip
participant BranchToolbar
ChatView->>shouldShowComposerContextStrip: provide project, Git, and environment state
shouldShowComposerContextStrip-->>ChatView: return context strip visibility
ChatView->>BranchToolbar: pass showWorkspaceControls
BranchToolbar-->>ChatView: render applicable environment and workspace controls
Possibly related PRs
- pingdotgg/t3code#3: Modifies the same
BranchToolbarandChatViewGit and environment-selection workflow. - pingdotgg/t3code#4411: Modifies the web project and new-thread picker flow in
CommandPalette.tsxand related toolbar behavior.
Suggested reviewers: juliusmarminge
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly identifies the main fix: distinguishing projects that exist across multiple environments. |
| Description check | ✅ Passed | The description covers the changes, rationale, UI impact, verification steps, screenshots, and checklist required by the template. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
- [ ] Create stacked PR
- [ ] Commit on current branch
🧪 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.
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Needs human review
This PR introduces new user-facing behavior across mobile and web clients to display environment labels in project pickers when multiple environments exist. While the implementation is straightforward, the cross-cutting UI changes warrant human review.
You can customize Macroscope's approvability policy. Learn more.
@coderabbitai review
Review finished. Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.✅ Action performed
@coderabbitai review
Review finished. Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.✅ Action performed
This is badly needed. Just set up T3 across Macs and it's impossibile to distinguish projects across environments.
Superseded by #11323 (feat(web): mark projects on another machine in project pickers), which landed machine-icon disambiguation across project pickers when catalogs span environments. Closing this older workspace-path · environment labeling approach as wash leftover hygiene — reopen if anything unique still needs merging.



