Skip to content

umbrella: frontend coverage debt — 11 files have shallow tests, blocked by missing Playwright suites #1297

@Kpa-clawbot

Description

@Kpa-clawbot

Frontend coverage debt — 11 HIGH-priority files have shallow/zero test coverage

Aggregate frontend coverage today: 40.02% statements (latest .badges/frontend-coverage.json).

Audit report: notes/frontend-coverage-audit-2026-05-19.md (workspace-local; copy-pasted summary below).

Goal

70%+ statements per file for the 11 🔴 HIGH-priority files (~9.4k LOC). Estimated lift on the aggregate badge: 40% → ~55–60%.

Approach

Parallel fixer subagents, each owning one batch (3–5 files of related surface). Each batch lands as a single PR adding Playwright E2E suites (plus unit tests where the surface is pure logic). One umbrella tracks five sub-tasks.

Counts (from audit)

  • 🔴 HIGH: 11 files
  • 🟡 MED: 24 files
  • 🟢 LOW: 6 files

Per-batch sub-tasks

  • Batch 1 — audio-batch: audio.js, audio-v1-constellation.js, audio-lab.js. E2E: navigate /#/audio-lab, toggle modes, assert AudioContext + visualizer DOM; for audio.js inject mock packets and assert mute toggle.
  • Batch 2 — mobile-chrome-batch: bottom-nav.js, nav-drawer.js, touch-gestures.js, drag-manager.js. E2E at mobile viewport (375x812): tap nav, swipe drawer, drag customizer cards; assert route changes, drawer aria, reorder persistence.
  • Batch 3 — observer-batch: observer-detail.js, traces.js, node-analytics.js. E2E: visit each page-module's route with a seeded id, exercise tabs and panels.
  • Batch 4 — customizer-batch: customize-v2.js (1774 LOC — likely split into 2–3 E2E suites: presets, column editor, persistence).
  • Batch 5 — util-batch: table-sort.js. Multi-page E2E clicking <th> on every table-bearing route + comparator unit tests.

Top 5 most-impactful HIGH files

  1. customize-v2.js (1774 LOC) — single biggest under-tested surface
  2. touch-gestures.js (455 LOC) — gesture math, chrome-loaded
  3. nav-drawer.js (366 LOC) — drawer a11y/focus-trap
  4. observer-detail.js (355 LOC) — page module, zero tests
  5. bottom-nav.js (323 LOC) — primary mobile nav, zero direct tests

Notes for the fixer chain

  1. Run real coverage first. Spin up the Go server on :13581, run node scripts/collect-frontend-coverage.js, overlay real per-file % onto the HIGH list — it may demote or promote a file.
  2. customize.js (1510 LOC, NOT in index.html script tags) is dead — confirm and delete in a separate PR rather than testing it.
  3. Chrome-loaded files require driving them from multiple pages; page-module files only need their one route. Don't conflate.
  4. PRs should land via the standard pipeline (fix-issue → CI → pr-polish), one batch per subagent, in parallel.

Reference

  • Audit report (workspace): notes/frontend-coverage-audit-2026-05-19.md
  • Coverage collector: scripts/collect-frontend-coverage.js
  • Current badge: .badges/frontend-coverage.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions