docs(cli-registry): say a version-gated wheel rule needs gates to forward

A version-gated rule reads the session's cliVersion, which the server
probes only for an entry that declares capabilities.gates, so a custom
entry with version-gated and no gates never forwards. Also brings the
claude and copilot comments in line with the code that now reads them.
This commit is contained in:
JD committed 2026-11-19 02:39:47 -05:00
1 parent 3ef4900e60
commit b5a356dadf
3 files changed
+9 -5

No files matched your search

+4 -4
View File
@@ -303,8 +303,8 @@ const CLAUDE: CliEntry = {
transcript: 'claude-jsonl',
altScreen: 'strip-full',
echo: { policy: 'buffer', anchor: { kind: 'glyph', glyph: '❯', offset: 2 } },
// Declared-for-later: the live rule (`_shouldForwardWheelToApp`, terminal-ui.js) is this version
// AND the server-published `cliMouseTracking` flag (#498), so wiring this field up needs both.
// Read by `_shouldForwardWheelToApp` (terminal-ui.js) through `window.__codemanWheelForward`;
// forwarding also needs the server-published `cliMouseTracking` flag (#498).
wheelForward: { mode: 'version-gated', minVersion: '2.1.187' },
// A repaint-mode Claude pane keeps no local history, so when the wheel is not
// forwarded (older CLI, inline renderer, the local-scrollback opt-out) a scroll is
@@ -1926,8 +1926,8 @@ const COPILOT: CliEntry = {
// (`cliMouseTracking`). Same shape and reason as opencode. The wheel keeps working because
// `_shouldForwardWheelToApp` forwards it as SGR reports while the CLI is tracking.
altScreen: 'strip-mux-and-mouse',
// Forwards the wheel as SGR reports while the CLI is tracking the mouse, at any version
// (`_shouldForwardWheelToApp` in terminal-ui.js has no version check for copilot).
// Forwards the wheel as SGR reports while the CLI is tracking the mouse, at any version:
// `always` is what keeps `_shouldForwardWheelToApp` (terminal-ui.js) from checking one.
wheelForward: { mode: 'always' },
// Pages its own transcript on PageUp/PageDown (1.0.95, measured in tmux: three PageUp moved
// lines 109-140 to 010-042 and PageDown returned). This is the fallback when the
+4
View File
@@ -600,6 +600,10 @@ export interface CliCapabilities {
* `window.__codemanWheelForward`, which the server builds from this field for every CLI
* whose mode is not `never`, disabled ones included (their running sessions stay open).
*
* ⚠️ 'version-gated' needs the session's `cliVersion`, and the server probes a version only
* for an entry that declares `capabilities.gates` (`cliNeedsVersionProbe`, session.ts). An
* entry without gates never forwards under 'version-gated', silently, so it uses 'always'.
*
* ⚠️ `cliMouseTracking` is only ever set for a CLI whose mouse DECSETs the server strips
* (`altScreen: 'strip-full'` or `'strip-mux-and-mouse'`), so a forwarding mode on any other
* `altScreen` never forwards: xterm keeps the DECSETs and encodes the wheel itself, until a