fix(web): show remote environment for non-Git projects - #5555
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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: Approved 9b23b02 This is a straightforward UI visibility fix allowing non-Git projects to show environment indicators in the toolbar. The changes are limited to simple display logic with comprehensive unit tests, and don't affect security or significant runtime behavior. You can customize Macroscope's approvability policy. Learn more. |
Non-Git projects hid the entire composer context strip, so a thread running on a remote machine gave no indication which machine it was using.
Keep the strip visible whenever the environment indicator is relevant, while hiding only the workspace and branch controls that require Git. This preserves the existing compact behavior for single local environments.
Tests:
vp test run apps/web/src/components/BranchToolbar.logic.test.ts;vp run --filter ./apps/web typecheck; targetedvp lint.Made with GPT-5.6-Sol in the Codex harness.
Note
Low Risk
Targeted composer toolbar visibility logic with unit tests; no auth, data, or API changes.
Overview
Non-Git projects no longer hide the whole composer context strip when a thread runs on a remote machine. Visibility is driven by
shouldShowComposerContextStrip: the strip appears when there is an active project and either the repo is Git or the environment indicator should show (e.g. sole remote / multi-environment).ChatViewwires that helper withshouldShowEnvironmentIndicatoron the active thread’s environment, and passesshowGitControls={isGitRepo}intoBranchToolbar. Workspace mode, branch picker, and the mobile combined Git menu render only when Git controls apply; environment-only layouts keep the environment selector without the vertical separator or Git chrome.Reviewed by Cursor Bugbot for commit 9b23b02. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show remote environment indicator in composer toolbar for non-Git projects
shouldShowComposerContextStripinBranchToolbar.logic.tsthat returnstruewhen an active project exists and either the repo is Git or an environment indicator should be shown.ChatView.tsxto deriveshowComposerEnvironmentIndicatorfrom the active thread's environment and passesshowGitControls={isGitRepo}toBranchToolbar.showGitControlsprop toBranchToolbar.tsxthat gates rendering of the branch selector, env mode selector, and mobile run context selector.Macroscope summarized 9b23b02.