Skip to content

TUI ext panel: scroll wheel doesn't scroll the panel (scrollbar drag works) #485

Description

@JDonaghy

Symptom

In an extension-provided sidebar panel with more items than fit in the viewport:

  • Dragging the scrollbar thumb scrolls the panel correctly.
  • Scrolling the mouse wheel while hovered over the panel does not scroll.

Repro

  1. Open an extension panel (e.g. `git_insights`) with enough items to need scrolling.
  2. Hover the mouse anywhere over the panel body.
  3. Scroll the wheel — list does not scroll.
  4. Drag the scrollbar thumb in the rightmost column — scrolls correctly.

Cause (suspected)

The wheel-dispatch path is registered correctly:

  • `src/tui_main/panels.rs` pushes a `ScrollSurface { id: "ext_panel:sb", bounds: }` each frame.
  • `src/tui_main/mouse.rs:1233` calls `quadraui::dispatch_scroll(modal_stack, &surfaces, point, delta)`.
  • `mouse.rs:1271` matches `"ext_panel:sb"` and adjusts `engine.ext_panel_scroll_top`.

So either:

  1. `dispatch_scroll` isn't finding the surface for the mouse position (bounds mismatch, surface cleared too early in the frame, or the modal_stack is intercepting), or
  2. The match arm fires but `scroll_top` clamp is wrong.

Worth instrumenting `dispatch_scroll` output and `ext_panel_scroll_top` before/after.

Repro environment

Smoke-tested on (terminal emulator). Filing follow-up to #476 / PR #482 — that migration did not touch the scroll surface registration or the wheel dispatch, so the behavior predates it. (The legacy renderer registered the exact same surface with the same bounds.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions