Conversation
`populateTerminalFontWeight` adds an option for a stored weight the picker does not list, so a hand-set 350 survives being looked at. It never removed the one a previous open added, and App Settings is opened again and again: a device that held 350, then 200, then 400 ended up with a picker offering all three, none of which was the stored value. Each custom entry is marked and cleared at the top of the next populate, before the add (clearing after it would take out the entry just made). Returning to a listed weight leaves the picker with no custom entries at all. Found by a DeepSeek Harness review of #417 running on the local RTX 5090, which named the file and the line. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Closing this: opened without asking first. The fix stands (a stale custom entry accumulates in the terminal-weight picker across App Settings opens), so I will bring it back when you want it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #417, found by reviewing it with the DeepSeek Harness on the local RTX 5090.
The bug
populateTerminalFontWeightadds an option for a stored weight the picker does not list, so a hand-set350survives being looked at rather than being silently reset by the next save. It never removed the entry a previous open added, and App Settings is opened again and again.A device that held 350, then 200, then 400 ended up with a picker offering all three, none of which was the stored value. Measured in a browser against the shipped code:
…,800,900,350…,800,900,350,222…,800,900,350,222,275Cosmetic, and only reachable by hand-editing the stored value, which is exactly the case the custom entry exists to serve.
The fix
Each custom entry is marked (
data-custom="1") and cleared at the top of the next populate. The clear runs before the add, or it removes the entry it just made. Same run after the fix:…,800,900,350…,800,900,222…,800,900,275…,800,900(no custom entry at all)Testing
npm run typecheck,npm run lint,npm run format:checkandnpm run check:frontend-syntaxpass. One test added totest/terminal-font-weight.test.ts(12 there now), pinning the marker, the removal, and the order of the two.Verified in a headless browser against a live server: the table above is the real output, before and after.