fix(web): restore scroll position when navigating back #63

Merged
joshuafhiggins merged 1 commits from t3/preserve-scroll-back-navigation into main 2026-11-03 15:00:59 -05:00
Owner

Going back in the web app reset the scroll position instead of returning to where you left off.

Save page-container offsets per browser history entry and restore them on return. This covers regular page scrolling and Radix scroll areas, including split artist views. Restoration waits for content to load and stops if the user starts scrolling.

Verified with headless Chrome against a separate local web server using the test account:

  • Album list restores exactly 1,400px on desktop and 2,100px at mobile width.
  • Back, Forward, and repeated Back navigation work.
  • Playlist scroll restores to 1,800px; artist list restores to 700px.
  • Web TypeScript and targeted ESLint checks pass.

Desktop before opening an album:
Albums before navigation

Desktop after going back:
Albums after Back

Mobile after going back:
Mobile albums after Back

Playlist screenshot · Split artist view screenshot

Made with gpt-6.1-sol through the Codex harness in T3 Code.

Going back in the web app reset the scroll position instead of returning to where you left off. Save page-container offsets per browser history entry and restore them on return. This covers regular page scrolling and Radix scroll areas, including split artist views. Restoration waits for content to load and stops if the user starts scrolling. Verified with headless Chrome against a separate local web server using the test account: - Album list restores exactly 1,400px on desktop and 2,100px at mobile width. - Back, Forward, and repeated Back navigation work. - Playlist scroll restores to 1,800px; artist list restores to 700px. - Web TypeScript and targeted ESLint checks pass. Desktop before opening an album: ![Albums before navigation](https://files.gitcoffee.dev/files/albums-before-mikjjpngfklgceuu.png) Desktop after going back: ![Albums after Back](https://files.gitcoffee.dev/files/albums-after-back-fpp6qg8thzgtl3gx.png) Mobile after going back: ![Mobile albums after Back](https://files.gitcoffee.dev/files/mobile-after-back-ni8zxfmednfoc4jb.png) [Playlist screenshot](https://files.gitcoffee.dev/files/playlist-after-back-ulexx7r3vvzrzm4w.png) · [Split artist view screenshot](https://files.gitcoffee.dev/files/artists-after-back-39rtffeqikqapwfh.png) Made with gpt-6.1-sol through the Codex harness in T3 Code.
joshuafhiggins added 1 commit 2026-11-03 14:57:15 -05:00
joshuafhiggins merged commit b7403356d6 into main 2026-11-03 15:00:59 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joshuafhiggins/otunes#63