Repository navigation
fix(claude): read ticked [✔] boxes in multi-select questions - #169
Luke-Norland wants to merge 1 commit into
Conversation
Claude Code draws a ticked multi-select option as `[✔]` (U+2714). The card parser only recognised `[x]`, `[X]` and `[✓]`, so a box ticked in the terminal read as unticked and its label kept the `[✔]` prefix. When the user then answered from the chat card, the key plan never toggled that box off. With Apple ticked in the pane, answering Banana + Date from the card returned 200 and Claude received "Apple, Banana, Date". The leftover prefix also changed the prompt id whenever a box was ticked or unticked. Accept `✔` wherever `[x]`, `[X]` and `[✓]` are accepted on this path: the checked test, the label strip and the multi-select detection. `[ ]` stays unchecked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe Claude prompt parser now recognizes ChangesClaude multi-select parsing
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change makes Claude multi-select cards read ticked [✔] boxes correctly. No merge-blocking risk was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Comment |
Bug
Claude Code draws a ticked multi-select option as
[✔](U+2714, heavy check mark). The Claude card parser intmux-interactive-prompt.service.tsrecognises[x],[X]and[✓](U+2713), but not[✔]. That has three effects:checkedOptionIndicesstays empty, soanswerMultiSelectnever unticks a box that was ticked in the terminal. Claude receives that box as well as the choice made in the chat card."[✔] Apple"), so the card shows the bracket. The prompt id is hashed from the labels, so it also changes whenever a box is ticked or unticked.Reproduce
AskUserQuestionwithmultiSelect: trueand the options Apple, Banana, Cherry and Date.1. [✔] Apple.[✔] Apple.On
mainthe response is200 {"action":"selected"}, and Claude'stool_resultis"Which fruits do you want?"="Apple, Banana, Date".Fix
Accept
✔wherever[x],[X]and[✓]are already accepted on this path: the checked test and the label strip inparseNumberedRows, and the multi-select detection inparseClaudeQuestion.[ ]stays unchecked. Nothing else changes.Tests
New file
server/modules/providers/tests/claude-multiselect.test.ts, with one fixture: a realcapture-pane -p -e -N -S -80capture of the question with Apple ticked in the terminal (fixtures/claude-multiselect/pretick.joined.ansi).[✔]row reads as checked:checkedChoiceNumbers: [1], and the labels areApple,Banana,Cherry,Date.Enter, Down, Enter, Down, Down, Enter, Right, Enter. Replaying those keys from the captured state ends with exactly {Banana, Date} ticked.[x],[X]and[✓]still parse as before: Apple checked, clean labels and the same prompt id.On
mainall five fail. The only failure in the[x]/[X]/[✓]test is the id comparison with the[✔]capture; its other assertions already pass there. With the fix all five pass. The existingtmux-interactive-prompt.service.test.tspasses unchanged (14/14).If
✔is removed from the checked test only, 4 of the 5 new tests fail.npm run typecheckandeslinton the touched files are clean.End to end
These runs used a real Claude Code 2.1.291 in a private tmux server (64x31, default renderer) and a dev server from this branch. The card was read and answered through
POST /api/providers/sessions/external/interactiveand/respond. Between runs the pane got/clearandclear-history.tool_resultmain[], label[✔] Apple[1], labelApple[]Every answer returned
200 {"action":"selected"}.Scope
The transcript-ask path (
tmux-ask-selection.service.ts) does not handle multi-select questions, so only the card path is affected. The OMP/GJC glyph rows (☐/☑) are unchanged.Summary by CodeRabbit
[✔]and display their labels without the marker.