perf(render): migrate ActivityDashboardPage to the selector store - #427
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesActivity dashboard store migration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized performance-oriented state-selection change has no actionable merge-blocking risk remaining and is merge-ready after normal checks and review. Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
The page subscribed to six whole-domain hooks to read eight data slices and trigger seven actions. Data now comes from one useStoreSelector and actions from the stable useStoreActions context, so the page re-renders only when its actual slices change. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
…yDashboardPage The roster domain hooks filtered soft-deleted rows; the selector-store migration read raw slices. Restore the active-student / active-rubric filtering so archived students and deleted student rubrics don't surface in dashboard aggregates and pending-task counts. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
b754142 to
905ab4e
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
|
@CodeRabbit review |
|
What
Migrates
ActivityDashboardPagefrom six whole-domain hooks to oneuseStoreSelectorfor its eight data slices (students,classes,studentRubrics,rubrics,tests,studentTests,gradingTasks,essayAssignments) plus the stableuseStoreActionscontext forupdateClass,updateRubric,updateTest,addGradingTasks,deleteGradingTask,addEssayAssignments,updateEssayGroup.Why
Subscribing to whole domains re-renders the page on every unrelated collection update. Selecting only the slices it renders (and taking actions from the stable context) isolates it to the data it actually uses.
Notes
pages-phase4.a11y.test.tsxroute selectors/actions through their mocked app values.Stacked on #426 (part of the roadmap "Up Next" selector-store series).
Summary by CodeRabbit
Refactor
Tests