Skip to content

Extension: Twitter bookmark-folder import silently caps at the first page #1267

Description

@abhay-codes07

Environment: browser extension on current main (Twitter/X bookmarks import).

Importing a bookmark folder (collection) silently imports only the first API page and then reports the truncated count as a successful, complete import. Regular all-bookmarks import paginates fine.

Three things in the import path conspire (utils/twitter-import.ts, utils/twitter-utils.ts):

  1. The pagination recursion is explicitly gated off for folders:

    if (nextCursor && tweets.length > 0 && !this.config.isFolderImport) {

    so a folder import never follows the cursor at all.

  2. Even if it did, buildBookmarkCollectionVariables(bookmarkCollectionId) has no cursor parameter — every request would just re-fetch page 1. (buildRequestVariables for the regular flow does thread the cursor.)

  3. The URL construction for the folder-with-cursor case appends &variables=... twice (the inner ternary already includes it, then the outer template appends it again), which would produce a malformed request the moment the recursion was enabled.

Steps to reproduce: put 100+ tweets in a bookmark folder, run the folder import from the extension → onComplete reports roughly one page's worth (about the first batch), remainder never imported, no error surfaced.

All three are small, related fixes — PR incoming.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions