Settings that are floats like acrylicOpacity don't round trip correctly #15010

Open
opened 2026-01-31 04:25:59 +00:00 by claunia · 2 comments
Owner

Originally created by @shanselman on GitHub (Aug 30, 2021).

Windows Terminal version (or Windows build number)

1.11.2372.0

Other Software

Just a terminal bug, nothing else

Steps to reproduce

Edit settings.json manually and set "acrylicOpacity": 0.7 while Terminal is running.

Now go to the Terminal Settings UI and change something else. Note that acrylicOpacity is now 0.69999999999999996

image

Expected Behavior

I expected floats to roundtrip with JSON numbers

Actual Behavior

0.7 turned into "acrylicOpacity": 0.69999999999999996,

Originally created by @shanselman on GitHub (Aug 30, 2021). ### Windows Terminal version (or Windows build number) 1.11.2372.0 ### Other Software Just a terminal bug, nothing else ### Steps to reproduce Edit settings.json manually and set "acrylicOpacity": 0.7 while Terminal is running. Now go to the Terminal Settings UI and change something else. Note that acrylicOpacity is now 0.69999999999999996 ![image](https://user-images.githubusercontent.com/2892/131270280-0fc272f5-dafa-4106-aec7-f646a9564e06.png) ### Expected Behavior I expected floats to roundtrip with JSON numbers ### Actual Behavior 0.7 turned into "acrylicOpacity": 0.69999999999999996,
claunia added the Area-SettingsIssue-BugPriority-3Product-Terminal labels 2026-01-31 04:26:00 +00:00
Author
Owner

@j4james commented on GitHub (Aug 30, 2021):

Technically this is the same issue as #1398. That was initially "fixed" by PR #2475, which simply stopped serializing settings. But I'm assuming the problem returned once we introduced the new Settings UI, so there was a need for the serializing again.

@j4james commented on GitHub (Aug 30, 2021): Technically this is the same issue as #1398. That was initially "fixed" by PR #2475, which simply stopped serializing settings. But I'm assuming the problem returned once we introduced the new Settings UI, so there was a need for the serializing again.
Author
Owner

@zadjii-msft commented on GitHub (Sep 8, 2021):

Yea, that's probably not right. I wonder what other settings we have that are floats like this. I'm about to blow away acrylicOpacity as a float in #603, but we'll need to do something about the others.

@zadjii-msft commented on GitHub (Sep 8, 2021): Yea, that's probably not right. I wonder what other settings we have that are floats like this. I'm about to blow away `acrylicOpacity` as a float in #603, but we'll need to do something about the others.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15010