Skip to content

Fix gallery infinite scroll: eliminate cascading fetches and scroll resets#18

Merged
pedrokarim merged 1 commit intomainfrom
dev
Feb 27, 2026
Merged

Fix gallery infinite scroll: eliminate cascading fetches and scroll resets#18
pedrokarim merged 1 commit intomainfrom
dev

Conversation

@pedrokarim
Copy link
Owner

Rewrote useInfiniteScroll hook to use refs instead of state for page tracking, preventing the useEffect cascade that caused repeated fetches and scroll jumps. SSE handler now prepends new files instead of doing a full reset, and mutations (star/security/delete) use updateData() to modify data in-place without resetting the page counter.

…esets

Rewrote useInfiniteScroll hook to use refs instead of state for page tracking,
preventing the useEffect cascade that caused repeated fetches and scroll jumps.
SSE handler now prepends new files instead of doing a full reset, and mutations
(star/security/delete) use updateData() to modify data in-place without
resetting the page counter.
@pedrokarim pedrokarim merged commit 3b83762 into main Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant