Skip to content

fix(web): keep an agent view visible instead of folding it away - #142

Merged
tusharbhardwaj-bk merged 1 commit into
expbkmainfrom
t3code/mechoui
Aug 28, 2026
Merged

fix(web): keep an agent view visible instead of folding it away#142
tusharbhardwaj-bk merged 1 commit into
expbkmainfrom
t3code/mechoui

Conversation

@tusharbhardwaj-bk

@tusharbhardwaj-bk tusharbhardwaj-bk commented Aug 28, 2026

Copy link
Copy Markdown

Reported after testing #141: agent views were not reliably visible in chat.

What was wrong

A t3_show_ui row arrives as an ordinary MCP tool row, so the work log treated
it like one. Two separate mechanisms hid it:

  • Turn fold. Once a turn settles, its tool rows fold away entirely. This was
    the dominant one — a finished turn showed no view at all.
  • Work-group toggle. In a longer run, tool rows collapse behind
    "+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 agentSpawn checks generalise into one
predicate, workEntryStaysVisible, used at all six sites that fold or collapse
work 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:

  • a view survives a run of tool calls without the reader expanding anything
  • control: the same run without a view still folds away completely, so the
    collapse behaviour is intact for ordinary tool calls
  • several views in one run all stay visible
  • a lone view renders on its own
  • the predicate covers spawn rows and views, and leaves ordinary rows collapsible

Existing MessagesTimeline.logic.test.ts passes unchanged (53 together). Wider
chat + 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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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.
@github-actions github-actions Bot added size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Aug 28, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 15.1 KiB
Codex Thread snapshot wire 7.2 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.4 KiB 7.8 KiB
Codex Live turn WebSocket decoded 55.6 KiB 66.4 KiB
Codex Live turn messages 10 21
Claude Total thread wire 13.6 KiB 15.1 KiB
Claude Thread snapshot wire 7.2 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.4 KiB 7.8 KiB
Claude Live turn WebSocket decoded 56.5 KiB 66.4 KiB
Claude Live turn messages 11 21

Baseline: unavailable · PR result: 4fd50c7 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 110.4 KiB
  • Claude decoded thread snapshot: 111.1 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@tusharbhardwaj-bk
tusharbhardwaj-bk merged commit 3f8aeea into expbkmain Aug 28, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant