dash: a manual light/dark toggle
Your AI's guard dog to stop it from going rogue.
Brought to you by:
doberman
Originally created by: fu351
The dashboard switches palette only through @media (prefers-color-scheme: light) (src/doberman/dash/app.py:116). Someone whose OS is set one way but who is sharing a screen, or just prefers the other look, has no override.
What to do
:root[data-theme="light"] / :root[data-theme="dark"] blocks carrying the same custom-property values, so an explicit choice wins in both directions.Recent decisions header row (not in .topbar-right; see heads-up). On click set document.documentElement.dataset.theme to the other value and store it in localStorage inside a try/catch (the file already guards sessionStorage that way, lines 306-314).localStorage and apply data-theme before the first paint (a tiny inline script at the top of <body>).tests/unit/test_dash_polish.py: the shell contains data-theme and the toggle markup.Cosmetic, client-side only. Heads-up: [#401] and [#415] are in flight against dash/app.py's top bar; branch from a fresh main and expect a small rebase if they land mid-way.