Problem
Shift+Wheel handling in DiffPane calls OpenTUI's private ScrollBoxRenderable.resetScrollAccumulators method through a double assertion.
The reset is needed after Hunk intercepts shifted wheel input so residual fractional scroll state cannot move the vertical review position later. Because the method is private, OpenTUI can rename or remove it without a type error. Optional chaining then silently skips the reset, which can reintroduce the scrolling regression without an obvious failure.
Proposed direction
Prefer a public OpenTUI API for resetting wheel accumulator state. If upstream does not expose one yet:
- isolate the private access in a named OpenTUI compatibility adapter;
- document the exact runtime invariant and supported OpenTUI version;
- fail clearly when the private method is unavailable rather than silently degrading;
- retain user-visible interaction coverage for shifted vertical and native horizontal wheel events.
The compatibility adapter should be removed once a public upstream operation is available.
Acceptance criteria
DiffPane no longer performs an inline private-member assertion.
- An OpenTUI upgrade that removes or renames the required operation fails focused tests clearly.
- Shift+Wheel continues scrolling code horizontally without changing the vertical review position.
- The workaround is localized and documents its deletion condition.
Problem
Shift+Wheel handling in
DiffPanecalls OpenTUI's privateScrollBoxRenderable.resetScrollAccumulatorsmethod through a double assertion.The reset is needed after Hunk intercepts shifted wheel input so residual fractional scroll state cannot move the vertical review position later. Because the method is private, OpenTUI can rename or remove it without a type error. Optional chaining then silently skips the reset, which can reintroduce the scrolling regression without an obvious failure.
Proposed direction
Prefer a public OpenTUI API for resetting wheel accumulator state. If upstream does not expose one yet:
The compatibility adapter should be removed once a public upstream operation is available.
Acceptance criteria
DiffPaneno longer performs an inline private-member assertion.