Skip to content

feat(web): expand an agent view over the transcript - #141

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

tusharbhardwaj-bk merged 1 commit into
expbkmainfrom
t3code/mechoui

Conversation

@tusharbhardwaj-bk

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

Copy link
Copy Markdown
Collaborator

Follow-up to #139/#140.

What changes

Clicking an agent view's title expands it to fill the message area. The composer
stays exactly where it is, so you can keep talking to the agent while the view is
open. Escape or Close returns it to the inline box.

The inline box keeps its own Hide/Show collapse toggle, so the two
gestures don't fight: the title expands, the right-hand control collapses.

Why it is built this way

The overlay mounts as the last child of the messages wrapper in ChatView
rather than inside the timeline row that opened it. Timeline rows are
virtualized — they clip their children and get recycled — so an absolutely
positioned overlay inside one would be cut off or vanish on scroll. The messages
wrapper is already relative and already excludes the input bar, so
absolute inset-0 there covers precisely the transcript and nothing else, which
is what was asked for.

Which view is expanded lives in a small fork-owned zustand store rather than in
the row, which is what lets the card and the overlay be different mount points.
It is deliberately single-valued: expanding a second view replaces the first,
because one overlay mount cannot stack.

The iframe itself moved into a shared AgentUiRenderFrame used by both the card
and the overlay, so sandboxing, loading and failure states cannot drift between
them — the sandbox rules especially.

Escape is handled on the capture phase: the composer and timeline both handle
Escape, and the frontmost surface should answer first.

Fork surface

One new fork-owned file (agentUiExpandedStore.ts), the rest inside the existing
fork/agentUiSurface.tsx. ChatView takes one marked import and one marked
line.

Verification

  • agentUiExpandedStore.test.ts — 4 tests: initial state, expand/collapse
    round-trip, replace-not-stack, idempotent collapse.
  • Existing 9 surface tests still pass, including the sandbox-origin boundary.
  • Web fork suites: 132 tests green. Typecheck clean under tsgo, lint 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.

A chart or table worth showing is usually worth showing bigger, and the inline
box is capped at 900px by design. Clicking a view's title now expands it to fill
the message area, leaving the composer where it is so the conversation can
continue without collapsing the view first.

The overlay mounts beside the message list rather than inside the row that
opened it: timeline rows are virtualized, so they clip and get recycled out from
under anything absolutely positioned. The messages wrapper is already `relative`
and already excludes the input bar, so `absolute inset-0` there covers exactly
the transcript.

Escape closes it, on the capture phase — the composer and timeline both handle
Escape, and the frontmost surface should answer first.

Written by Claude Opus 5 in T3 Code.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 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.6 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.7 KiB — 66.4 KiB ✅
Codex Live turn messages — 11 — 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: 8204ea5 · 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 c1b2d9c 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:L 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