From f25489ede8f74d98280e03b0ce99aa174be7aa68 Mon Sep 17 00:00:00 2001 From: Julius Olsson Date: Sun, 27 Sep 2026 00:30:57 -0700 Subject: [PATCH 1/4] docs(plan): a colour-only slash-picker selection change republishes the picker (#1253) Co-Authored-By: Claude Opus 5.5 --- ...09-27-claude-slash-picker-colour-select.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/plans/2026-09-27-claude-slash-picker-colour-select.md diff --git a/docs/plans/2026-09-27-claude-slash-picker-colour-select.md b/docs/plans/2026-09-27-claude-slash-picker-colour-select.md new file mode 100644 index 000000000..97637d61d --- /dev/null +++ b/docs/plans/2026-09-27-claude-slash-picker-colour-select.md @@ -0,0 +1,21 @@ +# Claude slash picker: a colour-only selection change republishes the picker (#1253) + +## Problem +`detectSlashPicker` reads the selected row from relative foreground colour. `HeadlessTerminal.scheduleFlush` gates emission on the `plain` + `recent` TEXT only, so arrowing through the picker, which changes only the highlight colour, emits no `screen` frame. `ClaudeCodeHeadless` never reparses the picker, and `claude.slash-picker` keeps the old selected row until the text changes. This predates #1236. Also, nothing pins the producer: replacing `slashPicker: this.pickerState` with an empty picker survived every picker suite. + +## Constraint (why the gate is text-only) +Serialising cell attributes on every flush is the 60 Hz snapshot churn that once pinned main at ~80% CPU (agent-code#390; the gate's own comment). The fix must not make the common frame attribute-aware. + +## Decisions (defaults) +- **Only while a picker is visible** (the last parsed state had one), the gate also compares a picker-selection signature: which picker row carries the selected colour, read from the live grid for the picker's rows only (a handful of cells). With no picker, the hot path is unchanged. +- **Evidence first:** record a real Claude picker PTY sequence into `packages/claude-code-headless/testing/fixtures/`: + 1. open with `/`; + 2. filter; + 3. arrow down twice (colour-only changes); + 4. Esc. + + Drive the `claude` CLI directly in a PTY, not the Agent Code app. No model call is made, but decode and redact the whole fixture before committing it. +- **Tests:** a real-frame test on the recording asserts the `conditions` snapshots through open → filtered → selection moved (colour only) → closed. The producer is pinned, so an empty picker in the evaluator input fails. + +## Out of scope +Attribute-aware gating for anything else. The composer styling-flip case stays covered by the prompt gate's bounded staleness. From f9cb60eb8fe3287f7b3a9a017637d380d5929c34 Mon Sep 17 00:00:00 2001 From: Julius Olsson Date: Sun, 27 Sep 2026 00:52:45 -0700 Subject: [PATCH 2/4] chore(claude): bump claude-code-headless to claude-code-headless#66 (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 --- packages/claude-code-headless | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/claude-code-headless b/packages/claude-code-headless index 64fd0eaf1..848bb529f 160000 --- a/packages/claude-code-headless +++ b/packages/claude-code-headless @@ -1 +1 @@ -Subproject commit 64fd0eaf18a0a6cef58b9048e3768843b3e0e65b +Subproject commit 848bb529fd57d8280577e5fe614fd6dc52fdad39 From 6d4d64604d4274fbf402ed582d701f4e0fdfc504 Mon Sep 17 00:00:00 2001 From: Julius Olsson Date: Sun, 27 Sep 2026 00:59:09 -0700 Subject: [PATCH 3/4] chore(claude): bump claude-code-headless to claude-code-headless#66 head (128b8ea) Co-Authored-By: Claude Opus 5.5 --- packages/claude-code-headless | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/claude-code-headless b/packages/claude-code-headless index 848bb529f..128b8ea85 160000 --- a/packages/claude-code-headless +++ b/packages/claude-code-headless @@ -1 +1 @@ -Subproject commit 848bb529fd57d8280577e5fe614fd6dc52fdad39 +Subproject commit 128b8ea855b59db8c99dbfaf746043f63ad68459 From 90b3d8bd8e31c5df5aa551dd9ead03514d4adeeb Mon Sep 17 00:00:00 2001 From: Julius Olsson Date: Sun, 27 Sep 2026 01:03:48 -0700 Subject: [PATCH 4/4] chore(claude): bump claude-code-headless to claude-code-headless#66 head (2d9a0db) Co-Authored-By: Claude Opus 5.5 --- packages/claude-code-headless | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/claude-code-headless b/packages/claude-code-headless index 128b8ea85..2d9a0db97 160000 --- a/packages/claude-code-headless +++ b/packages/claude-code-headless @@ -1 +1 @@ -Subproject commit 128b8ea855b59db8c99dbfaf746043f63ad68459 +Subproject commit 2d9a0db973569dec6b265a49b245b9b0bbd795f0