test(examples-chat): aimock interrupt-approval scenario — Phase 2e#332
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an end-to-end Playwright scenario for the interrupt / human-in-the-loop flow through the harness:
tool_calltorequest_approval(reason="...")interrupt({...}); the graph pauses<chat-interrupt-panel>with the capturedreasontextSingle-LLM-call fixture (no continuation needed — graph stays paused until human responds).
Sits on Phase 2d (#330).
Test plan
Notes for reviewers
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.reasonfrom realgpt-5-miniis 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.