The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(desktop): fade the sidebar's scrollbars out until you're in the list
Brooklyn Nicholson6c371e944c68
diff --git a/apps/desktop/src/app/chat/sidebar/cron-jobs-section.tsx b/apps/desktop/src/app/chat/sidebar/cron-jobs-section.tsxindex fea0d8dff07..9fadcfbc424 100644--- a/apps/desktop/src/app/chat/sidebar/cron-jobs-section.tsx+++ b/apps/desktop/src/app/chat/sidebar/cron-jobs-section.tsx@@ -150,7 +150,7 @@ export function SidebarCronJobsSection({</button></div>{open && (- <SidebarGroupContent className="flex max-h-72 flex-col gap-px overflow-x-hidden overflow-y-auto overscroll-contain pb-1.75 compact:max-h-none compact:overflow-visible">+ <SidebarGroupContent className="scrollbar-fade flex max-h-72 flex-col gap-px overflow-x-hidden overflow-y-auto overscroll-contain pb-1.75 compact:max-h-none compact:overflow-visible">{shown.map(job => (<CronJobSidebarRowexpanded={peekJobId === job.id}diff --git a/apps/desktop/src/app/chat/sidebar/index.tsx b/apps/desktop/src/app/chat/sidebar/index.tsxindex 05a0f2f811e..040f0ec4c37 100644--- a/apps/desktop/src/app/chat/sidebar/index.tsx+++ b/apps/desktop/src/app/chat/sidebar/index.tsx@@ -212,8 +212,9 @@ const SIDEBAR_NAV: SidebarNavItem[] = [// the next — the flexbox `min-height: auto` overlap trap that caused the bug.const COMPACT_FLAT = 'compact:max-h-none compact:overflow-visible'-// Vertical scroll only — never a horizontal bar from glow bleed, long titles, etc.-const SCROLL_Y = 'overflow-y-auto overflow-x-hidden overscroll-contain'+// Vertical scroll only — never a horizontal bar from glow bleed, long titles,+// etc. The bar itself only shows while the pointer is in the list.+const SCROLL_Y = 'overflow-y-auto overflow-x-hidden overscroll-contain scrollbar-fade'// The outer list reserves its bar's width whether or not one is showing, so// filtering or collapsing a section doesn't reflow every row sideways. Only thediff --git a/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsx b/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsxindex e9b38c21549..6ce09077faa 100644--- a/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsx+++ b/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsx@@ -143,7 +143,10 @@ export const VirtualSessionList: FC<VirtualSessionListProps> = ({// just consume that context via useSortable.return (<div- className={cn('relative min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain', className)}+ className={cn(+ 'scrollbar-fade relative min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain',+ className+ )}ref={scrollerRef}><div className="grid gap-px" style={{ paddingBottom: `${paddingBottom}px`, paddingTop: `${paddingTop}px` }}>diff --git a/apps/desktop/src/components/ui/sidebar.tsx b/apps/desktop/src/components/ui/sidebar.tsxindex 9716d246d9f..79399f4fec1 100644--- a/apps/desktop/src/components/ui/sidebar.tsx+++ b/apps/desktop/src/components/ui/sidebar.tsx@@ -341,7 +341,7 @@ function SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {return (<divclassName={cn(- 'flex min-h-0 flex-1 flex-col gap-2 overflow-x-hidden overflow-y-auto group-data-[collapsible=icon]:overflow-hidden',+ 'scrollbar-fade flex min-h-0 flex-1 flex-col gap-2 overflow-x-hidden overflow-y-auto group-data-[collapsible=icon]:overflow-hidden',className)}data-sidebar="content"diff --git a/apps/desktop/src/styles.css b/apps/desktop/src/styles.cssindex bfc7392f13d..75dec6eb678 100644--- a/apps/desktop/src/styles.css+++ b/apps/desktop/src/styles.css@@ -1144,6 +1144,26 @@ code {display: none;}+ /* Hover-only bars. A thumb sitting on a list you aren't touching is chrome,+ not information — the gutter is reserved either way, so fading it in and+ out costs no reflow. Opt-in per surface: the sidebar wants it, a document+ you're reading down wants its bar where you can see it. */+ .scrollbar-fade::-webkit-scrollbar-thumb,+ .scrollbar-dt .scrollbar-fade::-webkit-scrollbar-thumb {+ background-color: transparent;+ transition: background-color 150ms ease-out;+ }++ .scrollbar-fade:hover::-webkit-scrollbar-thumb,+ .scrollbar-dt .scrollbar-fade:hover::-webkit-scrollbar-thumb {+ background-color: color-mix(in srgb, var(--dt-midground) 18%, transparent);+ }++ .scrollbar-fade:hover::-webkit-scrollbar-thumb:hover,+ .scrollbar-dt .scrollbar-fade:hover::-webkit-scrollbar-thumb:hover {+ background-color: color-mix(in srgb, var(--dt-midground) 40%, transparent);+ }+/* Variant for portaled overlays (Radix DropdownMenu, Popover, etc.) thatrender under document.body, outside the `.scrollbar-dt` scope on#root. Same visual treatment, applied directly to the overlay@@ -1191,6 +1211,15 @@ code {scrollbar-width: thin;scrollbar-color: color-mix(in srgb, var(--dt-midground) 28%, transparent) transparent;}++ /* No transition — Firefox doesn't animate scrollbar-color. */+ .scrollbar-fade {+ scrollbar-color: transparent transparent;+ }++ .scrollbar-fade:hover {+ scrollbar-color: color-mix(in srgb, var(--dt-midground) 18%, transparent) transparent;+ }}}