open-code-review/internal/viewer
chethanuk 14f1c22a60
feat(viewer): dark mode + system monospace font (#304) (#312)
Enhance the embedded viewer stylesheet per #304:

- Add automatic dark mode via `prefers-color-scheme` (no JS/toggle).
  The full colour palette — surfaces, text, borders, accents, task/badge
  brand colours — lives in `:root` custom properties, with a single dark
  block overriding the values. Light-mode colours are unchanged.
- Declare `color-scheme: light dark` so native scrollbars and form
  controls follow the active theme.
- Use the system monospace stack (`ui-monospace, ...`) via a `--mono`
  variable, replacing the hardcoded font stacks.
- Dark tokens chosen to clear WCAG AA (>=4.5:1) for small text, and dim
  brand colours (task-main, task-default) lifted for the dark surface.

Verified by rendering all three viewer pages in light and dark with a
headless browser: computed colours, contrast ratios, resolved theme
variables, and `color-scheme` asserted programmatically.
2026-07-08 13:06:02 +08:00
..
static feat(viewer): dark mode + system monospace font (#304) (#312) 2026-07-08 13:06:02 +08:00
templates feat(viewer): make human readable token usage for session (#278) 2026-07-03 12:01:46 +08:00
handler.go feat: init 2026-05-20 22:03:52 +08:00
handler_test.go fix: skip permission-based tests when running as root in CI 2026-06-27 00:42:41 +08:00
hostguard.go fix(viewer): add Host-header allowlist to block DNS rebinding (#10) 2026-06-03 17:21:27 +08:00
hostguard_test.go style: apply go fmt formatting 2026-06-03 17:34:28 +08:00
server.go feat(viewer): make human readable token usage for session (#278) 2026-07-03 12:01:46 +08:00
server_extra_test.go test: improve coverage for viewer package from 35% to 92% 2026-06-27 00:34:12 +08:00
server_test.go feat(viewer): make human readable token usage for session (#278) 2026-07-03 12:01:46 +08:00
store.go fix(viewer): use real API token usage in session page instead of tiktoken estimates 2026-06-06 21:17:47 +08:00
store_load_test.go fix: skip permission-based tests when running as root in CI 2026-06-27 00:42:41 +08:00
store_test.go fix: stabilize TestDiscoverRepos_FindsRepos with explicit mtime ordering 2026-06-26 23:31:51 +08:00