Skip to content

Conversation

@colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Oct 13, 2025

What it does

Fixes #16418 by checking whether writing the preference would be necessary.

How to test

  1. Follow steps from Title bar style preference unnecessarily written to settings.json #16418
  2. Observe that the preference is not written to the file on MacOS.

Warning

Arguably, this 'fix' actually reveals a bug. Since the preference should not be included on MacOS, the inspect call should return undefined. At the moment, it doesn't: the preference system in fact has added the preference to its schema, with the appropriate default value of native. We should likely fix that, and then ensure that the preference isn't active at all in that case, and that all consumers of the value correctly handle its absence.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Oct 13, 2025
@colin-grant-work colin-grant-work force-pushed the bugfix/unnecessary-title-bar-setting branch from 083b1d5 to e6a9597 Compare October 13, 2025 13:49
@colin-grant-work colin-grant-work changed the title Only set window.titleBarStyle preference if active value differs Only set window.titleBarStyle preference if different from active value Oct 13, 2025
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

It seems like my changes in #11588 broke with the latest preferences refactoring? I agree that the frontend should definitely filter those preferences out.

…tion.ts


Extra space snuck in

Co-authored-by: Mark Sujew <[email protected]>
@colin-grant-work
Copy link
Contributor Author

It seems like my changes in #11588 broke with the latest preferences refactoring?

Certainly seems that way. At a casual glance, it looks like there is some checking of the included property, but I'm not exactly sure where in the schema building lifecycle it's taking place - apparently not everywhere it should.

@msujew
Copy link
Member

msujew commented Oct 14, 2025

FYI my comment was just to confirm that something is broken - I can't actually test the changes, since I don't have a MacOS system available to me right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

Title bar style preference unnecessarily written to settings.json

3 participants