Bug Report - Settings file is regenerated by Windows Terminal on launch #3029

Closed
opened 2026-01-30 23:11:12 +00:00 by claunia · 4 comments
Owner

Originally created by @allykzam on GitHub (Jul 31, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.267]
Windows Terminal version (if applicable): 0.2.1831.0

Steps to reproduce

  1. Open the profiles.json used by Windows Terminal for settings, make formatting changes, and save them
  2. Open a new Windows Terminal window

Expected behavior

Since the profiles.json file (appears to be) intended for user manipulation, its formatting and layout should be left as-is after a user changes it. This can be important for users who manage their settings via a git dotfiles repository, e.g. all the dupes of #1567.

Actual behavior

When a new Windows Terminal window is opened, the profiles.json file is re-written, restoring the original formatting, and in some cases changing setting values. In my settings, I had a profile's acrylicOpacity value set to 0.9; after Windows Terminal reflows the settings, the same value has changed to 0.89999997615814209.

Originally created by @allykzam on GitHub (Jul 31, 2019). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.267] Windows Terminal version (if applicable): 0.2.1831.0 ``` # Steps to reproduce 1. Open the `profiles.json` used by Windows Terminal for settings, make formatting changes, and save them 2. Open a new Windows Terminal window # Expected behavior Since the `profiles.json` file (appears to be) intended for user manipulation, its formatting and layout should be left as-is after a user changes it. This can be important for users who manage their settings via a git dotfiles repository, e.g. all the dupes of #1567. # Actual behavior When a new Windows Terminal window is opened, the `profiles.json` file is re-written, restoring the original formatting, and in some cases changing setting values. In my settings, I had a profile's `acrylicOpacity` value set to `0.9`; after Windows Terminal reflows the settings, the same value has changed to `0.89999997615814209`.
claunia added the Needs-TriageResolution-Duplicate labels 2026-01-30 23:11:12 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 31, 2019):

This should be improved/fixed by #754, whenever that lands.

@zadjii-msft commented on GitHub (Jul 31, 2019): This should be improved/fixed by #754, whenever that lands.
Author
Owner

@allykzam commented on GitHub (Aug 2, 2019):

@zadjii-msft I read through the comments on #754, and followed that to the spec you're working on with #1258, and left a comment there. It doesn't sound like the current spec actually solves this issue, and would just make it less frequent?

If I submit a feature request for it, is it possible to have some kind of "I'm a power user, stop touching my settings file" setting that disables Windows Terminal writing to my profiles.json?

@allykzam commented on GitHub (Aug 2, 2019): @zadjii-msft I read through the comments on #754, and followed that to the spec you're working on with #1258, and left a comment there. It doesn't sound like the current spec actually solves this issue, and would just make it less frequent? If I submit a feature request for it, is it possible to have some kind of "I'm a power user, stop touching my settings file" setting that disables Windows Terminal writing to my `profiles.json`?
Author
Owner

@zadjii-msft commented on GitHub (Aug 2, 2019):

One thing we're working on with #1258 is not re-serializing the user's settings. So we're going to have both

  1. dramatically fewer cases where we write the file back out (only when a dynamic profile is added)
  2. When we do write the file back out, we'll write out the original json object.

The goal with 2 is that even if we need to update the settings, we won't be re-serializing things, causing the re-formatting and re-ordering. Hopefully the json will remain in the original state it was in, with only the new keys inserted into the right place.

If you really wanted, you could even disable the dynamic profile generators entirely, which would prevent anything from ever modifying the settings.

In a post #1564 world, this will obviously be harder to prevent when using the settings UI, but you could always just not use it.

@zadjii-msft commented on GitHub (Aug 2, 2019): One thing we're working on with #1258 is not _re-serializing_ the user's settings. So we're going to have both 1. dramatically fewer cases where we write the file back out (only when a dynamic profile is added) 2. When we do write the file back out, we'll write out _the original json object_. The goal with 2 is that even if we need to update the settings, we won't be re-serializing things, causing the re-formatting and re-ordering. Hopefully the json will remain in the original state it was in, with only the new keys inserted into the right place. If you really wanted, you could even disable the dynamic profile generators entirely, which would prevent anything from ever modifying the settings. In a post #1564 world, this will obviously be harder to prevent when using the settings UI, but you could always just _not_ use it.
Author
Owner

@allykzam commented on GitHub (Aug 2, 2019):

The second point wasn't super clear from my reading of the spec, thank you very much for the clarification. Updating a json file without changing its formatting sounds like some complicated voodoo code, so I wish all of you good luck in making that happen. :)

The configuration documentation in here has been great so far, so I suspect I'd be fine working without the new settings UI. Even so, at least it would be expected that well okay, I touched a setting with their UI, it's probably going to reflow my settings file. Feels much nicer than it just happening constantly for seemingly no reason.

@allykzam commented on GitHub (Aug 2, 2019): The second point wasn't super clear from my reading of the spec, thank you very much for the clarification. Updating a json file without changing its formatting sounds like some complicated voodoo code, so I wish all of you good luck in making that happen. :) The configuration documentation in here has been great so far, so I suspect I'd be fine working without the new settings UI. Even so, at least it would be expected that well okay, I touched a setting with their UI, it's probably going to reflow my settings file. Feels much nicer than it just happening constantly for seemingly no reason.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3029