Skip to content

test(examples-chat): aimock interrupt-approval scenario — Phase 2e#332

Merged
blove merged 1 commit into
mainfrom
claude/aimock-interrupt-panel
May 15, 2026
Merged

test(examples-chat): aimock interrupt-approval scenario — Phase 2e#332
blove merged 1 commit into
mainfrom
claude/aimock-interrupt-panel

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 15, 2026

Summary

Adds an end-to-end Playwright scenario for the interrupt / human-in-the-loop flow through the harness:

  • Parent LLM emits a tool_call to request_approval(reason="...")
  • LangGraph dispatches the tool; the tool calls interrupt({...}); the graph pauses
  • The chat composition surfaces <chat-interrupt-panel> with the captured reason text
  • Test asserts: panel attached, title "Agent paused", body contains reason-text terms

Single-LLM-call fixture (no continuation needed — graph stays paused until human responds).

Sits on Phase 2d (#330).

Test plan

  • New spec passes solo locally: 1/1 in ~2.6s
  • Full suite passes 3/3 consecutive runs (7/7 specs each)
  • No production code touched
  • CI green

Notes for reviewers

  • Skipped data-streaming="false" wait — the agent stays in the paused state, not the idle state, until the human responds. The interrupt panel is the durable DOM signal here.
  • Captured reason from real gpt-5-mini is a real plan-the-cleanup paragraph, so the body assertion uses a loose phrase match (approval|delete|backup) rather than locking in a specific phrasing.
  • Accept/Edit/Ignore interactions are deferred — could be a follow-up that clicks Accept then asserts the AI continues, but requires a captured continuation response.

Captures the parent's tool_call to request_approval; asserts the
<chat-interrupt-panel> renders with the 'Agent paused' title and the
captured reason text after the graph pauses on interrupt({...}).

Only one LLM call needs capturing for this scenario — the graph blocks
after dispatching request_approval until the human responds. Future
phases can add Accept/Edit/Ignore interactions on top.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 15, 2026 7:42pm

Request Review

@blove blove merged commit b7a3760 into main May 15, 2026
16 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