Skip to content

fix(web): scope source control settings by environment - #6088

Open
Popidge wants to merge 2 commits into
pingdotgg:mainfrom
Popidge:codex/source-control-settings-by-environment
Open

fix(web): scope source control settings by environment#6088
Popidge wants to merge 2 commits into
pingdotgg:mainfrom
Popidge:codex/source-control-settings-by-environment

Conversation

@Popidge

@Popidge Popidge commented Aug 11, 2026

Copy link
Copy Markdown

What Changed

This adds the same device selection used by Provider settings to Source Control Settings, and routes discovery, Git fetch policy, writing preferences, and writer-model data through the selected environment.
The backend APIs were already environment-scoped, so no wire-contract or server changes were required.
Both settings panels now use a shared SettingsEnvironmentSelector component (componented out from SettingsEnvironmentSelector), hence the slightly larger diff churn.

Why

Both Source Control and Provider features use the connected environment's tools, but Source Control Settings only reflected the current local environment. This brings them both into line, and allows changing of Source Control settings between local environments.

UI Changes

Before:
Screenshot 2026-08-11 041747

After (Video):

Recording.2026-08-11.041726.mp4

Tested on desktop + web builds on Windows 11, connected to Windows + Linux remote environments.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes where persisted settings are read and written per environment; mistakes could target the wrong device, though the pattern mirrors the existing provider panel and adds read-only gating.

Overview
Source Control settings now follow the same per-device model as Provider settings: a shared SettingsEnvironmentSelector (extracted from the provider panel) lets you pick which connected environment to configure, and hides itself when only the primary device exists.

Discovery, Git fetch interval, writing style, and writer model reads/writes all go through environmentId-scoped hooks and queries instead of primary-only settings. Session and connection access reuse ProviderSettingsPanel.logic so remote or limited sessions see read-only or unavailable states instead of editing the wrong host.

Provider settings only swap in the shared selector; status dots in device buttons no longer use tooltips (status still appears in the subtitle). Tests cover environment routing and the selector behavior; user docs note device selection for multi-environment setups.

Reviewed by Cursor Bugbot for commit dd9b8d1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Scope source control settings by environment with per-device selector

  • Adds a device selector to the Source Control settings panel that routes all settings, discovery, and provider controls to the selected environment.
  • Introduces a reusable SettingsEnvironmentSelector component used by both the source control and provider settings panels.
  • Access is gated per environment: settings render read-only with a 'Limited permissions' banner when operate access is restricted, and show a status row when the environment is loading, errored, or unavailable.
  • Git fetch interval and text generation settings now read/write via environment-scoped hooks using the selected environmentId.
  • Behavioral Change: the connection status dot inside environment selector buttons no longer shows a tooltip.

Macroscope summarized dd9b8d1.

@coderabbitai

coderabbitai Bot commented Aug 11, 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 Plus

Run ID: f3b547fe-2e50-4608-a639-15d29575fba8

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

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 Aug 11, 2026
Comment thread apps/web/src/components/settings/SourceControlSettings.tsx Outdated
Comment thread apps/web/src/components/settings/SettingsEnvironmentSelector.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f5c8e64. Configure here.

Comment thread apps/web/src/components/settings/SourceControlSettings.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces environment-scoped source control settings, enabling users to configure settings per-connected-environment rather than just the primary device. Despite the 'fix' label, this is a new feature with significant behavioral changes, new permission gating logic, and a new UI component hierarchy that warrants 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