tui: sweep reasoning-fragment interactions for per-delta flush - #660
Merged
Conversation
A live turn's flow now flushes one reasoning fragment per delta, so the per-block interactions over those fragments must enumerate every emitted fragment rather than the tool-boundary runs the pre-per-delta focus owned. - collapsibleBlocks enumerates one focusable block per emitted live fragment, in emission order, fragments on both sides of a tool entry included; gated (thinking-off) live turns enumerate none - Enter on a focused fragment pins exactly that fragment, so per-fragment collapse survives a continuing stream burst - collapse-all (E) now covers every live fragment too; the live auto-expand yields to the hide-every-body mode, and a focused fragment's Enter pin still re-expands against it - follow stays pinned through per-delta bursts (regression-locked) Fixes #658
- thinkingExpandedForBlock doc comment no longer claims live blocks stay open regardless of mode; it names the collapse-all exception - modernize the new burst loop to Go 1.26 integer range - simplify the Tab-cycle assertion to explicit expected blocks
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.
What
Follow-up to #657 (live reasoning per delta): with a turn splitting into many reasoning fragments, every per-block interaction over those fragments must stay correct — Tab focus, per-block Enter expand/collapse, the expand-all / collapse-all modes, and follow.
Changes
collapsibleBlocksenumerates every emitted live fragment (AC1): a live turn's flow flushes one reasoning fragment per delta (issue Live reasoning streams per-delta in the merged transcript flow #657), so the block focus now owns one block per emitted fragment in emission order — fragments on both sides of a tool entry included. Previously the enumeration merged consecutive deltas per tool-boundary run, so Tab could never reach most of a per-delta burst. Gated (thinking-off) live turns enumerate no phantom blocks.Ecollapses every fragment of a live burst; a focused fragment's Enter pin still re-expands just it against the mode, andctrl+ecovers every fragment again.Tests
New
internal/tui/fragment_sweep_test.gocovers each AC at the transcript and model level (7 tests). Fullinternal/tuisuite green;go vetclean. (Pre-existingbwrap-dependent failures ininternal/engine/internal/appare environmental and unrelated.)Docs
CONTEXT.md: the "Expansion / collapse" glossary entry now states the per-delta block unit.
Fixes #658