Skip to content

fix(ui): isolate OpenTUI scroll reset compatibility - #786

Open
atirna wants to merge 5 commits into
modem-dev:mainfrom
atirna:fix/opentui-scroll-accumulator
Open

fix(ui): isolate OpenTUI scroll reset compatibility#786
atirna wants to merge 5 commits into
modem-dev:mainfrom
atirna:fix/opentui-scroll-accumulator

Conversation

@atirna

@atirna atirna commented Aug 16, 2026

Copy link
Copy Markdown

Problem

Shift+Wheel has to clear OpenTUI wheel remainders after Hunk reroutes the input horizontally. The previous inline private-member assertion used optional chaining, so an OpenTUI rename could silently let later input move the review viewport.

Approach

  • isolate the OpenTUI 0.5.1 private access in one named compatibility bridge
  • document the invariant and removal condition for a future public OpenTUI API
  • throw a focused error if the required operation disappears instead of silently degrading
  • cover the locked runtime operation and Shift+Wheel handling in both rendered and real-PTY tests

Validation

  • bun run typecheck
  • bun run lint
  • bun run format:check
  • bun run check:docs
  • bun run test (2807 passed, 24 skipped)
  • bun test src/ui/components/panes/DiffPane.test.tsx src/ui/AppHost.interactions.test.tsx --test-name-pattern "resetOpenTuiScrollAccumulators|shift plus (mouse wheel|native horizontal)" (5 passed)
  • bun test test/pty/layout.test.ts --test-name-pattern "shifted mouse-wheel input" (1 passed)

Fixes #771

@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

@atirna is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

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.

Stop silently depending on OpenTUI private scroll accumulator state

1 participant