Repository navigation
fix(picker): detect 2.1.283's indented picker rows and republish colour-only selection changes - #66
Conversation
…sh colour-only selection changes agent-code#1253, on a real Claude Code 2.1.283 recording (test/fixtures/slash-picker): - SlashPickerParser split the untrimmed row on 2+ spaces; 2.1.283 indents picker rows by two spaces, so parts[0] was empty and no row was ever detected. - HeadlessTerminal's text-only flush gate dropped the colour-only repaint of arrowing through the picker. An owner-supplied gateSignature (the selected row, only while a picker is visible) joins the gate; the common frame stays attribute-blind (agent-code#390). The test replays the recording through ClaudeCodeHeadless and asserts the published claude.slash-picker condition; the parser trim, the signature, the gate term and the evaluator's picker input are each mutation-pinned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ible agent-code#1253 review b (surviving mutant): computing the signature on every flush passed every test. Identical no-picker frames now must parse the picker only once per EMITTED frame (21 calls vs 1 frame without the visibility guard). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the emitted one after parsing agent-code#1253 review a: the signature was read on changed-text frames too (a wasted grid parse per picker frame), and the value recorded for an emitted frame was the PRE-parse one, so a picker that just opened emitted a duplicate frame on the next no-op write. gateSignature(source): 'live' only when the text is unchanged; 'emitted' right after the screen handler parsed. Both pinned on the real recording (duplicate frame: 5 vs 4; parses on a scroll: 2 vs 1 per frame). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the snapshotIntervalMs default agent-code#1253 review c: the new option was missing from the public options table; the table also still said 16 ms although the default has been 100 ms since 673e786. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review disposition (package head Fixed
Confirmations from c: the performance envelope is in budget (≤70 µs per scan while a picker is open, ≤10 Hz, and one property read otherwise). Merge order: claude-code-headless#66 first. Then #1382 is re-pointed to #66's merge commit, and its CI re-runs, before READY. 🤖 Generated with Claude Code |
Refs Juliusolsson05/agent-code#1253 (the app PR that bumps this package fixes it).
Problem
Recorded on real Claude Code 2.1.283 (
test/fixtures/slash-picker/, see its README):detectSlashPickersplit the UNtrimmed row on 2+ spaces, soparts[0]was the empty indent, and every row was rejected by the id check.HeadlessTerminal.scheduleFlush's gate compares text only, so no frame fired, the picker was never reparsed, andclaude.slash-pickerkept the old selected row.What merges
SlashPickerParser: trims both ends before splitting.HeadlessTerminal: an optionalgateSignaturehook, a third term for the change gate, read only when the text is unchanged.ClaudeCodeHeadless: supplies the selected picker row as that signature, and only while a picker is visible. With no picker it returns a constant'', so the common frame stays attribute-blind. Serialising attributes per frame is what pinned main at ~80% CPU (agent-code#390).Tests
ClaudeCodeHeadless.slashPicker.test.ts: replays the recording (open/co→ Down: colour only → Down: scroll → Up → Esc) throughClaudeCodeHeadless, and asserts the publishedclaude.slash-pickercondition's selected row after each step. This also pins the producer that was unpinned.''; the gate ignoring the signature; an empty picker in the evaluator input.tsc --noEmitis clean.Fixture: decoded and read in full. It was recorded with
/cosent in one write, so personal skills never paint. The plan name and the temp cwd suffix are redacted at the same byte length, and screen diffs before and after redaction differ only in those two texts.🤖 Generated with Claude Code