Skip to content

Fix pane wheel smoothing oscillation when close to target - #16

Merged
svenbuild merged 1 commit into
mainfrom
codex/fix-pane-wheel-smoothing-oscillation-issue
Mar 31, 2026
Merged

svenbuild merged 1 commit into
mainfrom
codex/fix-pane-wheel-smoothing-oscillation-issue

Conversation

@svenbuild

Copy link
Copy Markdown
Owner

Motivation

  • The pane wheel smoothing used a hard minimum step (PANE_WHEEL_MIN_STEP) which could overshoot when the remaining distance to the target was small, causing the animation to oscillate and never cancel.

Description

  • Adjusted the animate() step calculation in src/App.svelte to cap the step magnitude to Math.abs(remaining) before applying the sign, ensuring no overshoot for small remaining distances.
  • Preserved the original smoothing behavior for larger deltas by keeping the existing PANE_WHEEL_MIN_STEP and smoothing factor in the magnitude computation.
  • The change is localized to the scroll animation logic and does not modify termination or synchronization flow.

Testing

  • Ran npm run check which executes svelte-check and tsc, and it passed with no errors.
  • Ran npm test which invokes cargo test for the Tauri backend, but it failed in this environment due to a missing system dependency (glib-2.0 / glib-2.0.pc) required by glib-sys, so full test execution could not complete.

Codex Task

@svenbuild
svenbuild merged commit d1a616b into main Mar 31, 2026
1 check failed
@svenbuild
svenbuild deleted the codex/fix-pane-wheel-smoothing-oscillation-issue branch March 31, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant