Skip to content

feat(frontend): Phase 0 verification harness (the frontend-ready gate)#186

Merged
touchthesun merged 1 commit into
mainfrom
feat/frontend-phase0-harness
Jul 2, 2026
Merged

feat(frontend): Phase 0 verification harness (the frontend-ready gate)#186
touchthesun merged 1 commit into
mainfrom
feat/frontend-phase0-harness

Conversation

@touchthesun

Copy link
Copy Markdown
Contributor

Phase 0 of the v1 frontend build (PRD #184, tracking #185): the automated success signal that makes the rest of the build safe to run in an unattended coding-agent loop. No product features here — just the gate every later slice must pass.

Closes #185.

What's in the gate

make frontend-ready (or npm run frontend-ready) — stops at first failure, exits nonzero:

  1. typechecktsc -b, including the generated API types
  2. lint — ESLint (flat config; correctness-focused, mirrors the Python side's narrow ruff selection)
  3. unit — Vitest + Testing Library + MSW
  4. buildtsc -b && vite build
  5. e2e (mocked) + a11y + screenshots — Playwright + @axe-core/playwright

Key decisions (from the design discussion)

  • Hybrid E2E: default mocked lane (MSW-style, deterministic, no backend) shares fixtures with the unit tests; opt-in real-api lane (npm run e2e:real) hits the live OHM API via the dev proxy. Best of both for loop reliability + real-wiring validation.
  • Typed API client generated from /v1/openapi.json (committed; regen via npm run gen:api), so backend contract drift becomes a compile error.
  • shadcn/ui pinned as the design-system vocabulary.
  • Reusability seam: generic harness/ core + per-project harness.config.json, so the harness can later lift into a scaffold-web-ui-harness skill for other projects (secondary goal, structured for extraction).

Proven working

The gate was verified to go red at the correct stage for a deliberately injected failure at each layer, then revert clean:

Injected break Gate result
type error ✗ FAILED at typecheck (exit 2)
failing unit assertion ✗ FAILED at unit (exit 1)
failing e2e assertion ✗ FAILED at e2e (exit 1)
(reverted) ✓ all stages passed (22.6s)

Fixes the harness surfaced in the existing app

  • NavBar label contrast (WCAG 1.4.3 color-contrast, 2.63:1 → passes).
  • Missing Vite @/ alias resolver (needed for @/ imports).
  • Repo-root .gitignore lib/ pattern was swallowing shadcn's src/lib/ — un-ignored so utils.ts is tracked.
  • Legacy RfqView conditional-hook annotated (RFQ is out of v1 scope; page slated for rebuild).

After merge

frontend-dev (the feature-slice integration branch) branches from main with this harness in place. Next: slice PRD #184's journeys into tracer-bullet issues and start the bounded loop.

🤖 Generated with Claude Code

Stands up the automated success signal for the v1 frontend build (PRD #184,
Phase 0 #185) before any feature work — a coding agent can build against this
unattended because "done" is now machine-checkable.

Harness (`make frontend-ready` / `npm run frontend-ready`), stops at first fail:
- typecheck (tsc -b, incl. generated API types) → lint (eslint) → unit
  (vitest + Testing Library + MSW) → build (vite) → e2e mocked lane
  (Playwright) + a11y (axe) + screenshot capture.

- E2E hybrid: default MSW-mocked lane (deterministic, no backend) shares
  fixtures with the unit tests; opt-in `e2e:real` lane hits the live API.
- Typed API client generated from /v1/openapi.json (committed; regen via
  `npm run gen:api`) so backend contract drift is a compile error.
- shadcn/ui pinned as the design-system vocabulary; smoke tests at unit,
  component, and e2e layers.
- Reusability seam: generic harness/ core + per-project harness.config.json,
  so it can later lift into a scaffold-web-ui-harness skill.

Fixes surfaced by the harness against the existing reference app: NavBar
contrast (WCAG 1.4.3) and a Vite `@/` alias resolver gap. Legacy RfqView
conditional-hook annotated (RFQ is out of v1 scope, page slated for rebuild).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@touchthesun touchthesun merged commit 3fb4eef into main Jul 2, 2026
5 checks passed
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.

Phase 0: frontend verification harness (the frontend-ready gate)

2 participants