Skip to content

Give the two viewers one shared visual language - #8

Open
plearaj wants to merge 1 commit into
masterfrom
feature/viewer-visual-refresh
Open

Give the two viewers one shared visual language#8
plearaj wants to merge 1 commit into
masterfrom
feature/viewer-visual-refresh

Conversation

@plearaj

@plearaj plearaj commented Aug 8, 2026

Copy link
Copy Markdown
Owner

A design pass on templates/shared/viewer.template.html and templates/shared/report.template.html. Presentation only — no behavior change, no new controls, no dependency.

The two files install side by side into .code-flow/ and their outputs land side by side in Code_Flows/, but until now they shared only a localStorage key. They now share a token set: a warm paper light theme and a cool slate dark theme, one type scale, one spacing rhythm, one shadow treatment.

What did not change

  • validate() in either file, and neither sentinel moved — verified: zero lines matching the validator's own patterns appear in the diff.
  • Exactly one data token per file, and the runtime "__FLOW" + "_DATA__" reassembly.
  • No network reference of any kind. The only http:// occurrences are the two SVG XML namespaces, which is what test_scaffold_is_self_contained excises.
  • innerHTML appears only as = "".
  • No test regex was touched and no pinned copy was reworded. The honesty phrasings are load-bearing and were left exactly as they were.

Accessibility

color-scheme is now set in both files, closing a minor from the Phase 3b final review — the report viewer ships the product's only <select> elements, and their popups and the page scrollbars previously rendered in the OS theme rather than the page's.

Measured in the browser against real fixture data:

light dark
body text 13.17:1 14.34:1
severity chip 5.62:1 5.58:1

Severity is never carried by hue alone — the chip states HIGH / MEDIUM / LOW in words at weight 700.

Verification

uv run --group dev pytest -q     249 passed
npm test                          33 passed

Beyond the suites, the pages were driven in a browser against examples/sample-report.json and examples/sample-flow.json:

  • Populated report — renders; coverage leads; "catalogued" not "all".
  • Empty findings, the screen this product most needs to get right — zero green-dominant elements, zero checkmark or celebration glyphs, reads "No findings — clean within what was mapped" and "never a clean bill of health". The filter bar is not constructed at all in that branch, so no empty container reads as a pass.
  • Malformed JSON — the error card is genuinely visible (offsetHeight > 0), carrying the parser message and the </ escaping tip. This is the one thing the suite structurally cannot verify.
  • Flow viewer — 37 rendered elements, a 660×908 graph bbox, no error card.

Screenshots could not be captured. The Browser pane does not composite frames in this environment, so verification was DOM and computed-style level, not pixel level. The repo's mandated pre-publish manual browser pass (npm run release-check) remains the pixel check and is not satisfied by this PR.

Known, not fixed here — both pre-existing

  • On the malformed-JSON path the theme script never runs, so the error card ignores the OS dark preference. Affects both scaffolds and predates this change.
  • The flow viewer's clickable sidebar rows are mouse-only — no keyboard affordance. A real accessibility gap, out of scope for a visual pass.

🤖 Generated with Claude Code

The flow viewer and the quality report install side by side and render
side-by-side artifacts, but only shared a localStorage key. Both now
draw from one token set: the same dark/darker/code surface stack, the
same warm-paper light theme, one accent, one border/radius/shadow
scale, and the same chip, label and button treatments.

Design notes:
- color-scheme is set per theme in both files, so the report's native
  <select> controls and both pages' scrollbars follow the page theme.
- Real :focus-visible rings on every control in both files.
- Severity chips no longer rely on hue alone: high is a solid fill,
  medium is outlined in its own color, low stays neutral — and each
  chip names its level in words. Unverified-confidence chips carry a
  dashed border so provisional findings read as provisional in any
  palette.
- Graph nodes get a per-kind stroke over the per-kind fill, and the
  legend swatches borrow the same stroke so they match the canvas.
- Report line length tightened (880 -> 820), snippets sit on a third
  code surface inside the site boxes, suggestions separate with a
  hairline instead of floating.
- 32px hit targets on header controls; aria-labels on the viewer's
  search box and theme toggle.
- Light-theme dim/accent tones darkened to hold 4.5:1 on their
  surfaces; the dark theme's solid high chip keeps ~5.6:1.

The honesty surfaces are restyled but unchanged in meaning: coverage
still leads and cannot collapse, the no-findings screen stays amber
with no pass styling, unreached copy still reads candidate-never-
verdict, and findings still render in the JSON's order. No copy
changed; both suites pass untouched (249 Python, 33 Node).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant