Skip to content

Commit 59317dc

Browse files
committed
Correct comments left stale by the main-shell mouse default flip
These four spots described mouse reporting as off by default, matching the main shell's old behavior. The satellite pickers still keep reporting off on purpose, but the main shell now defaults it on, so the comments read backwards. Reword them to state each surface's actual behavior instead of claiming they match, and update the readiness doc to describe the decision as settled with current line references.
1 parent c2f8101 commit 59317dc

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

docs/tui-cutover-readiness.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ performed.
9999
the shell's key handler), but the reported real-terminal failure is not
100100
reproduced or explained. Until someone pastes into a real TTY, treat text paste
101101
as unverified.
102-
2. **Mouse selection policy (CL-5540).** DEC mouse reporting is moving to
103-
off-by-default (`mouseCapture` in `src/tui-opentui/product-host.ts:101`) so the
104-
terminal owns drag-select and copy. The cost is that click-to-expand and
105-
drag-scroll are off unless the user presses `Alt+M`
106-
(`src/tui-opentui/shell.ts:3392`). This is a deliberate trade, but it is a
107-
visible regression for mouse users and the default is not settled.
102+
2. **Mouse selection policy (CL-5540).** DEC mouse reporting defaults on in
103+
the main shell (`useMouse` in `src/tui-opentui/product-host.ts:218`), so
104+
wheel scroll and click-to-expand work out of the box. The cost is native
105+
text selection, which the terminal cannot perform while reporting is on;
106+
`Alt+M` (`toggleMouseCapture` in `src/tui-opentui/shell.ts:4006`) hands the
107+
mouse back for that. The satellite pickers (`list-modal.ts`,
108+
`provider-setup.ts`) keep reporting off and are unaffected. This is the
109+
settled decision, not a pending tradeoff.
108110
3. **Shift+Enter does not insert a newline on terminals that do not report the
109111
modifier.** `Ctrl+Enter` and `Ctrl+J` are the working newline chords and the
110112
help catalog says so (`src/tui-opentui/keybindings.ts`). The kitty keyboard

src/tui-opentui/list-modal.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ export async function runListModal(
4444
: await createCliRenderer({
4545
exitOnCtrlC: false,
4646
targetFps: 30,
47-
// Same trade as the product host (CL-5540): reporting off by default
48-
// so the terminal owns drag-select and its own copy in these satellite
49-
// pickers too.
47+
// Reporting stays off in this satellite picker, unlike the main
48+
// shell, so the terminal owns drag-select and its own copy here.
5049
useMouse: false,
5150
enableMouseMovement: false,
5251
})

src/tui-opentui/mouse-reporting-disabled.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/**
22
* CL-5540: the onboarding provider picker and the satellite list modals
33
* (session resume, session mode) mount their own renderer and must disable
4-
* DEC mouse reporting the same way the product host does, or the terminal
5-
* never gets button-1 drags to run its own text selection. These tests mock
6-
* `@opentui/core` so the real (non-test-injected) `createCliRenderer` branch
7-
* runs, and assert on the options it was actually called with.
4+
* DEC mouse reporting, unlike the main shell, or the terminal never gets
5+
* button-1 drags to run its own text selection in these pickers. These
6+
* tests mock `@opentui/core` so the real (non-test-injected)
7+
* `createCliRenderer` branch runs, and assert on the options it was
8+
* actually called with.
89
*/
910
import { afterAll, describe, expect, mock, test } from "bun:test"
1011
import type { Harness } from "./harness.js"

src/tui-opentui/provider-setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,8 @@ export async function runProviderSetup(
586586
: await createCliRenderer({
587587
exitOnCtrlC: false,
588588
targetFps: 30,
589-
// Same trade as the product host (CL-5540): reporting off by default
590-
// so the terminal owns drag-select and its own copy during onboarding.
589+
// Reporting stays off during onboarding, unlike the main shell, so
590+
// the terminal owns drag-select and its own copy here.
591591
useMouse: false,
592592
enableMouseMovement: false,
593593
})

0 commit comments

Comments
 (0)