Link loading overlay escapes the glass card (portal to body)

The full-screen loading screen shown the instant a Link starts navigating
was rendered inside the Smart Review card. That card has backdrop-filter,
which makes it a containing block for position: fixed — so the overlay was
confined to a 44px strip of the card and the loading block spilled below the
fold instead of covering the viewport. It is now portalled to <body> with a
soft page scrim behind it; the review suite measures that it covers the
viewport (390x844).

SW -> freezmo-v48.
This commit is contained in:
Martin Dvořák 2026-10-12 19:04:38 +00:00
commit 9b9e978ef2
4 changed files with 28 additions and 6 deletions

View file

@ -54,6 +54,19 @@ async function makeReviewPage(locale = "en") {
check("loading screen appears immediately on tap", loadingAt !== null && loadingAt - tClick < 1000, `${loadingAt ? loadingAt - tClick : "never"} ms`);
check("still on the library while stalled", page.url().replace(BASE, "") === "/", page.url());
check("spinner is visible", (await page.getByRole("status").count()) >= 1);
/* The overlay is portalled to <body>: rendered inside the glass card it was
confined to a 44px strip of that card (backdrop-filter is a containing
block for fixed descendants). */
const overlay = await page.evaluate(() => {
const status = document.querySelector('[role="status"][aria-busy="true"]');
const rect = status?.parentElement?.getBoundingClientRect();
return rect ? { w: Math.round(rect.width), h: Math.round(rect.height) } : null;
});
check(
"loading overlay covers the viewport",
overlay !== null && overlay.w >= 380 && overlay.h >= 800,
JSON.stringify(overlay),
);
release();
let sessionAt = null;