Repository navigation
fix(tui): one short row per step, drag-select, and resize-safe frames - #4457
Merged
kovtcharov-amd merged 3 commits intoSep 29, 2026
Merged
Conversation
4 of 8 tasks
A single bugfix turn used to paint successive model messages run together
("first.Reproduced: …Now the fix."), narration rows, three transcript lines
per confirmation, a red [x] line per retried call and 100-column temp paths.
- Text streamed before a tool call is that step's preamble: it is stashed as
a folded note, so only what follows the last step is the answer.
- The work log is one row per step, narration folded; Ctrl+O shows it all.
It stays in the transcript after the turn as the record of every step,
failure (with its remedy) and confirmation answer.
- A confirmation is asked once, by the modal; the step it gated records the
answer as a word (approved / denied / always allowed '<scope>').
- Absolute paths in the work log show relative to the start directory or ~,
restoring an argument the sidecar clipped before shortening it.
Closes amd#4445
4 tasks
kovtcharov-amd
force-pushed
the
kalin/tui-byte-sized-transcript
branch
from
September 29, 2026 16:56
04fe9cb to
36e2066
Compare
SVG stills and recordings drew 14px text on a 17px line with a font stack that named nothing outside Safari and macOS, so on Windows and Linux every viewer fell back to whatever `monospace` meant to it. Captures now use 15px on a 22px line, a 0.6em cell that matches a monospace advance, and a stack naming Cascadia Mono, SF Mono/Menlo, JetBrains Mono, Consolas and DejaVu Sans Mono before the generic fallback.
Selecting text did nothing and a narrowed window showed the status bar
twice. Several display defects, one frame at a time:
- The mouse is the terminal's by default, so drag-select and the
terminal's own copy/paste work; alternate scroll mode keeps the wheel
scrolling the transcript. Ctrl+T gives the mouse to GAIA for clickable
links and double-click copy; overlays still take it while open.
- Every frame was two rows shorter than the window (a chrome budget with
rows View never drew), and those unpainted rows kept whatever the
terminal reflowed into them on resize. The budget is now what View
draws, and a real size change forces a full repaint.
- The status bar thinned its hints against a guessed width, so from 38 to
150 columns the last one was cut mid-word ("Ctrl+C q…"). It now thins
against the bar's own layout.
- An answer rendered before the window narrowed kept its old width and
was clipped; it is re-rendered at the new measure.
- A folded run of calls named only its first target ("Editing
dates.py x2" for edits to two files); it now names each one.
5 tasks
kovtcharov
added a commit
to kovtcharov/gaia
that referenced
this pull request
Sep 29, 2026
This follows up amd#4457. Driving the TUI in a real terminal turned up display bugs across the chat screen and the secondary screens; most were already in `main`. The worst: typing while the agent worked wrapped the **whole screen** at every width. Each fix below has a regression test that fails without it. **Chat screen** - **Answers stop wrapping early at hyphens.** Any paragraph with a flag, a hyphenated word or `-m` ended rows well short of the window and stranded words (`python -` / `m` / `pytest`). The cause is a line-length miscount in `muesli/reflow`, the wrapper glamour uses; it has no maintained release, so it's vendored under `tui/third_party` with the one-line fix (the README there says when to drop it). - **Typing mid-turn no longer wraps every row.** The Enter hint was appended after a composer that already spanned the pane, so every row of the frame overran the terminal. - **A failed command now shows as failed.** `python -m pytest` exiting 2 drew as a passed step, because the shell tool reports success whenever the command runs. - **A long or multi-line question hangs under its text** instead of wrapping to column 0, where it read as stray output. - **Answers lost their extra blank rows.** Glamour pads every document top and bottom, which doubled each gap and dropped the finished answer a row below its streamed copy. - **Inline code lost its padding.** It had doubled the spaces around every path and flag (`run pytest now`). **Other screens** - **Agents panel:** the highlighted agent could be off screen in a long list, and Enter switched to a row you couldn't see. - **Gateway screen:** it ignored the window size; with 76 models the title and cursor scrolled off, and narrow windows overflowed. - **Question panel:** a long URL or path shifted the click targets, so a click could pick the wrong option. - **Provider panel:** the key hint was cut mid-word at 69–73 columns. - **Overlays:** resizing while the gateway, provider panel or an agent-switch gate was up left the screen underneath laid out for the old size. ## Test plan - [ ] `cd tui && go test ./...` - [ ] Ask for a paragraph full of commands and flags (e.g. "explain `python -m pytest -q -x`"): rows fill to the width, and no word is stranded alone on a row. - [ ] During a turn, type in the composer at 60, 80 and 120 columns: nothing wraps, and the `⏎` hint shows beside the text. - [ ] Ask for something that runs a failing command (e.g. pytest on a broken test): its step reads `failed — exit N` in red. - [ ] `/agents` with more agents than fit, and `/gateway` in a short window: the highlighted row stays visible.
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.
A bugfix turn in the TUI used to bury its result in a wall of text. Successive model messages ran together ("first.Reproduced: …Now the fix."), the model's narration printed row after row, and every confirmation showed up four times. Tool rows also carried 100-column temp paths. Now each step is one short row relative to the project, with narration folded (Ctrl+O shows everything). A confirmation is asked once and its answer is recorded as a word on the step. The answer sits apart below the steps.
Also in this PR, from driving it in a real terminal:
Both frames come from the same request ("fix the lowercase-z bug in toybox/dates.py, add a regression test, run pytest") on DeepSeek V4.1 Flash via Fireworks. They were captured from live sessions over the control API (
screen?format=plain). The finished-turn transcript went from 92 rows to 50, and from 24[!]lines to 0.Before, mid-turn:
After, mid-turn with a confirmation up:
After, the finished turn:
🔍 Technical details
tool_callorneeds_confirmationnow moves the streamed buffer into the log as a foldednote. If afinalarrives with an emptyanswer, it falls back to the buffer, then to the last stashed text.RoleWorkmessage at every turn end (final, error, done, cancel, force-abort, legacy events). That replaces theRoleToolError[x]lines. A failed step keeps up to 3 rows of detail even when folded, because the remedy is usually in its tail.[!]transcript lines and theconfirmactivity row are gone. The outcome goes onto the gated step viaActivityItem.Approval. Delivery failures still surface as errors. The modal still receives the raw, unshortened summary.paths.goshortens paths relative to the TUI's start directory, then under~, then keeps the tail. Windows paths match case-insensitively.unclipArgrestores an argument the sidecar clipped before shortening it (seen live:…\claude\C--Users-Kalin-Work-gaia--claude-workt…).Ctrl+O detailsonly when idle; mid-turn it gave way to the--devstep count. The key is also in the/helpoverlay and indocs/guides/terminal-hub.mdx.[!]and[x]lines assert the step row instead, keeping each acceptance criterion: remedy durable afterfinal, control bytes stripped, no panel for a recovered failure.Test plan
cd tui && go test ./...:internal/ui/chat/transcript_test.goasserts each fix(tui): a single turn becomes a wall of text — show one short line per step #4445 behaviour on the rendered frame.go build -o bin/gaia-drive.exe ./cmd/gaia) and run a multi-step coding request. Check that model messages never run together, no✻rows or[!]lines appear, and each confirmation's step ends in· approved/· denied.Ctrl+Oafter the turn: narration, full commands and timings appear. Press it again to fold.toybox/dates.py), and the confirmation modal still shows the full path.Closes #4445