Skip to content

settings_ui: Disable settings overridden by current organization - #58326

Merged
tomhoule merged 6 commits into
mainfrom
tomhoule-ownvkuurxnsy
Jun 5, 2026
Merged

settings_ui: Disable settings overridden by current organization#58326
tomhoule merged 6 commits into
mainfrom
tomhoule-ownvkuurxnsy

Conversation

@tomhoule

@tomhoule tomhoule commented Jun 2, 2026

Copy link
Copy Markdown
Contributor
image

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 2, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 2, 2026
@tomhoule
tomhoule force-pushed the tomhoule-ownvkuurxnsy branch 2 times, most recently from 1265c8b to b56bf29 Compare June 2, 2026 12:52
@maxdeviant maxdeviant changed the title settings_ui: Disable settings overriden by current organization settings_ui: Disable settings overridden by current organization Jun 2, 2026
@tomhoule
tomhoule marked this pull request as ready for review June 2, 2026 14:48
Comment thread crates/settings_ui/src/settings_ui.rs Outdated

Copilot AI 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.

Pull request overview

This PR updates the Settings UI to recognize settings that are overridden by the currently selected organization configuration, visually indicating the override and disabling the corresponding control to prevent local changes.

Changes:

  • Extend SettingField with an organization_override hook and use it to detect org-enforced settings.
  • Disable toggle/dropdown controls (and show an “Overridden by Organization” warning icon + tooltip) when the org provides an override value.
  • Add cloud_api_types dependency to access OrganizationConfiguration in the settings UI.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
crates/settings_ui/src/settings_ui.rs Adds org-override plumbing, override detection, UI warning indicator, and disables certain controls based on org config.
crates/settings_ui/src/pages/edit_prediction_provider_setup.rs Updates SettingField initializers to include the new organization_override field.
crates/settings_ui/src/page_data.rs Wires organization overrides for specific settings (e.g., agent feedback, edit prediction data collection) and updates SettingField initializers.
crates/settings_ui/src/components/dropdown.rs Adds a disabled state to the enum dropdown component and forwards it to the underlying UI element.
crates/settings_ui/Cargo.toml Adds cloud_api_types dependency for OrganizationConfiguration.
Cargo.lock Lockfile update for the new dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/settings_ui/src/settings_ui.rs
Comment thread crates/settings_ui/src/settings_ui.rs
Comment thread crates/settings_ui/src/settings_ui.rs
Comment thread crates/settings_ui/src/settings_ui.rs
Comment thread crates/settings_ui/src/settings_ui.rs

@probably-neb probably-neb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The two remaining copilot reviews are correct I think, other than that it looks good!

@tomhoule
tomhoule force-pushed the tomhoule-ownvkuurxnsy branch from b10ab11 to 820de43 Compare June 5, 2026 13:41
@tomhoule

tomhoule commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

The two suggestions are applied. I think this is ready to go.

@tomhoule
tomhoule force-pushed the tomhoule-ownvkuurxnsy branch from 820de43 to 1b84872 Compare June 5, 2026 13:50
@tomhoule
tomhoule enabled auto-merge June 5, 2026 13:58
@tomhoule
tomhoule added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit a8dc357 Jun 5, 2026
32 checks passed
@tomhoule
tomhoule deleted the tomhoule-ownvkuurxnsy branch June 5, 2026 14:03
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 8, 2026
…-industries#58326)

<img width="2258" height="832" alt="image"
src="https://github.com/user-attachments/assets/47006348-0b51-4b4e-b427-4c016e45d4ec"
/>


Release Notes:

- N/A

---------

Co-authored-by: probablyneb <ben@zed.dev>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
@WaryaWayne WaryaWayne mentioned this pull request Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…-industries#58326)

<img width="2258" height="832" alt="image"
src="https://github.com/user-attachments/assets/47006348-0b51-4b4e-b427-4c016e45d4ec"
/>


Release Notes:

- N/A

---------

Co-authored-by: probablyneb <ben@zed.dev>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…-industries#58326)

<img width="2258" height="832" alt="image"
src="https://github.com/user-attachments/assets/47006348-0b51-4b4e-b427-4c016e45d4ec"
/>


Release Notes:

- N/A

---------

Co-authored-by: probablyneb <ben@zed.dev>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants