Implementation spec for the Phase 17.10 visual regression coverage of dense-data admin surfaces. Goal: lock in the V1 operator experience bar so future panel changes cannot silently drift the visual language.
Scope#
Visual regression screenshots covering:
- Severity stripe rendering at all four levels (V1-AWEB-098).
- Dense table density in both
comfortableandcompactmodes (V1-AWEB-093 + V1-AWEB-095). - Master-detail split at 1280px / 1920px / 2560px (V1-AWEB-094).
- Provenance trust card in all four severity outputs (V1-AWEB-097).
- TextDiff highlighting on insertion / deletion / mixed (V1-AWEB-097).
- AuditTimeline day grouping + per-event-kind icons (V1-AWEB-097).
- AdminConfirmationModal at the three-subsection layout (V1-AWEB-099).
- CopilotHealthPanel + WorkspaceSummaryCard grid on
/(V1-AWEB-093).
Tooling#
Use Playwright's built-in screenshot comparison
(expect(locator).toHaveScreenshot()). Tolerance: maxDiffPixelRatio: 0.001
(0.1% per surface).
Snapshots live under apps/oshun/admin/e2e/__screenshots__/<spec-name>/.
Snapshots are regenerated only via the explicit
playwright test --update-snapshots flag; CI fails on any diff.
Spec layout#
apps/oshun/admin/e2e/visual-regression-dense-data.spec.ts:
ts
test.describe('V1-AWEB-104 visual regression — dense data', () => {
test('severity stripes — 4 levels at comfortable density', ...);
test('severity stripes — 4 levels at compact density', ...);
test('master-detail split — 1280×800', ...);
test('master-detail split — 1920×1080', ...);
test('master-detail split — 2560×1440', ...);
test('ProvenanceTrustCard — valid', ...);
test('ProvenanceTrustCard — pending', ...);
test('ProvenanceTrustCard — invalid', ...);
test('ProvenanceTrustCard — mixed absent', ...);
test('TextDiff — insertion highlight', ...);
test('TextDiff — deletion highlight', ...);
test('TextDiff — mixed insertion + deletion', ...);
test('AuditTimeline — multi-day grouping', ...);
test('AdminConfirmationModal — typed confirmation', ...);
test('CopilotHealthPanel + WorkspaceSummaryCard grid', ...);
});
15 spec entries → 15 baseline screenshots.
Snapshot hygiene#
- Snapshots are committed to the repo under
apps/oshun/admin/e2e/__screenshots__/. - Updates to a snapshot require a corresponding PR description note explaining the visual change.
- Snapshots are only updated for intentional V1-AWEB-09x redesign changes; bug fixes that change pixels need a reviewed snapshot update with rationale.
Implementation deliverables#
apps/oshun/admin/e2e/visual-regression-dense-data.spec.ts— the 15-spec file.- Initial baseline snapshots committed to
apps/oshun/admin/e2e/__screenshots__/visual-regression-dense-data/. - PR template note added for snapshot updates (in the existing PR template
under
docs/).
Acceptance criteria#
- All 15 spec entries exist and pass on a clean baseline generation run.
- CI (when wired) fails on any diff > 0.1% per surface.
- Snapshot directory is committed to the repo (not gitignored).
- A snapshot update PR includes a rationale note.
Out of scope#
- Cross-browser visual snapshots (Chromium-only).
- Mobile / tablet snapshots.
- Animated state snapshots (the V1-AWEB-098 no-motion-on-render rule keeps the surface set static).