Skip to content

fix(dashboard): stop drawer scroll chaining into the page#3169

Merged
houko merged 1 commit into
mainfrom
fix/modal-overscroll-contain
Apr 25, 2026
Merged

fix(dashboard): stop drawer scroll chaining into the page#3169
houko merged 1 commit into
mainfrom
fix/modal-overscroll-contain

Conversation

@houko

@houko houko commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Bug from #3166: scrolling inside an agent / provider / skill drawer past its top or bottom edge propagated the wheel gesture to the underlying page. The drawer variant intentionally leaves the page interactive (no dim backdrop, pointer-events-none on the container), so scroll chaining was visible — the page slid under the drawer mid-scroll, jarring.

Fix

One Tailwind class on Modal's scroll wrapper:

- <div className="flex-1 overflow-y-auto scrollbar-thin">{children}</div>
+ <div className="flex-1 overflow-y-auto overscroll-contain scrollbar-thin">{children}</div>

overscroll-behavior: contain tells the browser to stop the wheel event at this element's boundary instead of propagating to ancestors. Standard CSS, well-supported.

The change applies to centred modals too, which silently fixes a pre-existing papercut: a long modal over a long page used to scroll the page once the modal bottomed out, even though the dim backdrop suggested the page was locked.

Test plan

  • Manual: open agent drawer with long detail content, scroll inside drawer past bottom → underlying agents list should NOT scroll (it did before this PR)
  • Manual: same for provider / skill / hand drawers (feat(dashboard): convert hand detail panel to drawer variant #3168 still in flight covers HandsPage)
  • Manual centred-modal regression: open Tools editor or Create Agent modal over a scrolled-down list, scroll past modal bottom → list should NOT scroll
  • CI green

When the agent / provider / skill / hand drawer scrolled past its top
or bottom edge, the wheel event chained up to the underlying page —
visible because the drawer variant deliberately leaves the page
interactive (no dim backdrop, pointer-events-none on the container).
Add overscroll-contain to Modal's children scroll wrapper so the
gesture stops at the dialog boundary.

The change applies to centred modals too, which fixes a pre-existing
papercut: a long modal sitting over a long page would, on bottoming
out, start scrolling the page underneath even though the backdrop
visually suggested the page was locked.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added the ready-for-review PR is ready for maintainer review label Apr 25, 2026
@houko
houko merged commit c92a917 into main Apr 25, 2026
19 of 22 checks passed
@houko
houko deleted the fix/modal-overscroll-contain branch April 25, 2026 16:20
@github-actions github-actions Bot added no-rust-required This task does not require Rust knowledge size/XS < 10 lines changed and removed ready-for-review PR is ready for maintainer review labels Apr 25, 2026
@houko houko mentioned this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-rust-required This task does not require Rust knowledge size/XS < 10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant