Skip to content

fix(claude): the slash picker is detected on Claude 2.1.283 and follows colour-only selection changes - #1382

Merged
Juliusolsson05 merged 8 commits into
integration/batch-2026-09-27-ufrom
fix/claude-slash-picker-colour-select
Sep 27, 2026
Merged

Juliusolsson05 merged 8 commits into
integration/batch-2026-09-27-ufrom
fix/claude-slash-picker-colour-select

Conversation

@Juliusolsson05

@Juliusolsson05 Juliusolsson05 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Fixes #1253. The fix, its recorded fixture and its tests live in Juliusolsson05/claude-code-headless#66, now MERGED (487f029c). This PR bumps the submodule to that merge commit.

Current pin: 487f029c, claude-code-headless#66's merge commit on the package's main. It descends from main's current pin (0928344, #69, which #1442 brought in), so main's package history is kept. Package package.json is unchanged, so no lockfile resync. origin/main is merged in; the only conflict was this gitlink.

Plan: docs/plans/2026-09-27-claude-slash-picker-colour-select.md (first commit).

Problem

Recorded on real Claude Code 2.1.283. The CLI was driven directly in a PTY and no prompt was submitted; see packages/claude-code-headless/test/fixtures/slash-picker/README.md. There were two bugs:

  1. The slash picker was never detected on current Claude. 2.1.283 indents picker rows by two spaces, and the parser split the untrimmed row, so every row was rejected. This was not in the issue; the recording found it.
  2. bug(claude): a colour-only slash-picker selection change never republishes the picker #1253 itself. Arrowing through the picker can change only the highlight colour. HeadlessTerminal's text-only flush gate dropped that repaint, so claude.slash-picker kept the old selected row.

What merges (in the package)

  • The parser trims both ends of a row before splitting it.

  • A picker-selection signature joins the flush gate, only while a picker is visible:

    • the live grid is read only when the text is unchanged;
    • the emitted signature is recorded after the screen handler parsed the frame.

    With no picker, the gate costs one property read and stays attribute-blind (agent-code#390).

Tests (in the package)

  • The real recording replays through ClaudeCodeHeadless, and the published claude.slash-picker selection is asserted after open, a colour-only Down, a scroll, Up, and Esc. This also pins the producer the issue called unpinned.
  • Cost pins:
    • no picker parse on dropped no-picker flushes;
    • no duplicate frame after the picker opens;
    • one parse per emitted changed frame.
  • Mutations, each red: untrimmed split; empty signature; the gate ignoring the signature; an empty picker in the evaluator; a signature computed with no picker open; a pre-parse recorded signature; a live read on changed frames.
  • Gates: package (at fix(feed): render orphan ghosts only when JSONL stalls past proxy #66's head 3dab12fd, identical tree to 487f029c): contract, tsc --noEmit and 222 tests pass, and package CI is green. App (e2168b46, after batch S): npx tsc -b is clean, and src/providers/claude + src/renderer/src/features/slash-commands pass (28 files, 212 tests).

🤖 Generated with Claude Code

Juliusolsson05 and others added 5 commits September 27, 2026 00:30
…he picker (#1253)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…848bb52)

Fixes #1253 once cch#66 merges: the slash picker is detected on Claude
2.1.283 (indented rows) and a colour-only selection change republishes it.
Recorded fixture and mutation-pinned test live in the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead (128b8ea)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead (2d9a0db)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Juliusolsson05 Juliusolsson05 added type:bug Something works wrong class:C8-rendering Rendering order/duplicates sev:P3 Minor labels Sep 27, 2026
@Juliusolsson05

Copy link
Copy Markdown
Owner Author

Review disposition (package head 07eecec; app #1382 pins 2d9a0db, which differs only by an API.md doc commit). a, b and c (pi) are all MERGE-READY. a was MERGE-READY with two minors, fixed, and verified MERGE-READY in round 2. The package's exact-head CI is green: Contract, Node 20.19 and 24, Tier commands, Coverage, quality-gate.

Fixed

  • b (surviving mutant): computing the signature with no picker visible passed every test. A cost test now repaints identical no-picker frames. The parser may run only once per EMITTED frame; without the visibility guard it ran 21 times for 1 frame.
  • a (minor): the signature was read on changed-text frames too, a wasted grid parse per picker frame. gateSignature(source) now reads 'live' only when the text is unchanged. On a scroll, live-always gave 2 parses per frame, and the fix gives 1.
  • a (minor): the signature recorded for an emitted frame was the PRE-parse value, so a picker that had just opened emitted a duplicate frame on the next no-op write. 'emitted' is now recorded after the screen handler has parsed. On the recording, 5 frames became 4.
  • c (minor): the comments described a conditional read that did not exist. True of 848bb52, which c reviewed; 2d9a0db made the read conditional, and the comments now match.
  • c (minor): gateSignature was missing from API.md's options table. Added, and the table's stale snapshotIntervalMs default (16 → 100 ms, pre-existing) is corrected.

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). Fixes #1253 is whole: both asks are implemented and pinned. The 2.1.283 drift meant the picker never showed before this, and nothing in the renderer relied on that broken state.

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

Juliusolsson05 and others added 2 commits September 27, 2026 10:36
…ude-code-headless#66 merged with its main (7d398fc)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er-colour-select

# Conflicts:
#	packages/claude-code-headless
@Juliusolsson05
Juliusolsson05 changed the base branch from main to integration/batch-2026-09-27-s September 27, 2026 22:00
@Juliusolsson05
Juliusolsson05 changed the base branch from integration/batch-2026-09-27-s to main September 27, 2026 22:00
@Juliusolsson05
Juliusolsson05 changed the base branch from main to integration/batch-2026-09-27-s September 27, 2026 22:00
@Juliusolsson05
Juliusolsson05 changed the base branch from integration/batch-2026-09-27-s to main September 27, 2026 22:00
@Juliusolsson05
Juliusolsson05 changed the base branch from main to integration/batch-2026-09-27-t September 27, 2026 22:23
@Juliusolsson05
Juliusolsson05 changed the base branch from integration/batch-2026-09-27-t to main September 27, 2026 22:23
@Juliusolsson05
Juliusolsson05 changed the base branch from main to integration/batch-2026-09-27-u September 27, 2026 22:47
@Juliusolsson05
Juliusolsson05 merged commit 0095df1 into integration/batch-2026-09-27-u Sep 27, 2026
2 checks passed
@Juliusolsson05
Juliusolsson05 deleted the fix/claude-slash-picker-colour-select branch September 27, 2026 22:47
Juliusolsson05 added a commit that referenced this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

class:C8-rendering Rendering order/duplicates sev:P3 Minor type:bug Something works wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(claude): a colour-only slash-picker selection change never republishes the picker

1 participant