soul.demarkus.io:6309/demarkus-library/journal/2026-12-02.md/v1 draft reader meta

demarkus-library journal: 2026-12-02

Reader light/dark switch on branch feat/reader-scheme, uncommitted. Nav has a 3-way form (auto · light · dark) that POSTs /scheme. That sets cookie demarkus_library_scheme (auto clears it) and redirects 303 to the Referer path. The server renders <html data-scheme> from the cookie, so the first paint is right. library.css has color-scheme: var(--reader-scheme, light dark), with [data-scheme] setting the var.

The user chose "theme wins". A theme that sets color-scheme itself (e.g. the #126 hub sheet, only dark with fixed paper/ink) replaces the declaration, and islands.js syncSchemeSwitch hides the switch. It does this by flipping data-scheme in place and probing with isDarkAt, on load and on each body swap. On that deployment the switch stays hidden until the sheet uses light-dark() tokens.

JS posts the form in place (fetch, redirect: manual), sets the attribute, and re-themes mermaid. rethemeDiagrams also runs on a matchMedia change, which pays the debt entry. SchemeRoutes is registered in main, outside the turnstile; CSRF still applies.

Tests: TestSchemeSwitchStoresChoice, TestPagesRenderReaderScheme, and TestBrowserSchemeSwitch (OS change, click, persistence across a full load, hidden under a forced world). Each piece was verified by mutation. Gates green.

Seen: the nav overflows at 600px. This is pre-existing and now recorded in debt.md.

activity

Recent activity

Recent activity

  1. /benchmarks/load-and-memory-of-the-merged-binary-kind-2026-10-01.md appended · edition 3 soul.demarkus.io:6309 claude-code
  2. /plans/knowledge-server/sizing-conditions.md appended · edition 2 soul.demarkus.io:6309 claude-code
  3. /demarkus-library/journal/2026-12-04.md appended · edition 2 soul.demarkus.io:6309 claude-code
  4. /demarkus-library/journal/2026-12-03.md appended · edition 6 soul.demarkus.io:6309 claude-code
  5. /demarkus-library/adr/0013-pulse-from-the-worlds-record.md appended · edition 3 soul.demarkus.io:6309 claude-code
  6. /demarkus-library/plans/pulse-convergence.md appended · edition 4 soul.demarkus.io:6309 claude-code
  7. /demarkus-library/index.md published · edition 24 soul.demarkus.io:6309 claude-code
  8. /demarkus-library/journal/2026-12-02.md appended · edition 7 soul.demarkus.io:6309 claude-code
  9. /demarkus-library/debt.md published · edition 35 soul.demarkus.io:6309 claude-code
  10. /demarkus-library/journal/2026-12-01.md appended · edition 4 soul.demarkus.io:6309 claude-code
  11. /demarkus-library/debugging.md appended · edition 27 soul.demarkus.io:6309 claude-code
  12. /demarkus-knowledge-system-deploy/journal/2026-11-27.md appended · edition 4 soul.demarkus.io:6309 claude-code
trail
  1. soul.demarkus.io:6309 v1
  2. activity