Skip to content

fix(client-tools): freeze resolved ask cards + demo day_card steering#657

Merged
blove merged 5 commits into
mainfrom
claude/ag-ui-demo-followups
Jun 12, 2026
Merged

fix(client-tools): freeze resolved ask cards + demo day_card steering#657
blove merged 5 commits into
mainfrom
claude/ag-ui-demo-followups

Conversation

@blove

@blove blove commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Two follow-ups from the client-tools demo launch (PR #655):

1. Resolved ask cards freeze (framework-level)

Previously a client ask confirm card stayed fully interactive after resolution (buttons clickable, live recomputed count). Now both adapters write the emitted outcome onto the local tool call in resolve() — semantically correct (the tool did produce a result client-side) — and chat-tool-views' existing props spread delivers it back to the mounted component, which branches to a frozen state.

  • @threadplane/ag-ui: writes result/error/status onto the reducer store's tool call.
  • @threadplane/langgraph: the store's toolCalls is a read-only projection of the SDK stream, so the capability gains applyClientResult and the agent layers a clientResultOverrides signal over the projection (later stream emissions can't clobber the frozen result).
  • All three ask components (demo clear-day-confirm, cockpit ag-ui + langgraph confirm-booking) render frozen "✓ / cancelled" states with the buttons removed.
  • e2e strengthened in all three suites to assert the frozen text AND toHaveCount(0) on the buttons.

2. Demo day_card steering (descriptions-only)

Sharpened the add_stop/move_stop/day_card catalog descriptions so the model follows itinerary writes with the day_card recap view. Verified live (real OpenAI): add_stopday_card rendered → "Done — I added Pompidou to Day 1 and showed the updated day card." Still zero system-prompt coaching.

Verification

  • Units: ag-ui / langgraph / chat suites green (new resolve-writes-result assertions).
  • e2e: examples/ag-ui 13/13 · cockpit ag-ui client-tools 3/3 · cockpit langgraph client-tools 3/3 (all with strengthened freeze assertions).
  • Builds + lint green.

🤖 Generated with Claude Code

blove and others added 4 commits June 11, 2026 18:35
Sharpen the add_stop/move_stop/day_card catalog descriptions so the model
follows writes with the day_card recap view (verified live: add_stop →
day_card → continuation). Descriptions-only — still no system-prompt coaching.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…all on resolve

After a client `ask`/`view` tool resolves, only the backend ToolMessage
carried the outcome — the LOCAL ToolCall stayed result-less, so the
transcript card never froze. resolve() now writes the emitted value onto
the local ToolCall: ok → result=value/status stays complete; error →
result={error}, error set, status='error'. chat-tool-views' toToolViewSpec
already spreads result into the mounted component's props, so the card can
branch to a resolved state on the next render.

ag-ui writes its WritableSignal directly; langgraph layers an override map
over the read-only toolCalls projection (the SDK stream only ever carries
backend results) via a new store.applyClientResult hook.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The clear_day and confirm_booking ask components now receive their own
emitted value back as props once resolved (the adapters write the result
onto the local tool call). Each branches on an optional input — cleared /
confirmed undefined → interactive card; defined → a frozen line with no
buttons ("Day N cleared — M removed" / "Kept day N" and "Booking
confirmed" / "Booking cancelled").

e2e: both ask tests now assert the frozen text appears AND the action
buttons are gone after resolving.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jun 12, 2026 2:47am

Request Review

@blove blove enabled auto-merge (squash) June 12, 2026 02:45
@blove blove merged commit 5e814a6 into main Jun 12, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant