[PB-6592] bugfix/Fix Photos timeline scroll position when open Photos#523
Open
CandelR wants to merge 1 commit into
Open
[PB-6592] bugfix/Fix Photos timeline scroll position when open Photos#523CandelR wants to merge 1 commit into
CandelR wants to merge 1 commit into
Conversation
|
larryrider
approved these changes
Jul 9, 2026
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.



Whenn opening Photos (cold start, or after switching the device filter) landed the timeline mid-way on an old date instead of showing the most recent photos at the top.
Root cause:
@shopify/flash-listv2 shipsmaintainVisibleContentPositionenabled by default, which anchors scroll to whatever is already on screen. Since our timeline is always sorted newest-first, whenever local/cloud data resolved asynchronously and reordered the top of the list, that anchoring kept the user pinned to old content instead of showing the new top.Main fixes:
PhotosTimeline.tsx: disablemaintainVisibleContentPositionon theFlashList, and addscrollToTopto the imperative handle.index.tsx: forcescrollToTop()whenever the device filter changes.useCloudAssets.ts: clear the previous filter'scloudItemsbefore firing the new query, so switching devices doesn't briefly show the old device's photos.useLocalAssets.ts/usePhotosTimeline.ts: newhasLoadedLocalAssetsOnceflag that withholds cloud items until local assets have loaded once, avoiding a flash of stale cloud-only content on the first cold-start render.