Files
Claude 878111f794 refactor(report): extract shared @vigiles/report-view via npm workspaces
Stage 1 of the hosted-demo work: the audit report view must be a genuinely
shared package so report/, site/, and the future in-browser demo all render the
SAME AuditReport JSON through the SAME components — never a screenshot, never a
duplicated/relative-cross-imported component (the landing-site skill's shared-UI
invariant, and the prerequisite Fable's demo brief names).

- New packages/report-view (@vigiles/report-view, source-only/private): the
  presentational components, the AuditReport schema (mirrors src/audit-report.ts,
  pinned by src/audit-report.test.ts), band tokens, and theme.css. report/src/*
  moved here (git renames); internal @/ imports rewritten relative.
- report/ consumes it; report/src is just the app shell (main.tsx + index.css,
  which @sources the package + @imports its theme — Tailwind v4 ignores node_modules).

Wired as npm WORKSPACES (root workspaces:[packages/*,report,site]) so deps hoist
to root and resolve with zero config (no preserveSymlinks). Four aligned changes
kept the published vigiles package's CI green: root lockfile regen, pages.yml
builds site via the workspace (cd site && npm ci would fail with no per-package
lock), build-report.mjs checks root node_modules for its install-guard, and the
per-package lockfiles are removed. Verified with a clean-room
rm -rf node_modules && npm ci && npm run build (+ tsc, fmt, site build, report
renders styled). Design + Stage-2 demo brief in
research/report-view-and-hosted-demo.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 03:49:54 +00:00
..