feat(tui): FR-TUI-P polish + bugfixes (muted palette, hero, metric strip, SIGWINCH, attach hardening) - #268
Merged
Merged
Conversation
…h resume (#146) - FR-TUI-P-09: resolve the muted chart palette (steel/sage/rose/amber/slate) at init; truecolor when COLORTERM advertises it, 16-color fallback otherwise. Magenta retired; Border/Steel slots added. - FR-TUI-P-04: LoopEnv.Sigwinch + TermEnv subscription; the loop repaints promptly on resize instead of waiting for the next poll. - FR-TUI-P-01: attach child death (signal, nonzero exit, env panic) now always resumes the dashboard — never process-exits.
…146) - FR-TUI-P-05: hero line for the running work (id/phase/elapsed/worker + indeterminate pulse bar; no fabricated percent) or a next-action cue when idle; loop-phase iteration row folded in. - FR-TUI-P-06: metric strip is one dense row — queue meter p/c/d, live run counts (failed_recent rendered as historical, never FAILED per P-03), activity sparkline; uptime/herdr/vis demoted to the dim tail. - FR-TUI-P-08: below 80 columns worker cards stack full-width instead of crushing 2-up.
- FR-TUI-P-12: the help overlay keeps its bottom rows (quit row always visible, pinned by a 24x80 test); the footer hint folds below 80 columns so hint + note share the single footer line.
linhdmn
added a commit
that referenced
this pull request
Sep 9, 2026
…269) PR #268 shipped TermEnv.Sigwinch using syscall.SIGWINCH with no build tag, which does not exist on windows: CI-Go windows-build/windows-cross and Release have been red since 74b3203 (same class as the 5d79ab0 release-gate lesson; #268 merged before its windows CI completed). Move the implementation into rawterm_unix.go (darwin||linux, already the termios home) and add a nil-channel stub in rawterm_other.go — the TermEnv contract (loop.go:111-114 'may be nil') already covers it: Run's resize select never fires and the poll path repaints. Verified: GOOS=windows go build ./... rc=0, go build rc=0, go vet clean, internal/tui suite green on darwin.
linhdmn
added a commit
that referenced
this pull request
Sep 9, 2026
… embedded selector (#270) Two CI-Go legs have been red on main since the Tauri app (#267) and TUI polish (#268) landed: 1. Single-implementation gate: app-build.yml legitimately invokes pnpm (Tauri 2 webview UI, issue #181 / PRD §20.4 decision) — the gate's Go-only rule covers the DevAgent core, so exclude that one workflow's lines from the grep instead of weakening the gate itself. 2. staticcheck QF1008: polish_contract_test.go:323 used the embedded bufEnv selector; winchEnv promotes cols, so env.cols is identical. The TestApplyKeysApproveSheet CI-only failure (passes locally 30+ runs on the same SHA) is filed separately with full analysis.
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.
Closes #146.
Implements all 12 FR-TUI-P items as a pure-Go change confined to
internal/tui/(+docs/TUI.md). No new runtime deps.What changed (FR-TUI-P-01..12)
attachLockednow guarantees resume on every child-death path: nonzero exit (attach exited (N)), signal death (attach child died (signal N)), and panics inside the env (attach crashed: …). The alternate screen is re-entered, raw mode re-armed, the frame full-repainted and a fresh poll fired; the dashboard never process-exits because the attach child died. A synchronoussafeDrawLockedbefore the async poll pins the note on screen before it can be cleared.poisonDaemonhttptest server serves arrays-where-objects and objects-where-arrays on/status,/agents,/history,/sessions;FetchSnapshotmust normalize/degrade to empty payloads and render without panic.failed_recent>0with all panes idle + closed circuit aggregates to IDLE and never paints FAILED (code was already correct; the strip now renders the count as a historical amberNf recentsuffix beside live active counts).LoopEnv.Sigwinch()added (nil-able, like Sigint);TermEnvsubscribessignal.Notify(SIGWINCH); the loop repaints promptly on resize instead of waiting for the next 2s poll. Run-level test mutates cols and fires the channel, asserting the sanctioned reflow full-clear.heroLines: the selected (or first) running pane's id/phase/elapsed/worker with an indeterminate pulse bar driven by the spinner frame — no fabricated percent (the snapshot carries no fraction field; issue open-question 1 resolved to indeterminate). Idle shows a next-action cue. Folded with the loop-phase iteration row.Np/Nc/Nd, live runs, activity sparkline; uptime/herdr/visibility demoted to the dim tail.ansi.gorewritten: rebindable SGR vars resolving to pilot's chart colors (steel#7eb8da, sage#7ec699, rose#d48a8a, amber#e0af68, slate#3d4450, gray) underCOLORTERM=truecolor|24bit, with a 16-color fallback otherwise. Magenta retired.StatusColor/ChipForcarry the palette to every card.2J), a one-row change rewrites exactly that row; the resize full-clear is the loop's one sanctioned clear.ClampLine/VisibleLenCJK/fullwidth/astral tests (still green).[q] quitis never clamped off — the full hint previously overflowed the default 100-col terminal. The?help overlay keeps its bottom rows, so the quit row is visible even at 24×80 (pinned at 24×80 and 10 rows).Evidence
20 new contract tests in
polish_contract_test.go(P-01/02/03/04/05/08/10/12) + existing suite green.docs/TUI.mdgains the Layout & visual language (FR-TUI-P) section (layout diagram, palette table, attach-resume + redraw contracts) and the Architecture table note on the sanctioned resize clear.