Repository navigation
Conversation
`sequant ready` previously printed a static header, ran the full-weight qa → loop → qa gate in silence, then printed the final report — no live feedback while a multi-minute gate ran. Reuse `run`'s shared RunRenderer (#618) via `buildProgressWiring` so `ready` shows the same in-place phase cells + spinner as `sequant run`. - `--json`-safe: the renderer is only built on the non-JSON path, so piped JSON output is never corrupted. - Dynamic phase streaming (no fixed seed): the gate's pipeline length is 1–N qa/loop passes, so a seeded plan would leave a stuck-pending `loop` cell when the gate stops after the first qa. - ready-gate emits optional `onProgress` (start/complete/failed) around each phase, carrying the 1-based QA-pass iteration so the renderer shows `loop N/M`. Optional — injected unit tests are unaffected. - Clean teardown on every exit path (happy / error / before report print), plus a SIGINT handler mirroring run.ts. - `--verbose` streaming pauses/resumes the live zone via the renderer as PhasePauseHandle instead of double-rendering. Entire-Checkpoint: 4d40a837b383
…699) Part A — `sequant ready` uses the boxed Ink TUI: - New single-issue snapshot adapter (`ready-tui-adapter.ts`) bridges the gate's push-based `onProgress` (#697) to the TUI's pull-based `getSnapshot()` poll. Models the `qa → loop → qa` passes as the phase row with a coarse `nowLine`. - `renderTui` relaxed to accept any `{ getSnapshot(): RunSnapshot }` (`SnapshotProvider`); `RunOrchestrator` already satisfies it. - `ready.ts`: TTY ∧ !json → mount the Ink TUI; --json / non-TTY → existing #697 static path unchanged. TUI torn down before the report prints (clean scrollback) and on every exit path (success, gate error, SIGINT). Part B — TUI hardening (parity for the eventual `run` default): - Row cap + frame-height clamp (`selectVisibleIssues`, mirrors run-renderer #624): keep active rows, fill with most-recent done, roll older done into `✔ N done`; sized for ~11-line Ink boxes. Consumed by `App.tsx`. - Durable teardown summary (per-issue `✔/✘`) emitted on unmount in `index.ts` so both `run` and `ready` leave a transcript in scrollback. Divider polish: drop the `├`/`┤` end-caps for a plain full-width gray rule. Tests: adapter transitions, row-cap (unit + App rollup render), teardown summary, ready TTY-vs-non-TTY gating + teardown-before-report ordering. AC-6 (tmux + ≤80-col smoke) is human-verified. Entire-Checkpoint: 827a77665e79
This was referenced Jun 2, 2026
…upgrade-sequant-ready-to-the-boxed-ink-tu # Conflicts: # CHANGELOG.md # src/commands/ready.test.ts # src/commands/ready.ts
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #699: upgrade
sequant readyto the experimental boxed Ink TUI (Part A) and harden that TUI for large batches so it can eventually become thesequant rundefault (Part B).--json),sequant ready <issue>now renders the boxed Ink dashboard (single per-issue box, 10 Hz spinner + phase row).--jsonand non-TTY fall back to the static report exactly as feat(cli):sequant ready— wire live phase-matrix renderer (parity withsequant run) #697 established.├/┤end-caps for a plain full-width gray rule.#699's Part A reuses the
onProgresshook added in PR #698 (feature/697-…), which is not onmainyet. Per the #699/spec, this branch is built on the spec-sanctioned option (b): #698's branch was merged into this one (clean, no conflicts) so the wiring is present. Commitd7acf18is that merge.Merge order: merge #698 first, then this PR. Once #698 lands on
main, those commits dedupe and this PR's net diff is just the #699 work (thegit diff --statbelow).What changed (net #699 diff)
src/commands/ready-tui-adapter.ts(new)onProgressto the TUI's pull-basedgetSnapshot(); modelsqa → loop → qaas the phase row with a coarsenowLine.src/ui/tui/index.tsrenderTuirelaxed to a structuralSnapshotProvider({ getSnapshot(): RunSnapshot }); emits the durable teardown summary on unmount.src/ui/tui/row-cap.ts(new)selectVisibleIssues/effectiveTuiRowCap— row cap + frame-height clamp, parity with run-renderer #624 (rolls older done into✔ N done).src/ui/tui/teardown.ts(new)composeTeardownSummary— per-issue✔/✘transcript.src/ui/tui/App.tsxsrc/ui/tui/IssueBox.tsx├/┤caps).src/commands/ready.ts--json→ existing #697 path; teardown before report, on all exit paths.Acceptance Criteria
--json/non-TTY → static reportready.tsuseTuigate;ready.test.ts"#699 Ink TUI wiring"├/┤caps)IssueBox.tsxDivider;IssueBox.test.tsxasserts caps absentready.tsawaitstuiHandle.donebeforeconsole.log(report); test "flips snapshot to done and prints report after teardown"row-cap.ts;row-cap.test.ts+App.test.tsxrollup render✔/✘)teardown.tsemitted inindex.ts;teardown.test.tsIssueBox/Apptests at width 80Test plan
npm run build— clean (tsc)npm run lint— clean (0 warnings)npx vitest run src/ui/tui/ src/commands/ready*.test.ts— 59 passedrelay-hookfails only becauseSEQUANT_RELAY=trueleaks from the orchestrated session — passes when unset;prompt-waitis a relay-inbox timing race). Neither touches TUI/ready code.sequant ready <issue>under tmux and a ≤80-col terminalCloses #699