fix(odin): measured --app-height for standalone-PWA viewports
Installed PWAs (MIUI especially) compute svh/dvh against a viewport that includes system UI the layout viewport doesn't have, so the immersive page still scrolled in standalone mode. AppShell now measures window.innerHeight into --app-height (refreshed on resize/visualViewport, covering the minimize-restore stale-viewport Chrome bug and the keyboard), and the immersive shell + chat size from var(--app-height, 100svh). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -437,8 +437,13 @@ export default function OdinChat() {
|
||||
// page never scrolls and the chat's message list scrolls internally.
|
||||
// Desktop: svh === vh.
|
||||
// Mobile is immersive (AppShell hides its header and main padding on
|
||||
// /odin): the chat owns the whole viewport, full-bleed.
|
||||
height: { xs: "100svh", md: "calc(100svh - 100px)" },
|
||||
// /odin): the chat owns the whole viewport, full-bleed. --app-height
|
||||
// is AppShell's live window.innerHeight measurement — standalone-PWA
|
||||
// viewports misreport svh/dvh (MIUI), only the measured value fits.
|
||||
height: {
|
||||
xs: "var(--app-height, 100svh)",
|
||||
md: "calc(100svh - 100px)",
|
||||
},
|
||||
display: "flex",
|
||||
// Longhand on purpose: a responsive `border` shorthand lands in a
|
||||
// media query AFTER borderColor and resets the color to black.
|
||||
|
||||
Reference in New Issue
Block a user