You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #381 (scrolling the timeline sometimes scrolls the user to the top) was root-caused to src/hooks/useTimelineScrollSync.ts's debounced navigate({ to: ".", search: (prev) => ({ ...prev, scrollTo: ... }), replace: true }) call: TanStack Router scrolls window to top by default on every navigation unless resetScroll: false is passed, and this call didn't pass it.
While fixing #381, a grep for the same pattern (navigate({ to: ".", search: (prev) => ({ ...prev, ... }) }) without resetScroll: false) turned up other call sites that share the same latent defect, even though none are currently confirmed to reproduce a user-visible bug:
src/hooks/useTimelineUrlState.ts:24-69 — timeline's day, time, stages, votes filter writes
src/pages/admin/ArtistsManagement/hooks/useAdminArtistsUrlState.ts:11-13 — admin artists filter/sort state
src/components/invite/useInviteFlow.ts:47-49 — clearing the invite search param after use
These weren't fixed alongside #381 because they're triggered by direct user actions (clicking a filter, submitting an invite) rather than a debounced background effect firing mid-scroll, so a scroll-to-top side effect there is far less likely to be noticed — but the underlying defect (missing resetScroll: false on a search-param-only replace navigation) is the same.
Task
For each call site above:
Check whether it can plausibly cause an unwanted scroll jump for users (e.g. does it fire while the user might already be scrolled down the page?).
Context
Issue #381 (scrolling the timeline sometimes scrolls the user to the top) was root-caused to
src/hooks/useTimelineScrollSync.ts's debouncednavigate({ to: ".", search: (prev) => ({ ...prev, scrollTo: ... }), replace: true })call: TanStack Router scrollswindowto top by default on every navigation unlessresetScroll: falseis passed, and this call didn't pass it.While fixing #381, a grep for the same pattern (
navigate({ to: ".", search: (prev) => ({ ...prev, ... }) })withoutresetScroll: false) turned up other call sites that share the same latent defect, even though none are currently confirmed to reproduce a user-visible bug:src/hooks/useUrlState.ts:19-33— generic URL-state sync hook (used broadly)src/hooks/useTimelineUrlState.ts:24-69— timeline'sday,time,stages,votesfilter writessrc/pages/admin/ArtistsManagement/hooks/useAdminArtistsUrlState.ts:11-13— admin artists filter/sort statesrc/components/invite/useInviteFlow.ts:47-49— clearing theinvitesearch param after useThese weren't fixed alongside #381 because they're triggered by direct user actions (clicking a filter, submitting an invite) rather than a debounced background effect firing mid-scroll, so a scroll-to-top side effect there is far less likely to be noticed — but the underlying defect (missing
resetScroll: falseon a search-param-only replace navigation) is the same.Task
For each call site above:
resetScroll: false, matching the fix applied in scrollling the timeline will sometimes scroll the user to the top #381.Out of scope
Changing route-level scroll restoration config broadly, or any behavior not related to this specific
resetScrolldefect.