Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): fix native scrollbar being intercepted by sidebar rail on windows and linux #618

Mergedsaishankar404(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/618/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

fixes #548

the sidebar rail is a 16px wide invisible button sitting at z-20 along the edge of the sidebar. when the sidebar is offcanvas and collapsed, that hit area ends up exactly where the native os scrollbar lives, so clicks and drags on the scrollbar were toggling the sidebar instead.

one css class added to SidebarRail: [[data-collapsible=offcanvas][data-state=collapsed]_&]:pointer-events-none

scoped to offcanvas+collapsed only so icon mode (where the rail stays visible and needs to be clickable to expand) is completely unaffected.

Note

Prevent sidebar rail button from intercepting native scrollbar on Windows and Linux by applying pointer-events-none when SidebarRail is offcanvas and collapsed in sidebar.tsx

Add a state-selective pointer-events-none to the SidebarRail button when data-collapsible=offcanvas and data-state=collapsed in sidebar.tsx; include an inline comment documenting the condition.

📍Where to Start

Start with the SidebarRail component’s button className logic in sidebar.tsx.

Macroscope summarized 5d3d46c.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: 1dabbaa3-66b4-4e88-b1dd-8ca02374fd95

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Tested this on Windows against the v0.0.8 desktop app behavior and this fix resolves the issue for me.

      Before this change, trying to drag the chat history scrollbar could hit the collapsed sidebar rail instead and open/toggle the sidebar. With this branch applied, the scrollbar is draggable normally again.

      I can confirm the Windows fix. I have not tested Linux.

    4. Proved: with the diff panel collapsed, a drag on the chat scrollbar scrolls the chat and no longer opens the diff panel.

      Base 4088b7aHead 5d3d46c
      Element under the scrollbar (x=1277)rail buttonchat scroller
      Rail pointer-eventsautonone
      Drag thumb y=80 → 420: chat scrollTop0 (no scroll)554
      Rail clicks / diff panel1 / opened0 / closed

      Expected: the collapsed offcanvas rail must not cover the native scrollbar. Base matches the bug: yes.

      Device: Google Chrome 156.0.8078.74 , headless, 1280×720, scrollbars shown, app scrollbar CSS (6 px).

      Harness: a static page with each commit's real SidebarRail class string, the real Sidebar markup of the right diff panel, and apps/web/src/index.css scrollbar rules. Tailwind v4.1.11 browser build. Not the full app, and not on Windows or Linux.

      Before/after: base drag opens diff panel, head drag scrolls chat

      Recordings: before.mp4 (base) · after.mp4 (head) · proof.json

Sign in to join this conversation.