Repository navigation
Open
Labels
complexity-mediumComplexity: medium (board points 5-8)priority-p2Importantstatus-readyGreenlit and ready for development (vetted; counterpart to status-incubating)theme-devexTheme: DevExtype-featureNew functionality
Description
Summary
The Trinity frontend currently has zero automated test coverage. There is no unit test runner, no E2E tooling, and (until PR #553) no CI workflow that even built the frontend on PRs. This is a project-wide gap that affects every UI change, not a #67-specific concern — surfacing it as a P2 ticket.
Current state
| Layer | Today | Coverage |
|---|---|---|
| Tailwind config / tokens | npm run check:tokens (added #553) |
Catches palette-alias drift + token typos |
| Build smoke | frontend-build.yml (added #553) |
npm ci && npm run build |
| Unit tests | — | None |
| Component tests | — | None |
| E2E / visual regression | — | None |
| Type checking | — | None (no tsconfig, no vue-tsc) |
src/frontend/package.json lists no vitest, jest, @vue/test-utils, playwright, cypress, or @testing-library/* dependency.
Proposed additions
Phase 1 — Vitest for unit + component tests
- Add
vitest,@vue/test-utils,jsdom(orhappy-dom) - Configure
vitest.config.jsco-located withvite.config.js - Cover the most leverage-y units first:
composables/useFormatters.js(formatters, color helpers)utils/syncHealth.js(status classification)- Pinia stores (
stores/agents.js,stores/auth.js) - Critical components (
StatusIndicator.vue,CapacityMeter.vue, status badges)
- Add
npm run testandnpm run test:watchscripts - Wire into CI (
frontend-build.yml)
Phase 2 — Playwright for E2E + visual regression
- Add
@playwright/test e2e/directory with smoke flows: login, agent list, agent detail, schedule create- Optional: visual snapshots for the migrated design-system components (issue Add centralized design system with semantic color tokens #67 follow-up)
- Run against dockerized stack in CI (separate job, allowed-to-fail initially)
Phase 3 — Type checking
- Add
vue-tsc - Strict mode opt-in per file/directory
npm run typecheckscript in CI
Acceptance
- Phase 1 minimum: Vitest installed, ≥10 representative unit/component tests, runs in CI on every frontend PR
- Phase 2 minimum: Playwright installed, ≥3 smoke E2E flows passing in CI
- Phase 3 minimum:
vue-tscpasses on at least the new test files andtailwind.config.js - All three runners wired into
frontend-build.yml(or sibling workflows) - Brief contributor docs in
src/frontend/README.mdexplaining how to run each layer
Why P2 not P1
- No production incidents from missing frontend tests yet (mitigated by manual review + small contributor pool).
- Backend tests are comprehensive (~2,000+ pytest tests).
- Adding test infra is a commitment — flaky tests, snapshot maintenance, CI time. Worth doing well, not rushed.
Cross-references
- Spawned from PR feat(frontend): semantic status color tokens (#67) #553 / issue Add centralized design system with semantic color tokens #67 review discussion — the design-system PR landed without component tests because no runner existed.
.claude/agents/test-runner.mddescribes the backend test runner. A frontend equivalent should be added once Phase 1 lands.
Metadata
Metadata
Assignees
Labels
complexity-mediumComplexity: medium (board points 5-8)priority-p2Importantstatus-readyGreenlit and ready for development (vetted; counterpart to status-incubating)theme-devexTheme: DevExtype-featureNew functionality
Activity
oleksandr-korin commentedon Apr 28, 2026
/claim
github-actions commentedon Apr 28, 2026
@oleksandr-korin This issue is already assigned to oleksandr-korin. Use
/unclaimfirst if you want to take over.docs(requirements): add 8.8 Frontend E2E Test Infrastructure entry (#556
feat(frontend): Playwright e2e harness gated on `ui` label (#556) (#571)
fix(e2e): more robust login + nav selectors
fix(e2e): handle emoji prefix in admin-login button + wait for JWT pe…
fix(e2e-ci): skip first-time setup wizard on fresh DBs
fix(e2e): make Playwright auth setup actually authenticate (#556) (#579)
feat(skills): add /test-runner-ui-e2e for Playwright e2e suite (#556) (…
refactor(frontend): migrate ApiKeys + tier e2e tests by @smoke tag (#554
refactor(frontend): migrate ApiKeys + tier e2e tests by @smoke tag (#554
3 remaining items
refactor(frontend): sweep agent surfaces — 22 files (#554) (#614)
Release: v0.6.0 (#998)
docs(releases): v0.6.0 release notes archive (#1016)
AndriiPasternak31 commentedon Jun 29, 2026
Fresh evidence this gap bites, from #1376 / PR #1377 (severed-turn Session reconcile):
That fix added genuinely intricate branching to the
sessionsPinia store — pre-send assistant/user baselines, a 429 concurrency short-circuit, a success-before-handoff ordering rule, and a wall-clock poll deadline routing to a neutral notice. All of it is logic that wants unit-level pinning, but the frontend has no unit runner, so the only available coverage was the Playwright e2e suite (T1–T8). The e2e tests are good, but they're heavier and slower than a store unit test would be, and they can't cheaply exercise every internal branch the wayvitestcould.This is the second recent Session-tab store fix (#779/#789 earlier) where complex reconcile/poll logic shipped e2e-only. The recurrence suggests the missing unit runner is now actively costing review/verification effort, not just a theoretical gap.
Not touching the priority label — this is your call and your zone — but flagging it as a candidate for a P1 bump / de-incubation given the pattern.
vitestfor the stores (sessions.js,agents.js, …) would have the highest immediate payoff.