Files
KomediruzeckiandGitHub 0ad77d365f feat: dark mode auto-detect, 404 page, loading skeletons (#389)
Three features, plus fixes for four defects found reviewing them.

Dark mode now resolves as explicit user choice -> system prefers-color-scheme
-> dark default, both in the pre-paint stamp and the theme store, and follows
live OS changes while no choice is pinned. Unknown hash routes render a 404
page. Dashboard, Transactions and Budgets show shaped placeholders instead of
the bare "Loading..." text they rendered before.

What the review corrected:

1. The skeletons printed "Loading..." on screen. Every block ended with a
   `<span class="sr-only">` and no .sr-only rule exists anywhere in this app,
   so the text rendered plainly right beside the placeholder meant to replace
   it. The accessible name carries the announcement now.

2. `#logs` and `#reset-password` hit the 404 page — a regression. Settings
   drives its diagnostics panel from `#logs` and the reset screen owns
   `#reset-password`, so "View Logs" landed on the error page and finishing a
   password reset stranded the user there. Resolution moved to
   core/hashRoute.ts, which declares those routes so the catch-all only catches
   genuinely unknown fragments. That also settles a drift between the two
   copies App.tsx carried: the initial parse sent an empty hash to the
   dashboard while the hashchange listener ignored it.

3. Following the system theme worked exactly once. The matchMedia listener
   applied changes through setTheme, which persists, so the first OS switch was
   read back forever after as an explicit choice. Applying and persisting are
   now separate.

4. Skeletons were invisible on the light theme — --skeleton-base and
   --skeleton-shine were referenced but defined in no theme, leaving white at
   4-8% opacity — and one chart bar computed to -7.5%, not a valid length, so
   it never drew.

Also: props are read through accessors rather than frozen at setup (a Solid
body runs once); SkeletonPage composes the same blocks instead of duplicating
their markup and is the single live region; Budgets keeps the `loading-state`
test id three other pages key on.

21 tests added where the branch had none; the eight covering the defects above
fail against the previous code. Full E2E run locally against the real stack:
504 passed, 1 skipped.
2026-08-21 01:53:38 +02:00
..