Repository navigation
Conversation
The sidebar's item list and the icon rail's group flyout used the global scrollbar: 8px with a grey track, always visible, drawing a stripe down the sidebar. - Thin scrollbar with no track, shown only while the list is scrolling. - In the inset sidebar, the list reaches into the panel's 8px padding so the scrollbar sits on the sidebar's edge; the items stay in place. - A bottom fade while there is more to scroll, using the same scroll-driven mask as the content area's top fade. - Scroll padding as tall as the fade, so keyboard focus stops clear of it. - The flyout's list now scrolls inside the popup, so the fade doesn't also mask the popup's border and shadow. Shared by both through sidebar/scroll-area.ts. Global scrollbar styles are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Code Metrics Report
Details | | main (923933d) | #740 (a8fb1b1) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 62.9% | 62.9% | +0.0% |
| Files | 294 | 295 | +1 |
| Lines | 13483 | 13503 | +20 |
+ | Covered | 8485 | 8500 | +15 |
+ | Test Execution Time | 4m3s | 3m7s | -56s |Code coverage of files in pull request scope (11.5% → 11.7%, patch 100.0%)
Reported by octocov |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The changes leave overlapping scrollbar and resize-handle targets, scrollbar-thumb contrast below the required 3:1 ratio, and a scroll mask that snaps rather than fades smoothly.
3 open issues
What changed in this PR
This PR refines scrolling in AppShell’s sidebar list and icon-rail flyouts without changing the public API or global scrollbar styles.
Changes:
- Adds a shared scrolling hook for thin, trackless scrollbars that hide after 800ms.
- Moves inset sidebar scrollbars to the panel edge and adds a scroll-driven bottom fade with keyboard-focus padding.
- Moves flyout scrolling inside the popup to preserve its frame, with regression tests and a patch changeset.
| File | Description |
|---|---|
packages/core/src/globals.css |
Adds sidebar bottom-fade keyframes. |
packages/core/src/components/sidebar/sidebar.test.tsx |
Tests scrollbar timing, consumer callbacks, and inset-edge classes. |
packages/core/src/components/sidebar/sidebar-group.tsx |
Introduces an inner flyout scroll area. |
packages/core/src/components/sidebar/scroll-area.ts |
Adds shared scroll styling and visibility state. |
packages/core/src/components/sidebar/primitives.tsx |
Applies scrolling behavior and inset-edge spacing to the sidebar list. |
packages/core/src/components/sidebar/default-sidebar.test.tsx |
Tests flyout scroll containment and visibility state. |
.changeset/quiet-sidebar-scroll.md |
Records the visual changes for a patch release. |
Review effort: Balanced
| SIDEBAR_SCROLL_AREA_CLASS, | ||
| // The inset sidebar pads its panel by 8px; reach into that padding so | ||
| // the scrollbar sits on the sidebar's edge, keeping the content in place. | ||
| "astw:group-data-[variant=inset]:-mr-2 astw:group-data-[variant=inset]:pr-2", |
| */ | ||
| export const SIDEBAR_SCROLL_AREA_CLASS = [ | ||
| "astw:[scrollbar-width:thin] astw:[scrollbar-color:transparent_transparent]", | ||
| "astw:data-scrolling:[scrollbar-color:color-mix(in_oklab,var(--muted-foreground)_45%,transparent)_transparent]", |
| /* Sidebar list: fades its bottom edge while there is more to scroll. */ | ||
| @keyframes appshell-sidebar-fade { | ||
| from { | ||
| mask-image: linear-gradient(to top, #0000 0, #000 2rem, #000 100%); |
- Keep the scrollbar clear of the resize handle's hit area - Use the full --muted-foreground thumb colour to meet 3:1 contrast - Animate the bottom fade smoothly by sliding a fixed gradient mask Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
The sidebar's item list and the icon rail's group flyout used the global scrollbar: 8px wide with a grey track, always visible. It drew a stripe down the sidebar, 8px in from its edge. This PR makes both scroll more quietly, without touching the global scrollbar style.
How
sidebar/scroll-area.ts(internal) holds the classes and a smalluseScrollinghook. "Scrolling" is set from the scroll event handler, and a timer clears it. The only effect clears that timer on unmount.SidebarContentuses the helper and still calls a consumer's ownonScroll.globals.cssgains one keyframe,appshell-sidebar-fade, next to the existingappshell-content-fade. No existing rule changes.No public API changes. A patch changeset describes the visual change.
Browser support
scrollbar-widthandscrollbar-color. Safari may ignorescrollbar-colorand keep the global 8px webkit scrollbar style there. Worth a check if anyone is on Safari with "Show scroll bars: Always".Testing
onScrollstill runsThings to look at
--muted-foreground), similar to a macOS overlay scrollbar. It's lighter than the 3:1 guidance for controls; say if you'd rather it be stronger.🤖 Generated with Claude Code