An explicit theme choice (even Midnight Sky) wins over the sky #114
Loading…
Reference in a new issue
No description provided.
Delete branch "void/explicit-theme"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes ratatoskr:follow_up:explicit-midnight-sky-indistinguishable. Decided by the steward (Persona brief chat-mind-20261112T094219841Z-t17).
Decision 1: tell default from chosen with a new optional setting
themeChosen, set by the theme menu.themeIdkeeps its default ('midnight-sky'); the default does not become undefined, so General.tsx:85 and every other reader ofthemeIdstay as they are. General.tsx gains one setter and one line in handleThemeSelect.chosenTheme(useSystemTheme, themeId, themeChosen)(now exported) is true for the system scheme, a flagged pick, or a saved id other than the default. Migration-safe: the field is absent in stored blobs and merges in as undefined. Not recoverable: people who picked Midnight Sky before this change are saved asmidnight-skywith no flag (settings are stored as one whole blob, so the default is stored for anyone who changed any setting) and still read as default until they pick again.Decision 2: a chosen theme also beats a fixed sky state. No ruling in the ratatoskr store says a fixed state beats a theme; the only ruling-bearing source, PR #65's steward ruling, covers user themes over auto. "A fixed sky state is itself a choice and wins" was a code comment, not a ruling. sceneThemeId now returns undefined first when the person chose a theme. A fixed state still picks its theme when no theme was chosen, scene on or off. Behaviour change: a person with an explicit non-default theme who sets the sky to Day/Dusk/Night no longer has the page theme switched; the scene itself still follows the state.
Tests (from a /tmp copy): skyTheme.test.ts (chosen wins over all four states, scene on and off; fixed picks its theme when none chosen), skyInk.test.ts (the old 'fixed wins' pin flipped), new useTheme.test.ts (4 cases for chosenTheme). hooks + scene + state suites: 557 pass; scene/index.test.ts failed once under load as before, passes alone. tsc: only two errors in settings.ts/hooks/settings.ts atom overloads, lines I did not change (stale node_modules in this body); CI decides. Not seen rendered, no browser.
🤖 Generated with Claude Code
Open UX gap (Soul, PR review): the sky control gives no sign that a chosen theme keeps the page theme; with a chosen theme, picking Day/Dusk/Night changes the scene but not the page theme, and nothing says so.