Skip to content

feat(snapshots): Fix sidebar rendering for uploads with lots of images#110156

Merged
NicoHinderling merged 1 commit intomasterfrom
03-06-feat_snapshots_fix_sidebar_rendering_for_uploads_with_lots_of_images
Mar 6, 2026
Merged

feat(snapshots): Fix sidebar rendering for uploads with lots of images#110156
NicoHinderling merged 1 commit intomasterfrom
03-06-feat_snapshots_fix_sidebar_rendering_for_uploads_with_lots_of_images

Conversation

@NicoHinderling
Copy link
Contributor

@NicoHinderling NicoHinderling commented Mar 6, 2026

Remove pagination from the snapshot details API endpoint and simplify the frontend to load all images in a single request.

The snapshot sidebar previously used useInfiniteApiQuery with an IntersectionObserver-based infinite scroll to paginate through images 20 at a time. This caused layout instability — the sidebar's scrollbar would jump as new pages loaded, making it difficult to browse uploads with many images. Since snapshot metadata (image keys, display names, dimensions) is lightweight and the endpoint already loads the full manifest from object storage in one call, paginating the response added complexity without meaningful performance benefit.

Changes:

  • Backend: Replace self.paginate() with a direct Response(), removing the OffsetPaginator dependency. Increase maxProperties from 1,000 to 50,000 to support larger uploads.
  • Frontend: Switch from useInfiniteApiQuery to useApiQuery, remove the IntersectionObserver sentinel and loading spinner, and pass the total image count to the search placeholder ("Search 537 images...").
  • Tests: Update pagination tests to verify all images are returned in a single response, remove invalid-pagination and limit-too-large test cases that no longer apply.

Copy link
Contributor Author

NicoHinderling commented Mar 6, 2026

@github-actions github-actions bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@NicoHinderling NicoHinderling marked this pull request as ready for review March 6, 2026 21:19
@NicoHinderling NicoHinderling requested a review from a team as a code owner March 6, 2026 21:19
Base automatically changed from 03-04-feat_snapshots_add_d3-zoom_interactivity to master March 6, 2026 21:19
@NicoHinderling NicoHinderling requested a review from a team as a code owner March 6, 2026 21:19
@NicoHinderling NicoHinderling force-pushed the 03-06-feat_snapshots_fix_sidebar_rendering_for_uploads_with_lots_of_images branch from 70b3fed to 0161fd7 Compare March 6, 2026 21:21
@NicoHinderling NicoHinderling force-pushed the 03-06-feat_snapshots_fix_sidebar_rendering_for_uploads_with_lots_of_images branch from 0161fd7 to 15b9517 Compare March 6, 2026 21:29
@NicoHinderling NicoHinderling merged commit a105f62 into master Mar 6, 2026
59 checks passed
@NicoHinderling NicoHinderling deleted the 03-06-feat_snapshots_fix_sidebar_rendering_for_uploads_with_lots_of_images branch March 6, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants