Settings UI removes comments in settings.json #12588

Closed
opened 2026-01-31 03:19:37 +00:00 by claunia · 5 comments
Owner

Originally created by @DennisGaida on GitHub (Feb 15, 2021).

Environment

Windows build number: Microsoft Windows NT 10.0.19042.0
Windows Terminal version: 1.6.10412.0

Steps to reproduce

Open the settings UI settingsUI, make some changes, save

Expected behavior

I would assume that the settings.json is just changed with new values. Whatever is changed is written.

Actual behavior

It seems that the settings are completely rewritten by the settingsUI - meaning my order of things in the json is completely gone and more importantly some comments are gone. I'm playing around with different fonts for example and the section looked like this:

"defaults": 
        {
            //"fontFace": "Cascadia Code",
            "fontFace": "CaskaydiaCove NF"
        },

After saving with the settings UI, the commented out fontFace is gone. The same behavior I observed for colorScheme within the list of profiles. Other comments are still there (e.g. in the keybindings section)

Originally created by @DennisGaida on GitHub (Feb 15, 2021). # Environment ```none Windows build number: Microsoft Windows NT 10.0.19042.0 Windows Terminal version: 1.6.10412.0 ``` # Steps to reproduce Open the settings UI `settingsUI`, make some changes, *save* # Expected behavior I would assume that the `settings.json` is just changed with new values. Whatever is changed is written. # Actual behavior It seems that the settings are completely rewritten by the `settingsUI` - meaning my order of things in the json is completely gone and more importantly *some* comments are gone. I'm playing around with different fonts for example and the section looked like this: ``` "defaults": { //"fontFace": "Cascadia Code", "fontFace": "CaskaydiaCove NF" }, ``` After saving with the settings UI, the commented out `fontFace` is gone. The same behavior I observed for `colorScheme` within the list of profiles. Other comments are still there (e.g. in the `keybindings` section)
claunia added the Resolution-Duplicate label 2026-01-31 03:19:37 +00:00
Author
Owner

@Don-Vito commented on GitHub (Feb 15, 2021):

There is a discussion about similar problems here: https://github.com/microsoft/terminal/issues/8991.
Probably worth adding this issue there as well.

@Don-Vito commented on GitHub (Feb 15, 2021): There is a discussion about similar problems here: https://github.com/microsoft/terminal/issues/8991. Probably worth adding this issue there as well.
Author
Owner

@DennisGaida commented on GitHub (Feb 15, 2021):

Good link, I tried to find a related issue before. My "removing comments" issue isn't addressed in the original issue though.

@DennisGaida commented on GitHub (Feb 15, 2021): Good link, I tried to find a related issue before. My "removing comments" issue isn't addressed in the original issue though.
Author
Owner

@DHowett commented on GitHub (Feb 15, 2021):

/dup #8991 these are all part of the same umbrella of issues -- we don't have good "in-place" editing for the settings file. thanks for bringing this up!

(We re-serialize the entire document, but since the settings UI doesn't support key bindings we just move that part of the serialization tree over from the original... this is why comments remain with bindings but nothing else.)

@DHowett commented on GitHub (Feb 15, 2021): /dup #8991 these are all part of the same umbrella of issues -- we don't have good "in-place" editing for the settings file. thanks for bringing this up! (We re-serialize the entire document, but since the settings UI doesn't support key bindings we just move that part of the serialization tree over from the original... this is why comments remain with bindings but nothing else.)
Author
Owner

@ghost commented on GitHub (Feb 15, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Feb 15, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@DennisGaida commented on GitHub (Feb 16, 2021):

@DHowett thanks for the additional information. This is how you close an issue. I'll follow #8991 closely.

@DennisGaida commented on GitHub (Feb 16, 2021): @DHowett thanks for the additional information. This is how you close an issue. I'll follow #8991 closely.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12588