Clicking the Midnight theme card always landed on a dark preset. The settings.js card click handler built the variant id as t.id + '-dark' (dark) / t.id (light), but midnight is dark-first: its dark preset is midnight and its light preset is midnight-light. So a light-mode user switching to midnight got midnight (the dark preset), and a dark-mode user got the nonexistent midnight-dark.
Fix
Use the generic lightPreset()/darkPreset() resolvers already in the file (added for #132) in the card click handler.
Verification (CDP probe against local build, 127.0.0.1:8641)
Fix attempt 1.
## Bug
Clicking the Midnight theme card always landed on a dark preset. The settings.js card click handler built the variant id as `t.id + '-dark'` (dark) / `t.id` (light), but midnight is dark-first: its dark preset is `midnight` and its light preset is `midnight-light`. So a light-mode user switching to midnight got `midnight` (the dark preset), and a dark-mode user got the nonexistent `midnight-dark`.
## Fix
Use the generic `lightPreset()`/`darkPreset()` resolvers already in the file (added for #132) in the card click handler.
## Verification (CDP probe against local build, 127.0.0.1:8641)
- Start light (smooth) -> click midnight: preset `smooth` -> `midnight-light`, stored dark=false
- Start dark (smooth-dark) -> click midnight: `smooth-dark` -> `midnight`, stored dark=true
- Sanity: smooth card in light mode stays `smooth`
- Reload persistence: midnight+dark=false -> `midnight-light`; midnight+dark=true -> `midnight`
- go build + go test ./... all pass
Ref #294
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fix attempt 1.
Bug
Clicking the Midnight theme card always landed on a dark preset. The settings.js card click handler built the variant id as
t.id + '-dark'(dark) /t.id(light), but midnight is dark-first: its dark preset ismidnightand its light preset ismidnight-light. So a light-mode user switching to midnight gotmidnight(the dark preset), and a dark-mode user got the nonexistentmidnight-dark.Fix
Use the generic
lightPreset()/darkPreset()resolvers already in the file (added for #132) in the card click handler.Verification (CDP probe against local build, 127.0.0.1:8641)
smooth->midnight-light, stored dark=falsesmooth-dark->midnight, stored dark=truesmoothmidnight-light; midnight+dark=true ->midnightRef #294