Repository navigation
feat(tui): rail column model, brand QQ header, right-aligned tool metrics, padding rows (U6) - #111
Merged
Conversation
…rics, padding rows (U6) Slice U6 of docs/plans/tui-redesign.md (ENG-855). Tool glyphs move into the rail (cells 1-2) so verbs start at column 3 with prose; the fold row's `▸` and the cursor's `▶` follow (the cursor takes the margin cell so a selected row no longer shifts). Metric, state, and duration are right-aligned to the content width at every width; a row too narrow for a six-cell subject drops the duration, then the metric, before eliding the subject. `QQ` renders in `brand` bold. One blank top padding row is a body row (`VirtualBody::pad_top`, `#[inline(never)]` after it read +7 % on `streaming_run_on_32kb` inlined); one composer padding row at >= 20 rows (`layout::composer_padding_rows`), with `fixed_chrome_rows(height)` feeding the composer cap so Compact keeps 4 rows at 80x24. Tests: 9 new (289 -> 298 lib). No lib expectation changed. One golden-test slice adjusted: `expanded_tool_detail_reads_the_same_inline_and_in_the_inspector` took body rows as `rows[1..len-2]`; the composer padding row makes the chrome three rows, so it is `len-3` (the sibling test already used `len-3`). Goldens: all 40 moved. Every family gains the top and composer padding rows; golden-path, approval, and tools-* also show the verb column shift and right-aligned metrics (tools-expanded-80/120 lose one detail row to the padding). markdown-gallery, steering, reasoning, sessions: padding rows only. Bench (core 2, quiet host, before -> after): steady 21.9 -> 21.8 us, run_on_32kb 450.2 -> 439.3, golden_path 38.8 -> 39.4, keystroke 26.6 -> 26.4, tool_calls_32 rows/folded/expanded 23.3/12.6/52.0 -> 24.1/12.5/53.2, compact 19.7 -> 19.5. All within 5 %.
Only tests and bench_support name PanePref through view::; a plain library build warned about the unused import.
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.
U6: rail column model, brand
QQheader, right-aligned tool metrics, padding rowsSpec: docs/plans/tui-redesign.md S1, S2, S7 (summary rows); decisions D2, D8, D9 Linear: ENG-855 (parent ENG-843)
Stacked on #110 (U5). Review the top two commits only until #110 merges.
What changed
view/tools.rstool_summary_line,tool_fold_line): glyph in the rail (cell 1), verb at column 3 — the prose column — subject fills the middle, metric / state / duration right-aligned to the content width at every width. Narrow rows degrade duration → metric → subject elision (min 6 cells). The cursor▶takes cell 0 so a selected row keeps its columns. Width is measured once per row from the parts; the only new allocation is the padding string.view/transcript.rs):QQisbrandbold (the one warm mark per turn);YOUstaysaccentbold on the▌rail, which every prompt row carries.completeis never shown (now pinned by a test).VirtualBody::pad_top()inserts one blank row before the first transcript row; it scrolls away and does not disturb tail anchoring.view/layout.rs): one blank row under the composer at ≥ 20 terminal rows (COMPOSER_PADDING_MIN_HEIGHT,composer_padding_rows,fixed_chrome_rows(height)); Compact composer cap stays 4 at 80×24.PanePrefre-export to test/bench builds; it was an unused-import warning in a plaincargo buildonmain.Before / after (
golden-path-80x24)Goldens — all 40 moved, every hunk inspected
How verified
cargo test --workspace1689 passed; qq-tui 289 → 298 lib, 6 golden. fmt, clippy-D warnings, plaincargo build --workspacewarning-free.QQbrand /YOUaccent /completenever shown; verb column == prose column with glyph at 1; metric right-aligned at 60 and 100 (+ running duration at 72); narrow degradation at 40/28/20; selected row keeps columns; top padding present, absent when scrolled, scrolls back; streaming tail stays anchored with padding; composer padding at 24 vs 19 with Compact cap still 4.goldens.rs(rows[1..len-3], matching the sibling test that already usedlen-3); no lib expectation changed.Measurements (
target/qq-perf/tui-U6-2026-09-21/, core 2)The first cut read run_on at +7–12 % over three interleaved A/B pairs; a no-
pad_topbinary showed the insert itself was free and the delta was codegen perturbation ofbody().#[inline(never)]onpad_topbrought it to baseline (same pattern as the U4 receipt).Docs
docs/design/transcript.mdnew §§ Turn Headers, Column Model, Tool Rows; § Spacing amended.docs/design/layout.md§ Geometry: padding rule and chrome math. Ledger receipt.Compatibility