fix: --all flag now bypasses default count of 20#33
Open
theirongolddev wants to merge 2 commits intoalexknowshtml:mainfrom
Open
fix: --all flag now bypasses default count of 20#33theirongolddev wants to merge 2 commits intoalexknowshtml:mainfrom
theirongolddev wants to merge 2 commits intoalexknowshtml:mainfrom
Conversation
fetchBookmarks() truncates results to `count` (default 20) even when `--all` is explicitly requested. This means `smaug fetch --all` silently discards everything past the first 20 bookmarks, defeating the purpose of the flag. Skip the truncation when `useAll` is true so paginated fetches return the full result set. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When `smaug fetch --all` is used, `fetchAndPrepareBookmarks` defaulted count to 20, causing `fetchBookmarks` to correctly truncate the paginated results to 20. The --all flag fetched everything but the caller threw away all but 20. Set count to Infinity when --all is requested so the existing truncation logic in fetchBookmarks passes through the full result set. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
smaug fetch --allpassesall: truetofetchAndPrepareBookmarks, butcountstill defaults to 20fetchBookmarksthen correctly truncates the paginated results to the requested count — silently discarding everything past 20--allis set,fetchAndPrepareBookmarksnow setscounttoInfinityso the existing truncation logic infetchBookmarkspasses through the full result setTest plan
npx smaug fetch --allwith an account that has >20 bookmarks — verify all appear in.state/pending-bookmarks.jsonnpx smaug fetch 10(without--all) — confirm truncation still caps at 10npx smaug fetch --all --max-pages 2— verify page limit is respected🤖 Generated with Claude Code