Skip to content

Stop onboarding and satellite pickers from turning on DEC mouse reporting - #346

Merged
TheGreatAxios merged 1 commit into
release/tui-bugfixesfrom
cl-5540-mouse-drag-select-must-work-without-a-modifier-or-a-picker
Aug 7, 2026
Merged

Stop onboarding and satellite pickers from turning on DEC mouse reporting#346
TheGreatAxios merged 1 commit into
release/tui-bugfixesfrom
cl-5540-mouse-drag-select-must-work-without-a-modifier-or-a-picker

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The provider-setup onboarding screen and the satellite list modals (session resume, session mode) each create their own OpenTUI renderer with createCliRenderer defaults, which turn DEC mouse reporting (?1000/?1002/?1003/?1006) on — stealing button-1 drags from the terminal before a session even starts, even though the main product host already disabled it
  • Disable mouse reporting on those two renderer call sites the same way the product host does, so drag-select and the terminal's own copy work with no modifier from the very first screen onward

Verification

  • bun run typecheck, bun run build, and bun test all pass; the only intermittent failures are pre-existing flaky markdown-rows.test.ts cases (which sub-test fails varies by run), reproduced independently of this change and unrelated to mouse/renderer code
  • Added a test that mocks @opentui/core so the real (non-test-injected) createCliRenderer branch in both runListModal and runProviderSetup actually runs, and asserts the call was made with useMouse: false, enableMouseMovement: false; the mock is restored in afterAll so it cannot leak into other tests in the same process
  • Captured raw pty bytes (via script) from the actual built CLI's onboarding screen before and after the fix: before, the stream contained ?1000h?1002h?1003h?1006h; after, none of those four sequences appear anywhere in the captured stream
  • Checked the two surfaces that actually lose mouse reporting here, not the main product host: list-modal.ts's own onKey handles Escape/Ctrl+C/Ctrl+D, and its createAppShell call wires the shared up/down/j/k overlay navigation (shell.ts moveOverlaySelection) with wireKeys at its default of true; provider-setup.ts has its own complete onKey handler (provider-setup.ts:1334-1378) with Ctrl+C/Ctrl+D cancel, Escape, and up/down/j/k list navigation, independent of the shell. Both surfaces are fully keyboard-operable with no mouse.

Closes CL-5540

@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

CL-5540

@TheGreatAxios
TheGreatAxios changed the base branch from main to release/tui-bugfixes August 7, 2026 04:20
@TheGreatAxios
TheGreatAxios force-pushed the cl-5540-mouse-drag-select-must-work-without-a-modifier-or-a-picker branch from 6f9ce27 to 3d05119 Compare August 7, 2026 04:37
createCliRenderer defaults useMouse and enableMouseMovement to true,
so the onboarding provider picker and the satellite list modals
(session resume, session mode) were emitting the DEC mouse-reporting
sequences and stealing button-1 drags from the terminal before a
session even starts, even though the main product host already
disabled it. Native drag-select and copy now work with no modifier
from the very first screen.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5540-mouse-drag-select-must-work-without-a-modifier-or-a-picker branch from 3d05119 to c79e421 Compare August 7, 2026 04:57
@TheGreatAxios
TheGreatAxios merged commit 870ae54 into release/tui-bugfixes Aug 7, 2026
2 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-5540-mouse-drag-select-must-work-without-a-modifier-or-a-picker branch August 7, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant