open-code-review icon indicating copy to clipboard operation
open-code-review copied to clipboard

fix(viewer): make --surface white to match the mockup's card/table backgrounds

Open lizhengfeng101 opened this issue 2 months ago • 1 comments

Description

On the redesigned viewer, cards and tables render on --surface: #fafafa (a light grey), while the design mockups show them white, separated from the page by borders rather than a fill tint. It is most visible on the Repositories table, whose large fill area reads as grey against the white page instead of the mockup's white table.

Align --surface to white so cards/tables match the mockup.

Example — current vs. expected (light mode):

/* internal/viewer/static/style.css */
:root {
  --surface: #fafafa;  /* current — reads grey on the white page */
}
:root {
  --surface: #ffffff;  /* expected — white cards/tables, delineated by --border */
}

Scope

  • File: internal/viewer/static/style.css
  • Change the light-mode :root token --surface to #ffffff. Leave the dark-mode --surface (#0a0a0a) unchanged — it already sits above the black page.
  • Audit the elements that use var(--surface) as a background (e.g. .table, .token-summary, the accordion/card surfaces, nav.breadcrumb) and make sure each stays visually delineated against the now-white page via its existing --border (add a border only where an element previously relied on the surface-vs-background fill contrast). .table already has border: 1px solid var(--border), so it is covered.

Out of scope / decided

  • The green text/link color stays as-is. --link: #177d35 is intentionally darker than the mockup's #17cb4b: the brighter green is only ~2.2:1 as text and fails WCAG AA, so green text/links (including the repositories Check link) keep the AA-safe dark green. Do not change --link/--accent in this issue.
  • No per-screen background overrides — this is a single global token change.

Acceptance Criteria

  • [ ] Light-mode --surface is #ffffff; the Repositories table and other card surfaces read as white with visible borders, matching the mockup.
  • [ ] No surface visually merges into the page (every card/table stays delineated by a border).
  • [ ] Dark mode is unchanged and still renders correctly.
  • [ ] Tests pass (make test)
  • [ ] Code check passes (make check)

Context

Part of #1319; follows the palette alignment in #1361 (merged as #1365). Surfaced while reviewing #1382 (Repositories page): the table's grey fill and the Check link color were both traced to shared palette tokens, not to that page's PR. This issue covers only the surface token; the link green is deliberately left as the AA-safe dark green.

AI disclosure: The scope and decisions are my own. An AI assistant (Claude Opus 4.8) was used only to polish the English wording.

lizhengfeng101 avatar Sep 18 '26 03:09 lizhengfeng101

I'd like to work on this.

jimpablo avatar Sep 18 '26 03:09 jimpablo