Repository navigation
feat(roulette): play real bookmarks one page at a time, oldest-ward - #77
Merged
Merged
Conversation
Loading the roulette paginated the whole pile (up to 1000 bookmarks, 20 Public API requests) on every visit, and free daily.dev accounts get a small monthly API quota shared with every other tool they use. - GET /api/bookmarks now returns one page of 50 (one daily.dev request) - finishing a page rides on to the next, older one; past the last page it wraps around to the newest - the page's cursor is kept in localStorage so a later visit resumes there (only the opaque cursor, never bookmarks); a stale cursor falls back to the newest page Part of #74. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
This branch was successfully deployed
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
Part of #74. The daily.dev team pointed out that loading the roulette fetched up to 1000 bookmarks (20 Public API requests) per visit, while free accounts get about 200 requests a month, shared with every token, OAuth app and MCP call.
GET /api/bookmarksreturns a single page of 50 ({ items, cursor, hasNextPage }): one daily.dev request instead of up to 20.listAllBookmarksis gone.localStorage(ddr_cursor), so the forgotten bookmarks come up over time. Only the opaque cursor is stored, never bookmark data (the fix(roulette): never persist real-mode chamber to localStorage #39 rule still holds). A stale cursor falls back to the newest page.A signed-in visit to the roulette now costs 2 requests (profile + one page) instead of up to 21.
Test plan
"" → c2 → "", button label, stored cursor), and stale-cursor fallbackpnpm lint,pnpm format:check,pnpm build,pnpm test(30 passed)🤖 Generated with Claude Code