fix(ui): make Drafts 'Load more' page instead of resetting the list#359
fix(ui): make Drafts 'Load more' page instead of resetting the list#359cavidelizade wants to merge 1 commit into
Conversation
loadDrafts depended on the offset state, so each "Load more" gave it a new identity, which re-fired the auto-load effect (it lists loadDrafts in its deps) and reset the list back to the first page. Move the paging cursor into a ref so loadDrafts keeps a stable identity; the auto-load effect now only runs on workspace change, and "Load more" appends as intended. Closes Devlaner#336 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
"Load more" on the Drafts page reset the list back to the first page, so pagination didn't work.
Linked issues
Closes #336
Type of change
fix:)Surface
apps/web/)What changed
loadDraftsdepended on theoffsetstate, so advancing the page gave it a new identity, which re-fired the auto-load effect (that effect listsloadDraftsin its deps) and reset the list. Moved the paging cursor into a ref, soloadDraftskeeps a stable identity. The auto-load effect now only runs on workspace change and "Load more" appends.offsetwasn't read anywhere in render, so the ref is a clean swap.Test plan
npm run typecheck+npm run lintpassAI assistance
Claude Code (Opus 4.8), commits carry aCo-Authored-By:trailer