microsoft / microsoft/terminal

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

Open
#11,080 2 comments 0 reactions 0 assignees View on GitHub
Area-Settings Issue-Bug Priority-3 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### 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,

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by setting acrylicOpacity to 0.7 in settings.json while Windows Terminal is running, then changing another value in the Settings UI. Trace the settings serialization flow responsible for writing the JSON number. Done means 0.7 round trips without becoming 0.69999999999999996.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.