From 583166d0b29b8f4f4ca37d2a963323fcd2dd9ecf Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 14 Aug 2026 16:26:00 -0700 Subject: [PATCH] fix(workspace-cleanup): keep filter footer visible --- .../workspace-cleanup-filter-bar.test.tsx | 13 ++++++------- .../workspace-cleanup-filter-bar.tsx | 13 +++++++------ 2 files changed, 13 insertions(+), 13 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 9e028ca6c63..0927053709e 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 @@ -46,15 +46,14 @@ describe('WorkspaceCleanupFilterBar', () => { expect(screen.queryByRole('button', { name: 'Scan' })).toBeNull() }) - it('caps the facet panel height on the scroll viewport so it stays scrollable', () => { + it('keeps the footer visible while the facet panel scrolls', () => { 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 content = document.querySelector('[data-slot="popover-content"]') const root = document.querySelector('[data-slot="scroll-area"]') - expect(viewport?.className).toContain('max-h-[420px]') - expect(root?.className).not.toContain('max-h-') + expect(content?.className).toContain( + 'h-[min(471px,var(--radix-popover-content-available-height))]' + ) + expect(root?.className).toContain('min-h-0 flex-1') }) }) 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 4543018a982..1fcfa2049dc 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 @@ -67,12 +67,13 @@ export function WorkspaceCleanupFilterBar({ ) : null} - - {/* 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. */} - + + {/* 471px preserves the 420px facet viewport plus the fixed footer at full height. */} +