fix(clients): distinguish projects across environments - #5225
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe 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. ChangesEnvironment context and project selection
Composer context toolbar
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
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
ApprovabilityVerdict: 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 |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/mobile/src/features/threads/NewTaskRouteScreen.tsx`:
- Around line 136-140: Update the picker-item mapping in NewTaskRouteScreen’s
useMemo to expand every project in each repository group rather than using only
group.projects[0], preserving each project’s environment-specific metadata and
labels. Apply the same expansion in new-task-flow-provider so both mobile entry
paths expose all scoped projects, and add focused coverage for identical
repository/workspace projects across multiple environments.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 65b42f6d-b0ac-4631-90c9-06291368c22c
📒 Files selected for processing (12)
apps/mobile/src/features/threads/NewTaskRouteScreen.tsxapps/web/src/components/BranchToolbar.logic.test.tsapps/web/src/components/BranchToolbar.logic.tsapps/web/src/components/BranchToolbar.tsxapps/web/src/components/ChatView.tsxapps/web/src/components/CommandPalette.logic.test.tsapps/web/src/components/CommandPalette.logic.tsapps/web/src/components/CommandPalette.tsxapps/web/src/components/chat/DraftHeroHeadline.tsxdocs/user/remote-access.mdpackages/client-runtime/src/state/projectGrouping.test.tspackages/client-runtime/src/state/projectGrouping.ts
Dismissing prior approval to re-evaluate fb58657
|
@coderabbitai review |
✅ Action performedReview finished.
|
What Changed
workspace path · environmentwhen project choosers span multiple environmentsWhy
When two connected environments expose the same workspace path, rows such as
/Users/henry/Desktopwere 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 Macis the neutral test-only label for the second server.Project chooser
Remote non-Git composer
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)git diff --checkChecklist
Created by
gpt-5.6-solusing 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 fb58657. 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
buildProjectPickerDescriptionto generate environment-aware project description strings, used across the command palette, draft hero, and mobile project picker.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.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
Documentation