Skip to content

feat(#540): experimental multi-issue TUI dashboard for sequant run - #542

Merged
admarble merged 2 commits into
mainfrom
feature/540-live-multi-issue-tui-dashboard
Apr 20, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/540-live-multi-issue-tui-dashboard

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Adds sequant run --experimental-tui — an ink-based live multi-issue dashboard (17/17 ACs addressed; AC-10 partial by design, see below).
  • New RunOrchestrator.getSnapshot() exposes a concurrent-read-safe view of the run; the TUI polls at 10 Hz.
  • Auto-falls back to the existing linear output when stdout is not a TTY; --quiet remains orthogonal.

Key design note

nowLine is phase-coarse in this milestone (running <phase>), not per-file as the mockup depicts. The richer activity line requires a data source that does not exist today (the claude CLI is spawned as an opaque subprocess). Deferred to a follow-up — called out in the spec comment.

Bundle-size impact

Three new runtime deps: ink (React-based TUI — mature wcwidth/cursor handling), react (ink peer), string-width. ink-testing-library + @types/react are dev-only. Cold CLI startup is unaffected because the TUI module is dynamically imported (await import("../ui/tui/index.js")) only when the flag is set and a TTY is detected.

Test plan

  • npm run build — clean
  • npm run lint — 0 warnings
  • Unit tests — 2548 passed, 15 new (snapshot API, theme rotation, width-aware truncation, IssueBox rendering)
  • Integration test — flag registered at all three layers, non-TTY fallback accepts flag
  • Manual smoke — real sequant run 1 2 3 --experimental-tui in a TTY (reviewer)
  • Manual smoke — pipe to tee; confirm linear fallback
  • Manual smoke — NO_COLOR=1; confirm structure survives
  • Manual smoke — Ctrl+C during run; clean shutdown

Closes #540

Adds an ink-based live dashboard behind `--experimental-tui` that renders
one three-cell box per issue (header / context / activity) with rotating
border colors, per-phase progression, and a 1 Hz elapsed timer. Auto-falls
back to the existing linear output when stdout is not a TTY.

- `RunSnapshot` / `IssueRuntimeState` types in `src/lib/workflow/run-state.ts`
- `RunOrchestrator.getSnapshot()` returns a freshly-allocated, read-safe view
- `src/ui/tui/` hosts App, Header, IssueBox, Spinner, ElapsedTimer, truncate
- Flag wired at all three layers: `bin/cli.ts`, `RunOptions`, `run.ts`
- `nowLine` is phase-coarse (`running <phase>`) in M1; per-file activity
  needs a data source that does not exist today (Claude CLI is opaque) —
  deferred to a follow-up

Closes #540
- AC-8: `Divider` now renders `├───┤` with border-colored tees and a
  gray fill, satisfying "border-colored tees with gray horizontal dividers".
  New test asserts both glyphs are present in the rendered frame.
- AC-15: `run.ts` registers a `process.once("SIGINT", …)` handler that
  unmounts the TUI before `ShutdownManager`'s cleanup runs. Listener is
  removed in `finally` so there is no leak on normal exit.
- AC-10: filed #543 to track richer `nowLine` follow-up (log-tail or
  structured hook). This issue ships phase-coarse as pre-negotiated in
  the spec.

Addresses the AC_NOT_MET verdict from the first QA pass on PR #542.
@admarble
admarble merged commit 9a0f5ad into main Apr 20, 2026
5 checks passed
@admarble
admarble deleted the feature/540-live-multi-issue-tui-dashboard branch April 20, 2026 00:45
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.

Live multi-issue dashboard for sequant run — concurrent box rendering (read-only TUI)

1 participant