From 676433c6848165b8908d054ead8de3842d28dc34 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 14 Aug 2026 15:51:43 -0700 Subject: [PATCH] fix(workspace-cleanup): make the filter panel scrollable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The height cap sat on the ScrollArea Root, but the Radix viewport inside is h-full — under an indefinite root height that collapses to auto, so the viewport grew to full content height with nothing to scroll while the root clipped at 420px. The last facet groups (Archived, and the tail of Workspace status) were unreachable behind the footer. Move the cap to the viewport, which is what the ScrollArea wrapper's viewportClassName exists for. Adds a regression test that pins the cap to the viewport; it fails against the previous markup. --- .../workspace-cleanup-filter-bar.test.tsx | 76 +++++++++++-------- .../workspace-cleanup-filter-bar.tsx | 6 +- 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.test.tsx b/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.test.tsx index 8575c3f710c..9e028ca6c63 100644 --- a/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.test.tsx +++ b/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.test.tsx @@ -6,39 +6,55 @@ import { WorkspaceCleanupFilterBar } from './workspace-cleanup-filter-bar' afterEach(cleanup) +function renderFilterBar(facetPanelOpen = false): void { + render( + + ) +} + describe('WorkspaceCleanupFilterBar', () => { it('keeps size measurement out of the browse controls', () => { - render( - - ) + renderFilterBar() expect(screen.queryByRole('button', { name: 'Scan' })).toBeNull() }) + + it('caps the facet panel height on the scroll viewport so it stays scrollable', () => { + renderFilterBar(true) + + // Why: on the ScrollArea Root the cap only clips — the h-full viewport + // collapses under an indefinite height and the last facet groups become + // unreachable behind the footer. + const viewport = document.querySelector('[data-slot="scroll-area-viewport"]') + const root = document.querySelector('[data-slot="scroll-area"]') + expect(viewport?.className).toContain('max-h-[420px]') + expect(root?.className).not.toContain('max-h-') + }) }) diff --git a/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.tsx b/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.tsx index 5cb4e389af5..4543018a982 100644 --- a/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.tsx +++ b/src/renderer/src/components/workspace-cleanup/workspace-cleanup-filter-bar.tsx @@ -68,7 +68,11 @@ export function WorkspaceCleanupFilterBar({ - + {/* Why: the cap must sit on the scroll viewport. On the Root it only + clips — the viewport is h-full, which collapses to auto under an + indefinite height, so the panel grew past the cap unscrollably and + hid the last facet groups behind the footer. */} +