fix: auto-scroll gives up too early on large bookmark libraries#86
Open
JinZhongcun wants to merge 1 commit into
Open
fix: auto-scroll gives up too early on large bookmark libraries#86JinZhongcun wants to merge 1 commit into
JinZhongcun wants to merge 1 commit into
Conversation
Auto-scroll stops after ~9 seconds without new items (8 stagnant cycles + one 2s recheck). X's timeline regularly pauses loading for longer than that (rate limiting, slow fetches), so exports of large libraries stop far before the end: on an ~8,000-bookmark account the current logic captured only 1,961 items (~25%). Wait through stalls for up to ~45s, and every ~10 stagnant cycles nudge the timeline (scroll up, then back down) to retrigger loading. With this change the same account exported all ~7,800 bookmarks, with auto-scroll recovering from multiple multi-second stalls.
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.
Summary
Auto-scroll stops after ~9 seconds without new items (8 stagnant cycles + one 2s recheck). X's timeline regularly pauses loading for longer than that (rate limiting, slow fetches), so exports of large libraries stop far before the end. On an ~8,000-bookmark account, the current logic captured only 1,961 items (~25%) before declaring completion.
Changes
BOOKMARKLET_SCRIPTandCONSOLE_SCRIPTinapp/import/page.tsx)Related Issues
None
Checklist
npx tsc --noEmit— no new errors introduced (the 2 pre-existing errors inapp/api/import/x-oauth/fetch/route.tsare present onmainas well)