fix(web): keep an agent view visible instead of folding it away - #142
Merged
Conversation
An agent view arrived as an ordinary tool row, so the work log treated it like one: once the turn settled it folded away with the rest of the tool calls, and in a long run it collapsed behind a "+N tool calls" toggle. The box the agent drew for the user was there, but nobody saw it without hunting for it. Agent-spawn rows already had this exemption, for the same reason — a running fleet must not hide behind a toggle. Generalise that one predicate to cover agent views too. A view is the answer the agent produced, not a record that work happened; folded away it may as well not have been drawn. Written by Claude Opus 5 in T3 Code.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
Reported after testing #141: agent views were not reliably visible in chat.
What was wrong
A
t3_show_uirow arrives as an ordinary MCP tool row, so the work log treatedit like one. Two separate mechanisms hid it:
the dominant one — a finished turn showed no view at all.
"+N tool calls".
Either way the box the agent drew was present in the data and invisible to the
reader.
The fix
Agent-spawn CTA rows already carry exactly this exemption, with the same
rationale — a still-running fleet must not hide behind a toggle. Rather than add
a second special case, the existing
agentSpawnchecks generalise into onepredicate,
workEntryStaysVisible, used at all six sites that fold or collapsework rows.
A view is the answer the agent produced, not a record that work happened. Folded
away it may as well not have been drawn.
The inline box already defaulted to open, and stays that way — this changes only
whether the row survives grouping. Expand-over-transcript from #141 is
unaffected.
Verification
New
MessagesTimeline.agentUi.logic.test.ts— 6 tests:collapse behaviour is intact for ordinary tool calls
Existing
MessagesTimeline.logic.test.tspasses unchanged (53 together). Widerchat + fork web suites: 523 tests green. tsgo clean, format clean, fork markers
pass.
Written by Claude Opus 5 in T3 Code.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.