fix(layout): single scroll owner, stable sidebar, working scroll restoration - #375
Open
ayebrian wants to merge 5 commits into
Open
fix(layout): single scroll owner, stable sidebar, working scroll restoration#375ayebrian wants to merge 5 commits into
ayebrian wants to merge 5 commits into
Conversation
ayebrian
force-pushed
the
fix/layout-scroll-sidebar
branch
from
September 7, 2026 13:52
2d70bd1 to
86aa3af
Compare
…oration - scaffold: drop dead h-full from the middle row (flex-1 already fills the remainder of the h-dvh column); add min-h-0 to the scroll container so it can actually shrink and own the scroll; shrink-0 on the sidebar wrapper so the rail cannot be squeezed below its width. - profile: min-h-[calc(100vh-64px)] -> min-h-full. The hardcoded 64px TopBar + vh (not dvh) + the unaccounted bottom MenuBar made the content always taller than the container on mobile. - community: the virtualizer scroll state was stored under the 'activity.scroll' key (copy-paste), overwriting activity/page.tsx and vice versa. Now 'community.scroll'. - menu: stable rail width w-16 lg:w-55 + shrink-0 instead of a content-sized rail with lg:min-w-55 (circular sizing, ~160px jump at the lg breakpoint); MobileBar now has labels, aria-label/aria-current, the Q4 badge, ~44px touch targets and safe-area padding for notched phones; removed the duplicate MENUBAR_ITEMS array and the dead size-icon class.
Dev-only (import.meta.env.DEV): shows the session as authed and skips the blocking QR screen, so layout work can be done without a backend token. Marked TODO(demo) in both spots.
At the md breakpoint the rail is icons-only (labels hidden <lg) and now has a fixed w-16 (64px) width; the inline Q4 badge after the Chat icon overflowed the rail edge by ~11px. Hide it below lg like the labels — it stays visible on the lg+ rail and in the mobile MenuBar.
Rendered via pnpm dev with ?demo=1 (no backend): community page at 1440x900, 900x800 and 390x844 to show the stable rail, the icon-only rail and the labelled bottom MenuBar with safe-area padding.
Below lg the rail is icons-only; with justify-start the icon sat left-of-center (crooked). max-lg:justify-center fixes it. Also drop the whitespace text nodes around the hidden label/badge — the base Button already has gap-2, so the anonymous flex items only shifted the icon. Screenshots refreshed to match.
ayebrian
force-pushed
the
fix/layout-scroll-sidebar
branch
from
September 7, 2026 13:58
86aa3af to
22f7eda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Fixes the layout/scroll bugs:
Scaffoldhad a deadh-fullon the middle row (flex-1 already fills the remainder of the h-dvh column) and the scroll container was missingmin-h-0, so content could overflow and the page itself started scrolling (double scroll, sidebar jitter).ScrollRestorationnow operates on the actual scroll container (the previously referenced element wasn't the one that scrolls).activity.scrollkey (copy-paste bug), so the two pages overwrote each other's scroll positions.Also:
min-h-[calc(100vh-64px)]→min-h-full. The hardcoded 64px TopBar +vh(notdvh) + the unaccounted bottom MenuBar made the content always taller than the container on mobile.aria-label/aria-currenton the active tab, the Q4 release badge, ~44px touch targets, and safe-area padding for notched phones.w-16 lg:w-55+shrink-0instead of a content-sized rail withlg:min-w-55(circular sizing, ~160px jump at the lg breakpoint).max-lg:justify-center), Q4 badge hidden below lg (it overflowed the 64px rail by ~11px), stray whitespace text nodes dropped (base Button already hasgap-2).Files changed
src/app/scaffold.tsx— scroll owner + restorationsrc/app/profile/page.tsx— full-bleed card, correct min-heightsrc/app/community/page.tsx— dedicated virtualizer scroll keysrc/app/menu.tsx— stable rail, real bottom bar, centered iconssrc/app/blocking-qr/page.tsx+src/components/session-provider.tsx—?demodev flag to render the app without backend authdocs/screenshots/— screenshots belowScreenshots
Desktop (1440×900) — labelled rail, stable 220px width:
Mid (900×800) — icons-only rail, icons centered:
Mobile (390×844) — labelled 5-tab bar with Q4 badge + safe-area padding:
Verification
pnpm lint— clean (tsc + eslint + prettier).Follow-ups (not required for this fix)
useListVirtualizerwith a storage key — the activity/community copies are what produced the shared-key bug.?demoflag: docs/commit say?demo=1, code checkshas('demo')— align the check or the docs.