From d0a75e3b2e1f7ff0672c9e285a09b0924987b2f3 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Sat, 21 Nov 2026 15:21:56 -0700 Subject: [PATCH] fix(gui): a file picker's grid runs down to its button bar (#4750) --- src/gui/src/css/dashboard.css | 6 ++++-- src/puter-js/tests/e2e/specs/filePickers.spec.js | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/src/css/dashboard.css b/src/gui/src/css/dashboard.css index 9b15efd4c..7beccc70b 100644 --- a/src/gui/src/css/dashboard.css +++ b/src/gui/src/css/dashboard.css @@ -12418,8 +12418,10 @@ span[data-avatar-user] > .avatar-picture { } } -/* No footer under the listing here. */ -.file-picker .files { +/* No footer under the listing here. The Files tab's grids clear its footer + with a rule of their own, which this has to outrank. */ +.file-picker .files, +.dashboard-section-files.file-picker .files-tab .files.files-grid-view { margin-bottom: 0; } diff --git a/src/puter-js/tests/e2e/specs/filePickers.spec.js b/src/puter-js/tests/e2e/specs/filePickers.spec.js index 0c94bd9fa..df38f18eb 100644 --- a/src/puter-js/tests/e2e/specs/filePickers.spec.js +++ b/src/puter-js/tests/e2e/specs/filePickers.spec.js @@ -233,6 +233,10 @@ test.describe('file pickers (env=app)', () => { await expect(picker.locator('.files')).toHaveClass(/files-grid-view/); await expect(row(picker, FOLDER)).toBeVisible(); + // The grid runs down to the button bar: a picker has no footer to clear. + const gap = await picker.evaluate(el => el.querySelector('.window-filedialog-prompt').getBoundingClientRect().top + - el.querySelector('.files').getBoundingClientRect().bottom); + expect(gap).toBe(0); }); test('Escape cancels the picker', async ({ page }) => {