Dark mode — auto + manual toggle, system-preference default #2
Open
opened 2026-04-30 00:51:57 +00:00 by mAi
·
2 comments
No Branch/Tag Specified
main
mai/knuth/healthcheck-fast-start
mai/linus/national-court-addresses
mai/linus/upc-addresses-confirmed
mai/knuth/court-address-confirmed
mai/linus/dryrun-cumulative-probe
mai/knuth/provenance-sources-drift
mai/linus/privilege-residuals
mai/knuth/court-address-structured-postal
mai/linus/snapshot-privileges-stripped
mai/linus/source-14-court-addresses
mai/knuth/export-schema-collision-guard
mai/knuth/publishstate-schema-tolerance
mai/knuth/catalogue-export-section
mai/linus/courts-export-paliad
mai/knuth/revendor-wiki-help-text
mai/knuth/narrow-assess-to-the
mai/knuth/editor-four-part-fix
mai/knuth/editor-first-real-edit
mai/knuth/wire-build-patentstyle
mai/ritchie/build-patentstyle-unguarded
mai/knuth/rescue-cited-design
mai/ritchie/vendor-guard-first-catch
mai/knuth/stale-branch-triage
mai/ritchie/stale-negative-claims
mai/knuth/reset-form-language-and-email
mai/knuth/adopt-mauth-module
mai/knuth/reset-link-scanner-safe
mai/knuth/registry-coherence-139-postscript
mai/ritchie/db-test-packages-sh-and
mai/knuth/gen-skeleton-submission
mai/knuth/retire-skeleton-generator-tier5
mai/jason/seed-orphan-drafts-guard
mai/knuth/ci-lane-no-dsn
mai/jason/seed-script-prod-guard
mai/knuth/skeleton-doccomment-completeness
mai/brunel/harness-findings-postscript
mai/hades/dead-surface-sweep
mai/brunel/views-eventkind-flake
mai/jason/issue-158-service-address
mai/knuth/issue-139-letterhead-vars
mai/cronus/issue-148-trigger-picker
mai/hades/issue-155-followup
mai/hades/issue-155-naming
mai/brunel/escalation-visibility-flag
mai/jason/alles-overrides-horizon
mai/knuth/m-paliad-150-part-b-m
mai/hades/issue-161-zustandigkeit
mai/cronus/m-paliad-160-per-user
mai/jason/issue-163-parties-role
mai/ares/issue-162-one-convention
mai/brunel/m-paliad-115-the-sweep-s
mai/goodall/for-every-check-in-this
mai/knuth/land-darwin-s-follow-up
mai/diesel/guard-report-lib
mai/diesel/issue-139-slice-b
mai/diesel/issue-139-letterhead-vars
mai/darwin/148-crossparty-ui
mai/diesel/m-paliad-158-a-stale
mai/darwin/vacation-doc-warnings
mai/darwin/upc-vacation-findings
mai/darwin/rop-citation-fix
mai/darwin/issue-150-holidays
mai/ritchie/build-the-block-editor
mai/darwin/swallowed-cleanup-errors
mai/darwin/formalities-refusal-schema4
mai/darwin/drift-caveat-shape
mai/darwin/http-smoke-enforcing
mai/darwin/s6-round-3
mai/darwin/loops-acting-user
mai/darwin/s6-rehearsal-round-2
mai/darwin/close-the-s6-blockers
mai/darwin/rehearse-the-s6-flip
mai/knuth/drilling-the-scheduled
mai/brunel/21-test-files-under-pkg
mai/atlas/design-hlc-com-as
mai/hopper3/a-hand-run-can-advance
mai/grace4/re-vendor-mai
mai/grace3/vendor-the-nine-german
mai/head/slug-rule-contract
mai/head/vendor-contract-note
mai/grace2/wiki-generator-language
mai/marco/verify-the-outlook-add
mai/pike2/an-explicit-begin-commit
mai/noether5/remove-the-paris-p3-and
mai/lexy2/r2-backfill-procedural
mai/kepler/issue-502-hl-to-hlc
mai/hertz2/r4-litigationplanner
mai/shannon2/docker-compose-yml-never
mai/linus2/r3-finish-the-b-5
mai/zeus2/guard-no-live-sql-string
mai/galileo2/the-embedded-upc-planner
mai/kepler2/slice-b-procedural
mai/diesel2/mig044-erwiderung-repair
mai/diesel2/fresh-db-replay-past-mig
mai/head/gen-upc-snapshot-dead-table
mai/noether4/offices-export-regen-201
mai/noether4/base-p1-genericize-m
mai/hopper/finish-the-half-built
mai/pike/dead-migration-tests
mai/linus/audit-comment-fix
mai/linus/fristensuche-82-search
mai/linus/b7-checklists
mai/linus/b8-frontend-pure-logic
mai/pike/b5-auth-path-coverage
mai/diesel/rule-test-resync
mai/diesel/regression-m-confirmed
mai/patton/b1-make-the-dormant-test
mai/athena/test-gap-audit-map
mai/diesel/kostenrechner-bug-upc
mai/hopper/patentsstyle-styleguide
mai/pike/re-render-patentsstyle
mai/linus/firm-footer-officelanguag
mai/carmack/re-render-deploy
mai/diesel/fresh-db-bootstrap
mai/pike/follow-up-gen-template
mai/turing/docforge-flip
mai/cronus/bighand-delimiter-constant
mai/ritchie/composer-delete-all
mai/atlas/inventor-followup-rules
mai/knuth/coder-conditional-rule
mai/cronus/inventor-ci-cd-pre
mai/demeter/gitster-submission
mai/atlas/inventor-per-event-card
mai/cronus/inventor-procedural
mai/cronus/inventor-backup-mode
mai/icarus/inventor-inbox-overhaul
mai/atlas/inventor-symmetric-date
mai/gauss/inventorcoder-team-admin
mai/kepler/inventorcoder-project
mai/darwin/roadmap-ccr-en
mai/euler/coder-small-ux-polish
mai/darwin/fristenrechner-cleanup
mai/darwin/fixercoder-priority-bug
mai/leibniz/inventor-caldav-multi
mai/hertz/inventor-unified-modal
mai/archimedes/inventor-excel-data
mai/boltzmann/inventor-gap-tolerant
mai/copernicus/submission-slice-1
mai/fermi/interactive-session
mai/hertz/inventor-suggest-changes
mai/copernicus/inventor-submission
mai/mendel/test-strategy-slice-1
mai/ampere/custom-views-improvements
mai/planck/paliadin-per-user-rls
mai/ritchie/phase-h-ai-deadline
No results found.
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: m/paliad#2
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
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?
Paliad has zero dark-mode support today (no
prefers-color-scheme, nodata-theme, no toggle). Out of scope on t-paliad-063 (brand palette) but worth picking up now since the HLC palette already anticipates it:--hlc-midnight(#002236) is the natural dark-bg,--hlc-cream(#EEE5E1) is the light-bg,--hlc-limeaccent works on both.Approach
Two palette sets at
:rootand:root[data-theme="dark"]. Toggle stored inlocalStorage; default =prefers-color-schemefrom the browser. Add a small toggle button in the sidebar (sun/moon icon) and persist user preference.Scope
:root(light) and:root[data-theme="dark"](dark). Components that already read from--hlc-*tokens get dark mode for free. Components that hardcoded white / light grey / shadows need an audit.#fff,#f...,rgba(0,0,0,...),box-shadowbrightness assumptions. Replace with theme-aware tokens (--surface-bg,--surface-fg,--border,--shadow).localStorage["paliad-theme"]. Apply on initial render via inline<script>in<head>to avoid FOUC.Acceptance
cd frontend && bun run buildcleanTest creds
tester@hlc.de/xdMmC7iCeDSTFmPXAlAyY0.Out of scope
Files (likely)
frontend/src/styles/global.css(palette swap + audit)frontend/src/components/Sidebar.tsx(toggle UI)frontend/src/client/theme.ts(new — load/persist + apply preference)frontend/src/index.htmlhead inline script (FOUC-prevention)Shipped — merged to main as
8ddfb94(feature commitfee6afd).What landed:
:rootand:root[data-theme="dark"]. New tokens:--color-surface-{2,muted},--color-input-bg,--color-overlay-{faint,subtle,strong,modal},--color-border-strong,--shadow-{lg,xl},--status-{red,amber,green,blue,neutral}-{bg,fg,border,...},--tree-icon-{client,litigation,patent,case,project},--sidebar-scrollbar-*.<script>inPWAHead.tsxruns synchronously in<head>BEFORE the stylesheet loads. Readspaliad-theme,paliad-sidebar-pinned, andpaliad-sidebar-widthfromlocalStorage; sets<html data-theme="dark">,<html class="sidebar-pinned">(desktop only) and--sidebar-width.client/theme.tsowns the runtime side: cycle auto → light → dark → auto, listen toprefers-color-schemewhile pref=auto, broadcast change events to the sidebar toggle so the icon/label tracks live state (incl. OS-level theme flips).theme.toggle.{auto,light,dark}for the label,theme.toggle.cycle.{auto,light,dark}for the aria-label/tooltip describing the next click).<html>so layout doesnt flicker on navigation.client/sidebar.tsmirrors the class on<html>on every pin toggle so the new selector:root.sidebar-pinned .has-sidebarstays in sync with the existing.has-sidebar.sidebar-pinned(body) selector.scrollbar-gutter: stable..sidebar-iconwidth shrinks byvar(--sidebar-scrollbar-width)so the collapsed icon column doesnt shift left when the nav overflows on tall (admin) layouts.--color-input-bg—#ffffffin light mode (m: 2026-04-30 — the cream--color-bgmade inputs blur into the body) and#00192a(slightly below--color-surface) in dark mode so the well stays depressed below the card panel.global.css.Smoke (Playwright on local server):
/loginin both modes — body bg/fg/cards/inputs read from the right tokens, FOUC script lands in<head>before the stylesheet, light-mode inputs render#ffffff, dark-mode inputs render#00192awith lime focus border.Build:
cd frontend && bun run buildclean (1224 i18n keys, 36 pages).Close this once verified in prod after the auto-deploy.
Followup: m flagged that agenda cards still rendered light-grey in dark mode. Root cause was several rules referencing non-existent fallback tokens (
--color-surface-subtle,--color-surface-0) — the CSS resolved to the hardcoded#f3f4f6/#f9fafb/#fffffffallbacks in both themes. Swept those plus a long tail of remaining#fef3c7/#fee2e2/#dcfce7/#dbeafe/#f3f4f6literals across agenda, dashboard cards, dashboard urgency, frist-due-chip, akten-status, projekt-tree, admin-audit, akten-chip, team-office-badge, form-warn, akten-unavailable, dashboard-unavailable, frist-cal — they now read--status-*and--color-*tokens directly so the dark swap is automatic. Bottom-of-file dark override block trimmed (was duplicate work).Merged followup
22156f0→ main31afab0.Smoke (Playwright): agenda card link reads
rgb(10,48,71)in dark /#ffffffin light; urgency-overdue chip reads alpha-tinted red in dark / saturated pastel-red in light. No more light-grey leakage.