Show the user's answer as a reply after an AskUserQuestion resolves#165
Open
Zeus-Deus wants to merge 1 commit into
Open
Show the user's answer as a reply after an AskUserQuestion resolves#165Zeus-Deus wants to merge 1 commit into
Zeus-Deus wants to merge 1 commit into
Conversation
When an agent asks an AskUserQuestion-style multiple-choice prompt (request_kind "user-input"), the interactive picker renders above the composer. Once answered, that panel disappears and the transcript row collapsed to a static muted "Answered" string — so the thread never showed what was picked and it didn't read as a reply. The selection was already stored on the resolved request as the decision's updated_input.answers. Render it back as a right-aligned reply bubble that mirrors UserMessage styling, so a submitted answer reads as a genuine user reply. - New UserInputAnswer component reads updated_input.answers off the resolved request; multi-question prompts get each answer labeled by its question header; falls back to the plain "Answered" marker when a resolved request carries no readable answer (e.g. cancelled). - MessageList user-input branch: pointer while pending, "Submitting answers…" while responding, UserInputAnswer once resolved. - Tests cover responding marker, resolved answer echo, multi-question headers, and the no-answer fallback. - Dev mock seeds a resolved AskUserQuestion for design QA.
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.
Problem
When an agent asks an
AskUserQuestion-style multiple-choice prompt (modeled as apermission_requestwithrequest_kind: "user-input"), the interactive picker renders above the composer (ComposerPendingInputPanel). Once you answer, that panel disappears — and the transcript row was collapsed to a static muted"Answered"string. So the thread never showed what you picked, and it didn't read as if you had replied.Fix
Purely presentational — no backend, reducer, or data-model changes. The selection was already stored on the resolved request as the decision's
updated_input.answers; the renderer was just discarding it.UserInputAnswercomponent readsupdated_input.answersoff the resolved request and renders it as a right-aligned reply bubble, deliberately reusingUserMessagestyling (same card fill, border, and the asymmetric14px 14px 5px 14pxradius) so a submitted answer reads as a genuine user reply. Multi-question prompts label each answer by its question header; a resolved request with no readable answer (e.g. cancelled) falls back to the plain"Answered"marker so the row is never blank.MessageListuser-inputbranch: pointer while pending, "Submitting answers…" while responding,UserInputAnsweronce resolved.Before / After
Before — the answer is invisible; nothing between the subagents card and the next row:
After — the chosen option ("Feature-detect and degrade") renders as a reply bubble:
Verification
npm run check(tsc) clean