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. */}
+