Skip to content

feat(tui): inspector pane shows expanded tool detail and workspace views at Wide+ (L3) - #104

Merged
lg2m merged 3 commits into
feat/eng-850-u4-syntax-palettefrom
feat/eng-853-l3-inspector
Sep 21, 2026
Merged

lg2m merged 3 commits into
feat/eng-850-u4-syntax-palettefrom
feat/eng-853-l3-inspector

Conversation

@lg2m

@lg2m lg2m commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

L3: inspector pane shows expanded tool detail and workspace views at Wide+

Spec: docs/plans/tui-redesign.md (tier table Wide row; slice L3) Linear: ENG-853 (parent ENG-843)

Stacked on #103 (U4). Review the top two commits only until #103 merges.

What changed

  • PanePref::Auto for the inspector resolves to shown at Tier::Wide | Ultra (geometry from L1). New Command::ToggleInspector (Alt-I, palette "toggle the inspector pane") cycles Auto → Shown → Hidden like the rail toggle.
  • inspector_pane(app, cache, pane, width, height) renders, for the focused pane's session: the Attention/Changes body when that workspace view is active (the transcript pane then keeps showing the session the view replaced, via shown_view), else every expanded tool call's summary row + tool_expanded_lines body in transcript order, else a muted hint naming the real expand chord. Bounded to pane height with … N rows more.
  • One code path: the inline transcript and the inspector both call tool_expanded_lines / attention_body / changes_body. ToolRowContext::inline_detail (false while the inspector is on screen) is the only switch: inline emits summary rows only, the inspector reads the same cached ToolRow (TranscriptCache::tool_row, rejecting stale keys) so JSON is parsed once.
  • view.rs column blit measures each row once and presizes the merged span vector (was re-measuring per column): with_sidebar 36.1 → 32.4 µs, wide_160x48 32.5 → 29.3, sessions_200 30.6 → 28.2.
  • Legacy bench scenes now hold the inspector off, as they already do the rail, so they keep a fixed one-column geometry across slices; wide_160x48_full, resize_ultra, and the new tool_calls_32_expanded_inspector measure the shipped layout.
  • Review fix (second commit): a text_width printable-ASCII fast path in the first cut cost +8 % on streaming_run_on_32kb in interleaved A/B (wrap_line measures every span; the second byte scan cost more than the width table saves). Removed; the blit gains do not depend on it.

Goldens

  • Moved (24): every *-{200x60,320x90,480x120} frame gains the INSPECTOR column and the transcript inset shrinks; transcript text verified identical row-for-row except tools-expanded-{200,320,480}, where detail rows leave the transcript for the inspector.
  • Unchanged (16): all 80x24 and 120x40 frames.
  • New golden test: ToolsExpanded at 120×40 (inline) and 200×60 (inspector) yield the same detail text.

How verified

  • cargo test --workspace 1484 passed; qq-tui 280 → 284 lib, 5 → 6 golden. fmt, clippy -D warnings.
  • New tests: Auto shows at Wide / hidden at Regular; toggle cycle + empty hint + full-width rows; detail moves inspector → inline → inspector on one renderer and collapses to the hint (cache invalidation); height bound; Attention/Changes in the inspector with the replaced session beside it, inline at Regular, Esc returns; same-content 120 vs 200.

Measurements (target/qq-perf/tui-L3-2026-09-20/after-fixed.txt, pinned core)

Gate Ref After Budget
steady_state_frame 21.5 µs 21.3 ±5 %
keystroke 26.6 26.6 ±5 %
golden_path 39.0 39.2 ±5 %
tool_calls_32_rows 22.5 23.6 ±5 %
tool_calls_32_folded 13.1 12.4 ±5 %
tool_calls_32_expanded 51.7 52.3 ±5 %
tool_calls_32_expanded_inspector — 38.7 new baseline
streaming_run_on_32kb 419–427 (parent) 440–442 ±5 %
resize_ultra_480x120 111 (parent) 119 +7 %: Auto now paints an 80-col inspector at 480 wide; parent with it pinned on: 146

Not in this slice

  • Scrolling the inspector. Root request recorded: architecture.md's qq-tui bullet should mention the inspector as a per-frame pane fed by the shared tool-row cache.

Docs

  • docs/design/layout.md § Tiers, § Preferences, new § Inspector, § Evidence. Ledger receipt.

Compatibility

  • PROTOCOL / DESCRIPTOR / schema: unchanged. New TUI command ToggleInspector (Alt-I).

…ews at Wide+ (L3)

Slice L3 of docs/plans/tui-redesign.md (ENG-853), stacked on U9.
`PanePref::Auto` shows the inspector at Wide and Ultra; `ToggleInspector`
(Alt-I, palette) cycles it like the rail toggle. The pane holds the focused
pane's Attention/Changes body (the transcript keeps the replaced session) or
every expanded call's summary row plus `tool_expanded_lines` body, else a
hint; content is bounded to the pane height, no scrolling yet. One path:
`ToolRowContext::inline_detail` gates the inline body, so nothing is
duplicated. Column blit measures each row once (`render::text_width`).
Legacy bench scenes hold the inspector off; new `tool_calls_32_expanded_inspector`.
…treaming ceiling

Interleaved A/B on a pinned core showed streaming_run_on_32kb at 450-461 us
with the byte-scan fast path against 419-427 us for the parent; removing it
alone returns 418-429. wrap_line measures every span, so a second scan over
the bytes costs more than the width table saves. The blit rework's gains
on the sidebar and wide scenes do not depend on it.
@lg2m
lg2m added this pull request to stack #105 September 21, 2026 19:40
@lg2m
lg2m merged commit bb2c2e4 into main Sep 21, 2026
4 checks passed
@lg2m
lg2m deleted the feat/eng-853-l3-inspector branch September 21, 2026 19:41
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