Repository navigation
feat(evidence): brand evidence viewer with filters, inspection and pinned search - #143
Merged
Merged
Conversation
…nned search Turn the finalized run report into the approved charcoal viewer: run, device and outcome summary, explicit empty, truncated and corrupt-journal states, device and scenario filters, a filmstrip with a full-size capture inspection view, and text search. Filters, inspection, actual-size and browsing are CSS-only (hidden radio inputs, sibling selectors, :target), so the report stays usable with scripts blocked. One self-contained inline script adds text search and arrow-key browsing; the report CSP admits it by the sha256 of the emitted script text and nothing else. Rendering stays pure, synchronous and deterministic, with every data-derived string on the existing redaction and escaping path and screenshot admission unchanged. Device metadata and acceptance outcome records are read through narrow local types until the manifest and journal changes land.
…counts Redact each search component before lowercasing it, so case-sensitive credential patterns cannot survive into the data-search index. Validate device metadata at runtime and fall back to unknown per field: a null or partial viewport, a non-boolean touch, a non-finite scale, a blank browser or platform, and an unlisted kind no longer crash or print half-values, and an unlisted kind falls back to the desktop lens. Always emit data-scenario, empty included, so the scenario rules exclude captures that belong to no scenario. Count only what the checked filter radios leave visible, recount when a filter changes, and name timeline matches separately from capture matches. The live count and the empty state are scripted state, so both are hidden while scripts are blocked; the server-rendered per-lens counts remain. Project the actual-size checkbox focus and checked state onto its label, prove exactly one src-less script whose text hashes to the CSP source, and correct the docs: filters, inspection and navigation work with scripts blocked, while search and arrow keys need the pinned script.
Resolve packages/core/src/evidence-render.ts by keeping the viewer rendering and swapping the local structural types for the shared ones: EvidenceDevice from run.ts, EvidenceOutcomeRecord and isOutcomeRecord from evidence-outcome.ts, and the EvidenceRecord union that now carries outcome records. The runtime validation of malformed device values stays, since bad journal data must still render as unknown. Outcome records are excluded from step numbering exactly once, by the partition that runs before sortEvidenceRecords, so the placeholder outcome article from main is dropped in favour of the outcome banners. The renderRunReport device and outcome lines from main are kept for the CLI text report, and the three tests that asserted the placeholder markup now assert the viewer's outcome banner.
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #117 (bullets 2, 3 and the rendering half of 6). Merge after #141 (device metadata and outcomes) and rebase to swap the local
ReportManifest/ReportOutcometypes for the shared ones.Turns the run
report.htmlinto the approved charcoal/ember viewer using the brand tokens: summary with device, revision and scenario, outcome banners for pass, fail, partial, blocked and none recorded, explicit empty, truncated and corrupt states, device and scenario filters with server-rendered counts, a filmstrip with per-capture inspection, and search.Interaction strategy: everything works with scripts blocked. Filters are hidden radio groups with sibling selectors, inspection is a
:targetview with previous/next anchors, an actual-size checkbox and an "open original" link, and controls are real links and inputs with visible focus. One self-contained inline script adds text search and arrow-key browsing; the CSP gains exactlyscript-src 'sha256-…'computed from that script's bytes at render time. No external scripts, no network, no eval or innerHTML. The session index CSP is unchanged. README, SECURITY.md and the unreleased notes now describe this instead of "no-script".Validation: typecheck and oxlint clean;
bun run test:coverage1655 passed with thresholds held (evidence-render tests 8 to 32: CSP hash equality, forbidden script tokens, escaping and redaction in new fields, legacy manifests, empty/truncated/corrupt states, determinism, path safety). Headless Chromium 1440 wide with--enable-logging=stderrprinted zero "Refused to" lines with scripts on and off. Screenshots kept locally under Boards/pickforge/117/viewer.Author: Opus subagent. Reviewer: separate Astra review.