Skip to content

scripts: bun run test:tui draws the lanes of test:all live, on packages/tui - #409

Merged
shreeve merged 6 commits into
mainfrom
tui/test-live
Sep 22, 2026
Merged

shreeve merged 6 commits into
mainfrom
tui/test-live

Conversation

@shreeve

@shreeve shreeve commented Sep 22, 2026

Copy link
Copy Markdown
Owner

A live front end for the repo's own test run, built on packages/tui — the framework in daily use. bun run test:all is unchanged.

Shared lanes. scripts/lanes.mjs plans, runs and reads the lanes behind one event interface (plan, start, chunk, finish, end); scripts/test-all.mjs is its plain front end and prints what it printed: --plan pinned byte for byte, plain and painted, and 14 fixture runs (green, red, painted, skip, CI skip, timeout, bad flags, …) matching the original's stdout, stderr and exit code with timings masked. An aborted run kills every process under its lanes, whatever group each put itself in (bun test --parallel workers lead their own), pinned in test/spawn/cli/test-all.test.js.

bun run test:tui (scripts/test-live.rip): a header with a ticking clock; a strip of one cell per lane (waiting, running, passed, failed, skipped); an overall bar at eighth-block precision with an ETA weighted by each lane's last duration; a row per lane in flight with its own spinner and a bar that fills against its last run — by test count where the lane streams one line per test, else by time — graded cyan to green, amber past its usual time and red past double; finished lanes scrolling into the scrollback as aligned rows with a duration bar and the change from last run; a red failure card with the test, expected and received, and file:line as a link, ↑↓ between cards, Enter for the lane's full output, f for failures only; the terminal's own progress indicator; at the end, every failing lane's output exactly as the plain runner prints it, a summary card (totals, wall time against last run, the parallelism, the slowest lanes, a verdict), and the plain runner's exit code. .rip/test-last.json (ignored) keeps the last run's durations and counts. Piped, under CI, or with --plan, it runs the plain runner.

It costs about 0.5 ms of CPU a frame at one frame per 100 ms tick; end to end under a real pty, 67.2–69.5 s against the plain runner's 67.7–70.1 s.

Tests: packages/tui/test/live.rip (14, headless through mount, the lane events fed by hand), the --plan byte pin and the process-tree abort. bun run test:all: 29 lanes, 12,691 tests.

@shreeve
shreeve merged commit c4d417f into main Sep 22, 2026
2 checks passed
@shreeve
shreeve deleted the tui/test-live branch September 22, 2026 23:09
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.

1 participant