webviews: bun run check runs every piece and fails at the end

Merged
TE
7d ago
+102-7

bun run check in webviews was one && chain. Today a red text-focus guard (AddDeviceView.swift:164, from 1e6efa8c455) stops it, so fmt, lint and the type check never run. That affects a local bun run check (which CLAUDE.md tells every agent to run before pushing), the web-bundles dispatch and iroh-v2. The AddDeviceView fix itself is a separate fix-forward owned by land-and-ci; this PR makes sure no single guard can hide the rest again.

  • The chain moves unchanged to check:pieces. check runs scripts/cmux-next/run-check-pieces.py, which runs every piece with node_modules/.bin on PATH, prints each one's output under a ==> piece header, lists every red piece at the end and exits 1 if any failed.
  • ci-web's webviews-check step (the non-warn branch) and the pre-push lint (web_lint_prepush.check_pieces) already ran the pieces one by one. They now read them from check:pieces, falling back to check for packages without one (cmux-tui/frontends/web).
  • Two existing tests that read the list from check now read check:pieces the same way: test_every_part_of_bun_run_check_runs_in_the_warn_branch and test_format_never_hides_lint_or_type_errors.

Changelog

none

Testing

  • New: CheckPiecesTests in tests/test_web_lint_prepush.py.
    • A red piece doesn't stop the ones after it, and the runner exits 1 naming both reds.
    • All green passes.
    • The real webviews check runs the runner, and check:pieces still has text-focus, fmt, lint and the type check.
    • The pre-push lint reads check:pieces, with check as the fallback.

Observed / Not run

  • Observed: tests/test_web_lint_prepush.py 32 OK. test_cmux_next_fast_gates OK. test_cmux_next_checks_workflow.py: the check-pieces test passes; 14 PushPreflight and SwiftCanary tests fail the same way on base. actionlint ci-web.yml clean. prepush-gate.py: no new violations.
  • Not run: a full bun run check in webviews on this Mac; CI's react-apps-check runs it.

Risk: normal (CI and lint tooling; no app code).

Agent session: cosmic-gray

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

bun run check in webviews no longer stops at the first red guard; it runs every piece and fails at the end, listing all red pieces.

Refactors

  • The old && chain moves to check:pieces; check runs run-check-pieces.py.
  • CI's webviews-check step and the pre-push lint read their piece lists from check:pieces, falling back to check.
  • The runner is tracked in check-paths, so changes to it mark fast-gates results stale.