Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements real deferred-interaction handling in the Shell renderer so that, when connected to an agent-server (SharedDispatcher), agent-initiated questions/prompts are rendered inline and can be dismissed when another client answers or when the server cancels the interaction.
Changes:
- Implemented
requestInteraction/interactionResolved/interactionCancelledhandling in the Shell renderer clientIO to support connected-mode deferred interactions. - Added
ChatView.showInteractionQuestion(...)to render deferred"question"interactions inline via the existing choice panel UI. - Added a Playwright integration test suite exercising the deferred-interaction UI flow.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| ts/packages/shell/test/interactionUI.spec.ts | New Playwright integration tests for deferred-interaction UI behavior. |
| ts/packages/shell/src/renderer/src/messageContainer.ts | Exposes the underlying message div to enable inserting/removing choice panels from outside MessageContainer. |
| ts/packages/shell/src/renderer/src/main.ts | Implements Shell-side deferred interaction handling and wires responses back to the dispatcher. |
| ts/packages/shell/src/renderer/src/chat/chatView.ts | Adds a unified UI path to render deferred "question" interactions inline using ChoicePanel. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ve logging, and test selector
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.
When the shell is connected to an agent-server, agents can now ask the user questions and wait for a response — matching behavior that already existed in the CLI. Previously, any agent-initiated prompt
(yes/no confirmation, multi-choice question) would silently hang for 10 minutes before timing out, because the shell's handlers were unimplemented stubs.
The shell now renders these prompts inline in the chat view using the existing choice panel UI, and correctly handles the multi-client case: if another connected client (e.g. the CLI) answers first, the
shell dismisses its own panel and shows a "[answered by another client]" notice. Server-side cancellations (e.g. timeout) similarly dismiss the panel with an "[interaction cancelled]" notice. Both binary
yes/no and arbitrary multi-choice questions are handled through a single unified code path, consistent with the protocol unification introduced in PR #2194.