Repository navigation
fix(mobile): build chat approval and question cards with desktop's rules - #33967
Merged
Merged
Conversation
AmoabaKelvin
force-pushed
the
mobile-chat-prompt-cards
branch
from
October 27, 2026 01:20
34237c3 to
7d0a5aa
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 13 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-prompt-cards
branch
2 times, most recently
from
October 27, 2026 02:18
c03a895 to
fc5f59e
Compare
Mobile guessed permission and question cards from assistant prose; the guess could outrank the real approval and send the wrong key.
Its fallbacks now come from the shared copy table, which i18next cannot rebuild from the call site.
AmoabaKelvin
force-pushed
the
mobile-chat-prompt-cards
branch
from
October 27, 2026 03:00
fc5f59e to
28380c2
Compare
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 in a terminal chat asks for permission or asks a question, the phone used to guess the card from the agent's last message. Now it reads the same approval and question data desktop reads, using desktop's own code.
What Changed
The phone now builds prompt cards with desktop's rules from
src/shared, and the mobile copies are deleted.2("Yes, and don't ask again" in Claude). Now: the phone shows only the approval envelope (OMP plan review included), the status ask and unresolved transcript asks, like desktop.parseInteractivePromptand the card decision moved tosrc/shared/native-chat-interactive-prompt.ts(resolveNativeChatInteractivePromptCard).src/shared/native-chat-prompt-dismiss-key.ts. Approvals are keyed on title, detail and wait start; a status-backed question in a new wait shows again. Each side keeps its own dismissal store.buildNativeChatPasteBytes, like desktop.answerssupport the phone packed answers against an empty body, so an allowed empty answer was dropped and whitespace trimmed. Now: it passes the real prompt body, like desktop.chatApprovalFromJournal. Desktop'spendingStructuredSessionPromptsmoved intosrc/shared/structured-agent-session-message-projection.ts, replacing two mobile copies.Why
Desktop logic wins in the mobile/desktop parity audit. The phone's prose guess could send the wrong key into Claude's permission dialog. One shared parser removes that risk and keeps the two apps from drifting again.
Linked Issue
Part of the mobile/desktop parity audit
Visual Proof
No device captures for this fleet. The change adopts desktop's existing behavior:
parseInteractivePromptand the approval-first card decision inuse-native-chat-interactive-prompt-card.ts.Testing
Focused tests: the moved shared prompt tests, desktop prompt-card tests, and mobile
src/sessiontests. Desktop parser tests moved tosrc/shared/native-chat-interactive-prompt.test.ts. Mobile tests that only pinned the prose heuristics are deleted. A regression test covers an ask answer staying valid across the status-to-transcript handoff.AI Disclosure
Review
Codex review, 3 rounds. Round 1 found an answered card staying up if the host cleared the status ask before the answer settled; fixed. Round 2 found the runtime English catalog missing the approval keys; fixed. Round 3 found nothing.
Agent skill upstream boundary
Notes
Mobile behavior removed (desktop wins):
Desktop: no behavior change; approval copy now comes from the shared table.
Compatibility: no wire change. Works with old and new hosts and phones. Folder workspaces, SSH hosts and all host OSes are unaffected because this is phone-side card parsing.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)