fix: prod scroll resize, timer viewport reinit#30
Merged
Conversation
This reverts commit 6e31c58.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BODMAT
added a commit
that referenced
this pull request
Jun 3, 2026
fix: prod scroll + timer viewport reinit (#30)
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
Two production bugs fixed: Lenis scroll height was not recalculated after lazy-loaded charts rendered on
/dashboard/music(visible only with real DB latency), and background timer field positions were not redistributed after viewport resize (mobile ↔ desktop), causing all timers to cluster on one side.Changes
Code
dashboard/components/smooth-scroll.tsx—ResizeObserverondocument.body(notdocumentElement, which is fixed at viewport height viah-full) to calllenis.resize()automatically when page content growsdashboard/app/dashboard/music/music-client.tsx— directlenis.resize()viauseLenis()when query data arrives, as a second layer for the music page specificallydashboard/components/timer-field.tsx— on viewport resize, reinitialize timerx/ypositions randomly across new dimensions (drift speed ~3px/s is too slow to redistribute naturally)Tooling / config
Docs / plan
Design decisions
document.bodyinstead ofdocument.documentElement—html { height: 100% }(Tailwindh-fullin layout) locksoffsetHeightto viewport;ResizeObservernever fires on itMusicClient) — ResizeObserver is generic but async; direct call ondatachange guarantees correct timing for the music page after Neon latencyVerification
npx tsc --noEmit(dashboard) — cleannpm run lint(dashboard) — cleannpm run build && npm start+ 3G throttle + CPU 4× + Disable cache →/dashboard/musicdirect URL — scroll reaches bottom after charts loadOut of scope (future PRs)
Closes