Skip to content

feat(blocked-prompt): read Claude questions and plan approval - #33

Merged
tak-bro merged 3 commits into
feat/codex-approvalfrom
feat/claude-dialog-cards
Nov 1, 2026
Merged

tak-bro merged 3 commits into
feat/codex-approvalfrom
feat/claude-dialog-cards

Conversation

@tak-bro

@tak-bro tak-bro commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What

Claude Code's AskUserQuestion (single question, multi-select with Submit, review of several answers) and ExitPlanMode (plan approval) are now read from the pane and sealed like the Bash/Edit/Create approvals, so the phone shows a card with options it can answer.

  • New src/blocked-prompt-claude-dialogs.ts (parseClaudeQuestion, parseClaudePlan), wired into READERS.claude after parseClaudeDialog.
  • Same kind: "permission" shape: the deployed iOS/Android apps render it unchanged (a new kind would be dropped by every installed app). Only title tells the screens apart.
  • Rows that need typed text (Type something, Chat about this, Tell Claude what to change) are not options; a dialog whose highlight is on such a row, or that is being typed into, is not read at all.
  • Multi-select: checkbox kept in the label, each press toggles (the screen changes, so the card refreshes as a new prompt), a synthetic last Submit option (its n is not a screen number).
  • Plan: shows what the viewport shows (cut where the screen cuts it, detailTruncated), plan file path as note, Yes, and use auto mode is persistent (PERSISTENT gained auto mode).
  • Plan and review screens carry no esc/enter to select footer, so the existing blocked rule missed them (state read as idle and no prompt was ever sealed). New rule claude-blocked-plan-or-review; bundle and PUBLISHED_FLOOR → 2026.11.01.2.
  • 11 real captures (Claude Code v2.1.316, width 100 and 58) in src/fixtures/panes/; README paragraph updated.

Merge order (stacked)

hwip#663 → hwip#664 → server deploy → cli#32 → cli#33. This PR is stacked on cli#32 (feat/codex-approval; base is that branch) and needs the hwip mirror (#664) merged and deployed first (PUBLISHED_FLOOR). Bundle and floor carry both the Codex and Claude rules at 2026.11.01.2. After cli#32 merges, retarget the base to main.

PERSISTENT only gained an alternative; a test pins that the Codex don't ask again choices (exec, wrapped exec, edit fixtures) and the Claude Bash ones are still marked, and plain ones are not.

Not in this PR

  • Free-text answers (Other / Chat about this / Tell Claude): ifPrompt is the hash of the screen, so typing changes it and the follow-up key is refused (prompt_changed). Needs a new wire shape and app UX.
  • Full plan text (only the screen's part; full text lives in ~/.claude/plans/*.md).
  • Trust dialog and other numbered menus; web/extension cards.

Verification

  • npx vitest run --exclude src/http-proxy.test.ts: 5603 passed, 1 skipped (http-proxy.test.ts has 8 failures on main already).
  • npx tsc --noEmit: clean.
  • /review --full: no Critical/Important; 3 Nice-to-have (two fixed in 9db4cbf).
  • Not verified: a real phone/simulator showing these cards; Claude Code versions other than 2.1.316.

AskUserQuestion (single, multi-select with Submit, review of several
answers) and ExitPlanMode now parse into the same permission-shaped prompt
the approval dialogs use, so existing apps render them unchanged. Rows
that need typed text are not offered and a dialog being typed into is not
read. Plan and review dialogs lack the footer the blocked rule keys on,
so add a rule for them (bundle 2026.11.01.2, mirrored in hwip).
@tak-bro
tak-bro force-pushed the feat/claude-dialog-cards branch from 9db4cbf to 5e14f96 Compare November 1, 2026 02:01
@tak-bro
tak-bro changed the base branch from main to feat/codex-approval November 1, 2026 02:01
@tak-bro
tak-bro marked this pull request as ready for review November 1, 2026 02:09
@tak-bro
tak-bro merged commit 43bac84 into feat/codex-approval Nov 1, 2026
4 checks passed
@tak-bro
tak-bro deleted the feat/claude-dialog-cards branch November 1, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant