Skip to content

test(tui): golden frames at five sizes, gallery dump, QA gallery fixture (U0) - #86

Merged
lg2m merged 1 commit into
mainfrom
feat/eng-844-u0-tui-goldens
Sep 21, 2026
Merged

lg2m merged 1 commit into
mainfrom
feat/eng-844-u0-tui-goldens

Conversation

@lg2m

@lg2m lg2m commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

U0: review harness for the TUI redesign

Spec: docs/plans/tui-redesign.md#slices Linear: ENG-844 (parent ENG-843)

What changed

  • qq_tui::bench_support gains seven Scenes built from protocol events only (markdown gallery, golden path, tools expanded/folded, edit approval, reasoning, steering), GOLDEN_SIZES (80×24, 120×40, 200×60, 320×90, 480×120), MARKDOWN_GALLERY, plain_frame(), ansi_frame(), select_theme().
  • tests/goldens.rs: 35 plain-text goldens under tests/goldens/; QQ_UPDATE_GOLDENS=1 rewrites. A pin records that a 480-column terminal currently gets a 320-wide frame (widest row 319) — the defect slice L1 moves, so its diff will show the before/after. A drift test ties the runbook's embedded gallery to the constant.
  • tests/gallery.rs (ignored): writes 490 ANSI frames (14 compiled themes × 35) to target/qq-tui-gallery/ with highlights settled, for cat review in a real terminal.
  • docs/runbooks/tui-qa.md: a second fake endpoint that streams the gallery line by line.
  • view::render_size extracted so goldens and draw clamp identically; frame_and_commit exposed under bench-support. No rendering behavior changes.
  • Plan activation: docs/plans/tui-redesign.md rewritten with the responsive model (Compact/Regular/Wide/Ultra tiers, panes, per-pane viewports), slices L1–L4/U9 added, decisions D1–D11 resolved; new ledger docs/plans/progress/tui-redesign.md; ADR 0036/0037 reserved and two root requests filed in progress/root.md.

How verified

  • cargo test --workspace green (qq-tui 246 lib + 4 goldens; gallery ignored)
  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test -p qq-tui --test gallery -- --ignored → 490 files
  • Goldens deterministic across repeated runs

Measurements

cargo bench -p qq-tui --bench render, target/qq-perf/tui-U0-2026-09-20/{baseline,after,after-aa}.txt

Gate Before After A/A Budget
steady_state_frame median 24.2 µs 25.0 µs 24.4 µs ±5 %
resize_horizontal median 35.2 µs 36.2 µs 35.3 µs ±5 %
streaming_run_on_32kb median 414.5 µs 445.3 µs 426.5 µs ±5 %

The A/A pair spans the same range as the deltas; no code on the frame path changed.

Docs

  • docs/plans/tui-redesign.md, docs/plans/progress/tui-redesign.md, docs/plans/progress/root.md, docs/runbooks/tui-qa.md

Compatibility

  • PROTOCOL / DESCRIPTOR / schema: unchanged. qq-config added as a qq-tui dev-dependency (already in the graph via qq-core).

Follow-ups / decisions needed

  • Root requests (in root.md): AGENTS.md names Linear team DEV; the board is ENG. Plan row for docs/plans/README.md.
  • Not this PR: ENG-858 — Jev final mode fails runs with no tool evidence (reproduced; root cause of the "simple question ends in an error" reports).

@lg2m

lg2m commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator Author

Linear: ENG-844. Stacked PR #87 (L1) targets this branch; retarget it to main after merge.

@lg2m
lg2m added this pull request to stack #88 September 21, 2026 00:13
…ure (U0)

Slice U0 of docs/plans/tui-redesign.md (ENG-844).

Seven review scenes built from protocol events (markdown gallery, golden
path, tools expanded/folded, edit approval, reasoning, steering) render to
35 plain-text goldens at 80x24, 120x40, 200x60, 320x90 and 480x120. A pin
records that a 480-column terminal currently receives a 320-wide frame,
which slice L1 moves. An ignored gallery test writes 490 ANSI frames (14
themes) for real-terminal review, and the QA runbook gains an endpoint that
streams the same gallery, tied to the constant by a drift test.

view::render_size is extracted so goldens and draw clamp alike; no
rendering behavior changes. Render bench within host noise (A/A recorded).

Also activates the plan: responsive tiers, slices L1-L4/U9, decisions
D1-D11, ledger, ADR 0036/0037 reservations, Linear ENG-843..857.
@lg2m
lg2m force-pushed the feat/eng-844-u0-tui-goldens branch from ebd57ff to 34919ae Compare September 21, 2026 00:15
@lg2m
lg2m merged commit 2cad2de into main Sep 21, 2026
4 checks passed
@lg2m
lg2m deleted the feat/eng-844-u0-tui-goldens branch September 21, 2026 00:25
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