Repository navigation
fix(mobile): answer multi-question asks like desktop and clear Claude's wait on phone answers - #33968
Merged
Merged
Conversation
7 of 9 tasks
AmoabaKelvin
force-pushed
the
mobile-chat-ask-cards
branch
from
October 27, 2026 01:20
d24c1a0 to
2b07653
Compare
AmoabaKelvin
marked this pull request as ready for review
October 27, 2026 01:21
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 26 minutes. View limit details
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 |
AmoabaKelvin
force-pushed
the
mobile-chat-ask-cards
branch
3 times, most recently
from
October 27, 2026 03:00
519adb7 to
419b2a4
Compare
…wers it Claude sends no hook after AskUserQuestion is answered; desktop infers it, phone answers left the pane waiting.
…back-stepping Mobile required every answer and locked grouped structured questions once tapped; the card rules and structured mapping now live in shared code.
… answer check into terminal.send
AmoabaKelvin
force-pushed
the
mobile-chat-ask-cards
branch
from
October 27, 2026 03:31
419b2a4 to
339f54b
Compare
This was referenced Oct 27, 2026
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.
ELI5
When an agent asks several questions at once, the phone now behaves like desktop. You can skip a question, step back to change an earlier answer, and the host notices when a phone keystroke answers Claude's question.
What Changed
src/shared/native-chat-ask-card-rules.ts, which desktop'sNativeChatQuestionCarduses too.MobileNativeChatStructuredAsk), so an earlier answer can be changed before Submit. The question-to-card mapping in both directions moved from desktop'sNativeChatStructuredQuestionCardtosrc/shared/structured-agent-question-card.ts. The mobile codec and its draft state are deleted. Answers name the prompt they were rendered for, so they can't land on a replacement prompt.terminal.send, the host checks the write with the sharedisQuestionAnsweredSubmitInputrule against the pane's hook row from before the write. It then calls the existingagentHookServer.inferQuestionAnswered, the same inference desktop's typed-input path uses (terminal-send-question-answered.ts). Sends from desktop clients are skipped because desktop already infers in its renderer.Why
Desktop logic wins in the mobile/desktop parity audit. On the phone, a user who answered only some questions had no way out except Cancel. One shared rule set keeps both cards in step.
Linked Issue
Part of the mobile/desktop parity audit
Visual Proof
No device captures for this fleet. The change adopts desktop's existing behavior: the Skip, back-step and sorted-toggle rules in
NativeChatQuestionCard.tsx, the journal mapping inNativeChatStructuredQuestionCard.tsx, and the typed-answer inference frompty-connection/interrupt-input-intent.ts.Testing
Focused root tests:
NativeChatQuestionCard,NativeChatStructuredQuestionCard,use-structured-agent-session-question-answers,terminal-send*. Focused mobile tests:MobileNativeChatAsk,use-mobile-structured-prompt-responses, prompt-cancel, structured session,MobileNativeChatQuestion. The new host test fails when the inference call is removed. Tests that only pinned the deleted mobile codec are removed.AI Disclosure
Review
Codex review, 3 rounds. Round 1: option rows now announce as checkboxes or radios; fixed. Round 2: answers could land on a replacement prompt; fixed by passing the rendered prompt identity. Round 3 findings were rejected because desktop behaves the same (Skip with partial structured answers; a one-digit free-text answer clearing the wait one step early) or because they were outside this PR's scope (flat Codex/Pi structured questions).
Agent skill upstream boundary
Notes
Mobile behavior removed (desktop wins):
Known gap in #29: like desktop's typed-input path, the host check covers only single-question single-select answers. Multi-question and multi-select answers sent from the phone still wait for Claude's next hook. Closing that would need a new wire field.
Desktop: no behavior change; its question cards import the shared rules.
Compatibility: no wire change. Old hosts still get packed answers through
legacyAgentSessionSelectedOptionId. The host check works with any phone version. An old host keeps today's behavior. Runtime code stays Electron-free. Folder workspaces, SSH and all host OSes are unaffected.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)