fix(tui): show in-flight coalesced tool calls in transcript overlay#8246
Conversation
a136713 to
8e87bd8
Compare
d51bbb3 to
1fcf9b3
Compare
joshka-oai
left a comment
There was a problem hiding this comment.
Thanks - the idea looks good and it definitely solves the problem.
My comments generally are around adding extra context around the changes to the code. This helps people (and agents) unfamiliar with the specific code paths be able to validate the code actually aligns with what it's intended to do.
I'd merge this with that extra info. Happy to update this for you, or let you go at it if you'd prefer. Mostly codex does a really good job here at adding this info with extra prompts to add the right level of docs (whereeve context / rationale / edge cases / complexity / large abstraction level gaps is needed). Mostly doc comments, some inline.
|
@codex review this to ensure that the tui/tui2 behavior and code is the same (modulo any changes that tui2 would prevent this). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fcf9b344a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e029100 to
fa79cfd
Compare
Applied all of your suggestions. Please take another look when you get the time. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa79cfdc3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
When the TUI coalesces read/search/list exec calls into the in-flight “Exploring/Explored” group, the main viewport renders that active history cell immediately, but the Ctrl+T transcript overlay only shows committed transcript cells. Mid-turn, that can make the transcript look like those tool calls haven’t happened yet until a later flush boundary. Render the current active history cell as a read-only “live tail” at the bottom of the transcript overlay, without changing any coalescing/flush behavior. Cache the tail and only recompute when the active cell changes or the terminal width changes so scrolling/highlighting in the overlay stays cheap. Also request a redraw when an exec call completes but the coalesced exec cell remains active, to avoid the transcript “catching up” on an unrelated later event. Includes tui2 parity.
fa79cfd to
f145310
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@joshka-oai I think it's ready for a re-review. |
|
The failing test looks like a flaky timeout. Other platforms passed and this PR only touches Can someone rerun the Windows ARM job? |
Document how Ctrl+T transcript overlay stays in sync with the in-flight active cell via a cached live tail keyed by width, revision, stream continuation, and animation tick. Move subsystem rationale into Rustdoc and align module, type, and function docs between tui and tui2 without changing behavior.
|
I added a bunch of docs in ba041f8 to help understand how this works a bit better. Codex prompt for the docs update: (generated by GPT 5.2 and then tweaked a bit after looking at the output). Prompt
And output: Updated PR descriptionProblemCtrl+T transcript overlay can omit in-flight coalesced tool calls because it Mental modelThe UI has both committed transcript cells (finalized HistoryCell entries) and Non-goalsThis does not change coalescing rules, flush boundaries, or when active cells TradeoffsThis adds cache invalidation complexity: correctness depends on bumping an ArchitectureApp special-cases transcript overlay draws to sync a live tail from ChatWidget ObservabilityManual verification is to open Ctrl+T while an exploring/coalesced active cell TestsSnapshot tests validate that the transcript overlay renders a live tail appended Documentation patches (module, type, function)Module-level docs (invariants + mechanisms)
Type-level docs (cache key + invariants)
Function-level docs (why/when/guarantees/pitfalls)
Validation performed
Design inconsistencies / risks
|
Fixes #7998.
The TUI coalesces read/search/list exec calls into an in-flight "Exploring/Explored" group (ChatWidget.active_cell). The main viewport renders that active cell immediately, but the Ctrl+T transcript overlay was built only from committed transcript cells, so while the agent is still exploring the overlay can look like the tool calls are missing until a later flush boundary.
This PR makes the transcript overlay include a render-only "live tail" for the current active history cell. It doesn’t change when exec groups flush or how coalescing works; it just makes the overlay reflect what the UI already knows.
To keep overlay interactions cheap, the tail is cached and only recomputed when the active cell changes or the terminal width changes.
Testing: