Skip to content

Conversation

@cppcoffee
Copy link
Contributor

Closes #44292

Release Notes:

  • Fixed autosave setting not being removed when restored to default

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 14, 2025
@github-project-automation github-project-automation bot moved this to Community Champion PRs in Quality Week – December 2025 Dec 14, 2025
@probably-neb
Copy link
Collaborator

Hey, thanks for taking a look at this. I'm going to close this PR as I think it is only a band-aid fix, and rather than hard coding defaults in the already heavily hard-coded settings UI definitions, we should solve the underlying issue here.

While implementing the settings UI, we made the explicit decision that the "restore" button (the back arrow that appears next to the field title in the UI) would remove the setting if that would cause the default to be used (i.e. it would explicitly set the the field to the default value if you reset a setting to the default in a project settings file, but had a customization for that setting in your user setting file). However, we would always set the value when it is set explicitly through the UI, for the simple reason that if you explicitly set a setting value, you expect it to never change even if Zed decides to change the defaults.

I still think that logic is sound, however, I understand it is subtle and non-obvious, and not necessarily the best UX in all cases. One shortcoming we have right now, is that if the field is set to the default, we don't show the reset button.

I personally think we should keep things as they are, and not remove values from the settings files when setting them to the default value (and if we do end up doing that, it should be consistent across all settings not just the autosave setting). However, we could improve things by always showing the restore button as i mentioned above, and being clearer in the UI about which settings have been modified or inherited from the defaults (something we planned to do but was unfortunately cut from scope)

I hope that all makes sense. Feel free to ask questions, there was a lot of conversation and context around this internally that I am trying to convey clearly.

Thanks!

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 community champion

Projects

Development

Successfully merging this pull request may close these issues.

Don't add default values to the settings JSON file after restoring settings from the UI

2 participants