#294: switching to midnight theme forces dark mode #295

Merged
fen merged 1 commits from fix-294 into dev 2026-09-18 03:14:21 +00:00
Collaborator

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

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
fen added 1 commit 2026-09-18 03:12:37 +00:00
#294: resolve midnight theme variant via lightPreset/darkPreset (midnight is dark-first)
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 25s
105ffc9f17
fen merged commit 2046e45601 into dev 2026-09-18 03:14:21 +00:00
Sign in to join this conversation.