YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(sidebar): hide left-sidebar scrollbars off macOS (Windows/Linux) (#4482)
Louis Beaumontfdecd38dc32e
diff --git a/apps/screenpipe-app-tauri/components/app-sidebar.tsx b/apps/screenpipe-app-tauri/components/app-sidebar.tsxindex dc70a70ee..043668c4d 100644--- a/apps/screenpipe-app-tauri/components/app-sidebar.tsx+++ b/apps/screenpipe-app-tauri/components/app-sidebar.tsx@@ -8,6 +8,7 @@ import { cn } from "@/lib/utils";import { useSettings } from "@/lib/hooks/use-settings";import { useIsFullscreen } from "@/lib/hooks/use-is-fullscreen";import { useSidebarWidth } from "@/lib/hooks/use-sidebar-width";+import { usePlatform } from "@/lib/hooks/use-platform";// ─── Context ─────────────────────────────────────────────────────────────────// Provides `isTranslucent` to any descendant without prop-drilling.@@ -83,6 +84,13 @@ export function AppSidebar({ children, className }: AppSidebarProps) {// fullscreen — content shifts to where the traffic lights used to be.const fullscreen = useIsFullscreen();const { width, isResizing, beginResize } = useSidebarWidth();+ // macOS (WKWebView) renders an unstyled overflow-auto scrollbar as an+ // auto-hiding overlay, so it stays invisible when idle. Windows/Linux+ // (WebView2 / Chromium) render it as a persistent, space-reserving classic+ // scrollbar — so expanding a pipe section in the embedded list pops a bar+ // into the left sidebar. Hide it off macOS (scrolling still works via+ // wheel/trackpad); leave macOS untouched.+ const { isMac } = usePlatform();return (<div@@ -104,7 +112,7 @@ export function AppSidebar({ children, className }: AppSidebarProps) {{/* Inner scroll container keeps the resize handle pinned to the* viewport edge — putting overflow on the outer would let the* absolute-positioned handle scroll with the content. */}- <div className="flex flex-col min-h-0 flex-1 overflow-x-hidden overflow-y-auto">+ <div className={cn("flex flex-col min-h-0 flex-1 overflow-x-hidden overflow-y-auto", !isMac && "scrollbar-hide")}>{children}</div><divdiff --git a/apps/screenpipe-app-tauri/components/chat-sidebar.tsx b/apps/screenpipe-app-tauri/components/chat-sidebar.tsxindex 521399a95..5702f8973 100644--- a/apps/screenpipe-app-tauri/components/chat-sidebar.tsx+++ b/apps/screenpipe-app-tauri/components/chat-sidebar.tsx@@ -48,6 +48,7 @@ import {} from "lucide-react";import { useRunningPipes } from "@/lib/hooks/use-running-pipes";import { useUpcomingPipes, type UpcomingPipe } from "@/lib/hooks/use-upcoming-pipes";+import { usePlatform } from "@/lib/hooks/use-platform";import { localFetch } from "@/lib/api";import { emit, listen } from "@tauri-apps/api/event";import { cn } from "@/lib/utils";@@ -223,6 +224,13 @@ export function ChatSidebar({ className, onViewAll }: ChatSidebarProps) {const actions = useChatActions();const queueDepths = useQueueDepths();const [openConversationMenuId, setOpenConversationMenuId] = useState<string | null>(null);+ // macOS (WKWebView) auto-hides styled overlay scrollbars, so the minimal+ // scrollbar only flashes while actually scrolling. Windows/Linux (WebView2+ // / Chromium) render styled scrollbars as persistent, space-reserving+ // classic scrollbars — so expanding a pipe section (which grows the sidebar+ // past the viewport) makes a scrollbar pop in. Hide it off macOS to match,+ // mirroring the html/body `scrollbar-hide` convention in globals.css.+ const { isMac } = usePlatform();// Sync currentId from standalone-chat. Whenever the chat panel switches// its piSessionIdRef (new chat, prefill auto-send, history click in the@@ -776,7 +784,8 @@ export function ChatSidebar({ className, onViewAll }: ChatSidebarProps) {// (Timeline / Memories / ...) and look misaligned.<divclassName={cn(- "flex flex-col min-h-0 text-sm px-2 overflow-y-auto overflow-x-hidden scrollbar-minimal",+ "flex flex-col min-h-0 text-sm px-2 overflow-y-auto overflow-x-hidden",+ isMac ? "scrollbar-minimal" : "scrollbar-hide",className)}data-testid="chat-sidebar"