feat: allow dismissing pending user-input questions#1759
feat: allow dismissing pending user-input questions#1759mrinc wants to merge 2 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature allowing users to dismiss pending input questions via UI button or Escape key. The change modifies runtime behavior across both server orchestration and client UI, sending placeholder text to the AI when questions are dismissed. New features with behavioral changes warrant human review. You can customize Macroscope's approvability policy. Learn more. |
|
how does it look when you're not on the last question? |
Add dismiss/close functionality to the pending user-input question UI.
Empty answers ({}) are treated as a dismissal -- both adapters detect
this and inform the model with explicit "[User dismissed this question
without answering]" text. No contract or pipeline changes needed.
Closes pingdotgg#479, Closes pingdotgg#856
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
029a73f to
0257d73
Compare








Closes #479, Closes #856
Summary
{}are sent through the existing command pipeline -- both adapters detect this and inform the model with explicit dismissal textMotivation
Currently there is no way to close or dismiss a pending question from the AI agent without answering it. This blocks users who want to skip a question and prompt the agent directly instead. Additionally, when the app restarts while a question is pending, the thread becomes unusable because the question UI persists but submission no longer works (#856).
Approach
Empty answers
{}are treated as a dismissal. The frontend sends the existingthread.user-input.respondcommand withanswers: {}-- no new fields, no contract changes, no pipeline changes. Each adapter detects empty answers and fills in"[User dismissed this question without answering]"in its native format so the model receives clear text and can act on it.Changes (5 files)
Web frontend
apps/web/src/components/ChatView.tsxonDismissUserInputcallback: dispatchesthread.user-input.respondwithanswers: {}, then clears draft state for the requestuseEffectfor Escape key: dismisses the active pending user input on keypressonDismisstoComposerPendingUserInputPanelandonDismissPendingUserInputtoComposerPrimaryActionsapps/web/src/components/chat/ComposerPendingUserInputPanel.tsxonDismissprop to panel and inner card componentsXIconfrom lucide-react) withcursor-pointerin the question header row, pushed to the right edge withflex-1on the label containerapps/web/src/components/chat/ComposerPrimaryActions.tsxonDismissPendingUserInputpropServer adapters
apps/server/src/provider/Layers/ClaudeAdapter.tshandleAskUserQuestion: after the Deferred resolves, checks if answers are empty (Object.keys(answers).length === 0). If so, builds answers with"[User dismissed this question without answering]"keyed by question text and returnsbehavior: "allow"with the dismissal answers asupdatedInputapps/server/src/codexAppServerManager.tsquestionIdstoPendingUserInputRequestinterfacerequest.params.questionswhenitem/tool/requestUserInputarrivesrespondToUserInput: detects empty answers and builds dismissal answers in native Codex format ({ answers: ["[User dismissed...]"] }) keyed by question IDNo changes needed
ProviderUserInputAnswers(Record<string, unknown>) already accepts{}apps/web/src/session-logic.ts--derivePendingUserInputs()already clears pending questions on"user-input.resolved"events and stale-request failuresHow users can dismiss
All three methods send the same
thread.user-input.respondcommand withanswers: {}.Test plan
bun typecheckpasses (7/7 packages, 0 errors)bun lintpasses (0 warnings, 0 errors)bun fmtpassesbun run testpasses (existing server git test failures are pre-existing environment issues unrelated to this change)Pictures
Before
After
Note
Add dismiss support for pending user-input questions via Escape key or dismiss button
ComposerPendingUserInputPaneland wires a global Escape key handler inChatViewto dismiss the active prompt.thread.user-input.respondcommand with an empty answers object, which the server interprets as a dismissal and maps each question ID to a placeholder answer string.ClaudeAdapter.tsalso handles empty answers by constructing placeholder dismissed answers keyed by question text and returningallowwith the updated input.Macroscope summarized 5d4fcab.