From e1176fbb269c98752d96c5e28fc990598b09b4d4 Mon Sep 17 00:00:00 2001 From: Anso Date: Mon, 29 Jun 2026 21:13:32 -0400 Subject: [PATCH] fix: make auth canvas scroll actually constrain on short viewports (#1523) PR #1521 added max-height and overflow-y-auto but the card stayed content- sized because flex items default to min-height:auto and justify-center clipped overflow while html/body stay overflow:hidden. Add min-h-0 and my-auto, use dvh, scroll the auth shell, and pin Enter Sencho outside the preflight scroll region. --- frontend/src/components/Setup.tsx | 22 ++++++++++--------- .../src/components/auth/AuthCanvas.test.tsx | 7 +++++- frontend/src/components/auth/AuthCanvas.tsx | 7 ++++-- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/Setup.tsx b/frontend/src/components/Setup.tsx index 6d877ff2..5784f750 100644 --- a/frontend/src/components/Setup.tsx +++ b/frontend/src/components/Setup.tsx @@ -93,9 +93,18 @@ export function Setup({ onComplete, className, ...props }: SetupProps & React.Co
- Console · First boot - Account ready +
+ +
+ Console · First boot + Account ready +
} > @@ -106,13 +115,6 @@ export function Setup({ onComplete, className, ...props }: SetupProps & React.Co caption="A quick check that this host can run Docker deploys. Warnings won't stop you; each one carries a fix." /> -
diff --git a/frontend/src/components/auth/AuthCanvas.test.tsx b/frontend/src/components/auth/AuthCanvas.test.tsx index e02a7b9a..bf5ee476 100644 --- a/frontend/src/components/auth/AuthCanvas.test.tsx +++ b/frontend/src/components/auth/AuthCanvas.test.tsx @@ -11,9 +11,14 @@ describe('AuthCanvas', () => { ); const card = screen.getByRole('group'); - expect(card.className).toContain('max-h-[calc(100svh-5rem)]'); + expect(card.className).toContain('max-h-[calc(100dvh-5rem)]'); + expect(card.className).toContain('min-h-0'); + expect(card.className).toContain('my-auto'); expect(card.className).toContain('flex-col'); + const shell = card.parentElement; + expect(shell?.className).toContain('overflow-y-auto'); + const body = screen.getByText('Tall content').parentElement; expect(body?.className).toContain('overflow-y-auto'); expect(body?.className).toContain('min-h-0'); diff --git a/frontend/src/components/auth/AuthCanvas.tsx b/frontend/src/components/auth/AuthCanvas.tsx index f4a936ec..c92bf948 100644 --- a/frontend/src/components/auth/AuthCanvas.tsx +++ b/frontend/src/components/auth/AuthCanvas.tsx @@ -9,7 +9,10 @@ export function AuthCanvas({ children, className, footer, ...props }: AuthCanvas return (