feat(ui): render the chat pane as a Rich transcript (AppUI)#7
Merged
Conversation
Add AppUI, the RuntimeUI implementation that routes content into the full-screen pane. It holds a list of Rich renderables as the transcript source of truth and renders them to a single ANSI string at the live terminal width, caching the result until the content or width changes — so a resize re-wraps cleanly and streaming stays cheap to invalidate. The pane control in app.py becomes a FormattedTextControl over ANSI(ui.render), with wrap_lines off because Rich already wraps at the shared width. build_app gains an optional ui seam so the worker (a later branch) can inject and drive the same AppUI. Content methods mirror the terminal UI exactly, preserving every display guard: secret redaction and workspace-relative path resolution in the tool-call summary, and control/ANSI sanitization at every sink — the model-response sink included, matching ResponseStream. Approvals raise until the focus-swap lands; the thinking indicator and post-turn stats stay no-ops for now. DESIGN.md section 31.12 covers the pane render and the AppUI seam.
lavindeep
added a commit
that referenced
this pull request
Jul 2, 2026
feat(ui): render the chat pane as a Rich transcript (AppUI)
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.
Branch 3/9 of the UI v2 full-screen TUI rework.
What
AppUI— theRuntimeUIimplementation that routes model responses, tool calls, command output, and plan progress into the full-screen pane as a Rich→ANSI transcript, replacing branch 2's plain-text pane.FormattedTextControl(ANSI(ui.render)),wrap_lines=False(Rich wraps at the shared width).build_appgains an optionaluiseam so branch 4's worker can inject + drive the sameAppUI.Mirrors the terminal UI exactly — all display guards preserved
redact_structure) + workspace-relative path resolution (workspace_display) in the tool-call summary.ResponseStream; caught by review and fixed red-first).Scope (later branches)
No worker thread, no model wiring (
AppUInever callsget_app()/invalidate()), no transcript windowing/cap, no thinking indicator, no approval focus-swap.terminal.pyand the non-TTY path untouched.Verification
mypy --strictclean, 1314 passed.AppUItests (every content method, all three security guards, ordering, resize re-render, cache, approvals-raise) — security tests proven red-first.