Repository navigation
feat(tui): responsive layout tiers, panes, and a placed measure (L1) - #87
Merged
Merged
Conversation
Slice L1 of docs/plans/tui-redesign.md (ENG-845), stacked on U0.
The terminal's width now selects a layout tier (Compact < 90, Regular < 160,
Wide < 240, Ultra) and the tier selects the panes: one column with an agent
strip; a sessions rail beside the transcript; an inspector column reserved
for tool detail. view/layout.rs computes every pane's Rect once per frame as
a pure function of size, preferences, and session count; view.rs composes
from it. LayoutPrefs { rail, inspector } replaces app::Sidebar.
The render clamp rises from 320x160 to 1024x512, so a full-screen terminal
on a large display is painted edge to edge instead of leaving the right 160
columns blank. The transcript measure drops from 120 to 100 and is placed a
third of the way across a wider pane; Line::indent carries that margin as a
count so the width-keyed caches are untouched and the renderer emits one
cursor move per row. The inspector's Auto state stays hidden until slice L3
paints it.
21 of 35 goldens move (every size >= 90 columns) with the before/after in
this diff. Render bench: steady_state_frame 24.2 -> 22.2 us, golden_path
37.2 -> 38.0 us, resize_horizontal 35.2 -> 33.2 us; new scenes
compact_80x24 19.9 us, resize_ultra_480x120 123.8 us. New design doc
docs/design/layout.md.
lg2m
force-pushed
the
feat/eng-845-l1-tui-layout
branch
from
September 21, 2026 00:15
5f1043c to
6f9dcd8
Compare
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.
L1: responsive layout tiers, panes, and a placed measure
Spec: docs/plans/tui-redesign.md#responsive-model Linear: ENG-845 (parent ENG-843)
Stacked on #86 (U0). Review the second commit only until U0 merges.
What changed
view/layout.rs(new):Tier::of(width)at 90 / 160 / 240 (Compact, Regular, Wide, Ultra);LayoutPrefs { rail, inspector }withPanePref::{Auto, Shown, Hidden}replacesapp::Sidebar;compute_layout(width, height, chrome_rows, prefs, sessions)is a pure function returningRects for the top row, body, transcript pane(s), inspector, and rail, plusstripandmax_composer_rows. Ten unit tests at every breakpoint and bound.view.rs::framecomposes from the layout: pickers and the transcript take the pane width; side panes are blitted column-wise; rows pad to the terminal width so borders line up.Line::indentcarries the margin as a count so the width-keyed caches are untouched;write_lineemits oneMoveRightper row instead of spaces.Autostate resolves to hidden until slice L3 paints tool detail in it;PanePref::Shownopens it at any width today.MAX_LIVE_MARKDOWN_ROWSfixed at 160 (was derived from the render height, so a tall terminal would have raised per-frame streaming work).frames_fill_every_golden_sizeandprose_is_placed_at_the_measure_on_wide_terminals.docs/design/layout.md; one-sentence pointer inarchitecture.md;docs/README.mdindex entry.How verified
cargo test --workspacegreen (qq-tui 255 lib + 5 goldens)cargo fmt --all -- --check,cargo clippy --workspace --all-targets --all-features -- -D warningscargo test -p qq-tui --test gallery -- --ignored→ inspectedmarkdown-gallery-320x90.ans: 87CSI 64 Cmoves, one per body row, content at the expected column.Measurements
cargo bench -p qq-tui --bench render; raw undertarget/qq-perf/tui-L1-2026-09-20/final-{1,2}.txtvs the U0 baseline.Design note: the first implementation inserted a leading
Spanper row for the margin and cost +14 % onsteady_state_frame(28.0 µs); the count form onLinebrought it below baseline. An always-on empty inspector column cost ~3 µs of diff per frame for nothing, which is whyAutostays hidden until L3.Docs
docs/design/layout.md(new),docs/design/architecture.md,docs/README.md,docs/plans/tui-redesign.md(D5 amended),docs/plans/progress/tui-redesign.md,docs/plans/progress/root.mdCompatibility
Ctrl-\still toggles the rail; fromAutothe first press hides.Follow-ups / decisions needed
layout.md, decision D5 amended.