Skip to content

Fix mouse wheel overlay routing#209

Open
andyrewlee wants to merge 1 commit intomainfrom
funky-scroll
Open

Fix mouse wheel overlay routing#209
andyrewlee wants to merge 1 commit intomainfrom
funky-scroll

Conversation

@andyrewlee
Copy link
Copy Markdown
Owner

What changed

This updates mouse-wheel routing so wheel input no longer leaks through to the previously focused pane when the pointer is over a different pane that cannot consume wheel input.

It also narrows the overlay blocker so only true modal/error overlays and toast-covered coordinates block background scrolling. Prefix mode still consumes wheel input over the palette itself, but no longer blocks wheel scrolling across the rest of the UI.

Why

The bug was that wheel routing started from the focused pane and only retargeted when the hovered pane could actively consume wheel input. That allowed cases like:

  • hovering an empty sidebar terminal while the center terminal scrolled underneath
  • hovering the dashboard while the focused center pane still scrolled
  • hovering overlays while background panes still scrolled

A follow-up regression from the first fix made prefixActive behave like a full-screen wheel blocker because overlayVisible() includes prefix mode. This PR fixes that by keeping prefix blocking scoped to the palette hit area.

User impact

Wheel scrolling now matches pointer location more consistently:

  • hovered scrollable panes still retarget correctly
  • hovered non-scrollable panes consume wheel input instead of scrolling a hidden pane behind them
  • dialogs, file pickers, settings, error overlays, and toast-covered coordinates block background wheel input
  • prefix mode still allows normal wheel scrolling outside the palette

Root cause

The original routing model fell back to the focused pane whenever the hovered pane was not a valid wheel target. That created background scrolling that did not match pointer position.

The prefix regression came from reusing overlayVisible() for wheel blocking even though prefix mode is not a full-screen modal overlay.

Validation

  • go test ./internal/app -run 'TestRouteMouseWheel'
  • make lint-strict-new BASE=main
  • make devcheck

@andyrewlee andyrewlee marked this pull request as ready for review April 13, 2026 05:38
@andyrewlee andyrewlee changed the title [codex] Fix mouse wheel overlay routing Fix mouse wheel overlay routing Apr 13, 2026
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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