Skip to content

feat(examples/ag-ui): approval-card parity for human-in-the-loop#649

Merged
blove merged 2 commits into
mainfrom
examples-ag-ui-approval-parity
Jun 9, 2026
Merged

feat(examples/ag-ui): approval-card parity for human-in-the-loop#649
blove merged 2 commits into
mainfrom
examples-ag-ui-approval-parity

Conversation

@blove

@blove blove commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The minimal examples/ag-ui app rendered no interrupt UI, so a request_approval interrupt just paused the run with nothing on screen — the parity gap vs examples/chat (and why the homepage AG-UI demo loop couldn't show the approval scene).

Adds the approval card, mirroring the canonical demo:

  • <chat-interrupt-panel [agent] (action)="onInterruptAction($event)">, gated on agent.interrupt().
  • onInterruptAction maps the accept/edit/respond/ignore vocabulary to a resume payload and replays via AG-UI's resume path — submit({ resume }), which the adapter forwards as forwardedProps.command.resume (not the LangGraph submit(null,{command}) shape).
  • Small CSS for the interrupt container.

Existing e2e specs are unaffected (panel only renders when an interrupt is active). nx lint + nx build green locally.

Test Plan

  • CI examples/ag-ui — e2e + build green.
  • Manual/deploy: a request_approval interrupt shows the approval card; Accept resumes the run.

Follow-up (not in this PR)

  • An interrupt-approval e2e spec (needs an aimock approval fixture) would lock this in, matching examples/chat.

🤖 Generated with Claude Code

…rrupts

The minimal ag-ui example had no interrupt UI, so request_approval paused with
no card (interrupt parity gap vs examples/chat). Add <chat-interrupt-panel>
gated on agent.interrupt(), and resolve via AG-UI's resume path —
submit({ resume }) (forwarded as forwardedProps.command.resume) — mapping the
accept/edit/respond/ignore actions like the canonical demo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@blove blove enabled auto-merge (squash) June 9, 2026 20:30
@vercel

vercel Bot commented Jun 9, 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 9, 2026 8:51pm

Request Review

@blove blove merged commit a9574aa into main Jun 9, 2026
23 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