π OpenHands: AI-Driven Development
fix(settings): give the settings screen a definite height (#18256)
Engel Nystdbace3476001
diff --git a/.pr/sdk-version-bump.svg b/.pr/sdk-version-bump.svgdeleted file mode 100644index e3f9d016b5..0000000000--- a/.pr/sdk-version-bump.svg+++ /dev/null@@ -1,7 +0,0 @@-<svg xmlns="http://www.w3.org/2000/svg" width="620" height="260" viewBox="0 0 620 260">- <rect width="100%" height="100%" fill="#0d1117"/>- <text x="24" y="40" font-family="monospace" font-size="18" fill="#3fb950">SDK version bump evidence</text>- <text x="24" y="76" font-family="monospace" font-size="15" fill="#e6edf3">versions.agentServer: 1.53.0 -> 1.54.0</text>- <text x="24" y="104" font-family="monospace" font-size="15" fill="#e6edf3">@openhands/typescript-client: 1.53.0 -> 1.54.0</text>- <text x="24" y="132" font-family="monospace" font-size="15" fill="#e6edf3">package.json/package-lock.json + doc/test literals synced to 1.54.0</text>-</svg>diff --git a/src/routes/settings.tsx b/src/routes/settings.tsxindex 5f61946a62..8cecee4850 100644--- a/src/routes/settings.tsx+++ b/src/routes/settings.tsx@@ -102,9 +102,12 @@ function SettingsScreen() {return <Navigate to={LOCKED_CLOUD_SETTINGS_NAV_PATH} replace />;}- // SettingsLayout renders the page's only <main> landmark (#17909).+ // SettingsLayout renders the page's only <main> landmark (#17909). Its+ // h-full needs this definite height, as Customize roots provide: below lg,+ // main then fills the column and scrolls, and popovers inside it are not+ // clipped on short pages (#18255).return (- <div data-testid="settings-screen" className="min-h-0">+ <div data-testid="settings-screen" className="h-full min-h-0"><SettingsSectionHeaderProvidersetHideSectionHeader={setHideSectionHeader}>diff --git a/tests/e2e/settings-responsive.spec.ts b/tests/e2e/settings-responsive.spec.tsindex 3e951fa292..03d10c0d1b 100644--- a/tests/e2e/settings-responsive.spec.ts+++ b/tests/e2e/settings-responsive.spec.ts@@ -77,6 +77,24 @@ for (const width of [390, 767, 768, 820, 1023, 1024, 1440]) {await main.evaluate((el) => el.scrollWidth <= el.clientWidth + 1),).toBe(true);}+ if (compact) {+ // As on Customize, Settings' main fills the column and scrolls itself,+ // so a popover inside it is not clipped on a short page (#18255).+ for (const [route, scrolls] of [+ ["/settings/secrets", false],+ ["/settings/app", true],+ ] as const) {+ await openMockPage(page, route);+ const main = page.locator("main").last();+ await expect(main).toBeVisible();+ const fit = await main.evaluate((el) => ({+ bottom: el.getBoundingClientRect().bottom,+ scrolls: el.scrollHeight > el.clientHeight,+ }));+ expect(Math.abs(fit.bottom - 1024)).toBeLessThanOrEqual(1);+ expect(fit.scrolls).toBe(scrolls);+ }+ }await openMockPage(page, "/settings");if (compact)await expect(page.getByTestId("settings-mobile-hub")).toBeVisible();