Skip to content

perf: migrate StudentsPage to selector store - #439

Open
NesiciCoding wants to merge 1 commit into
perf/selector-store-studentportalfrom
perf/selector-store-studentspage
Open

perf: migrate StudentsPage to selector store#439
NesiciCoding wants to merge 1 commit into
perf/selector-store-studentportalfrom
perf/selector-store-studentspage

Conversation

@NesiciCoding

Copy link
Copy Markdown
Owner

Part of the selector-store migration roadmap. Replaces the six domain-hook subscriptions with useStoreSelector/useStoreActions.

Replace the six domain-hook subscriptions with useStoreSelector/useStoreActions so the component reads a single store slice.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 68ee7f0e-4a52-45b3-a648-d561476d0c28

📥 Commits

Reviewing files that changed from the base of the PR and between 93c46eb and 0edc9cd.

📒 Files selected for processing (2)
  • src/pages/StudentsPage.tsx
  • src/pages/__tests__/StudentsPage.test.tsx

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

StudentsPage now uses shared store selector and action hooks instead of separate AppContext hooks. Its test mock now supplies those hooks from the existing mock application state.

Changes

StudentsPage store integration

Layer / File(s) Summary
Migrate StudentsPage to shared store hooks
src/pages/StudentsPage.tsx
The page reads student, class, grading, assessment, test, and settings state through useStoreSelector. It obtains student, class, and settings mutations through useStoreActions.
Update StudentsPage test store mock
src/pages/__tests__/StudentsPage.test.tsx
The test mock provides selector and action hooks backed by mockAppValue.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 0edc9

StudentsPage now uses selector-store access instead of the prescribed domain hooks, so the approved exception should be documented or the guideline updated. No concrete user-facing or production impact requiring a merge block is identified.

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the performance-related migration of StudentsPage to the selector store.
Description check ✅ Passed The description accurately explains the migration from domain-hook subscriptions to useStoreSelector and useStoreActions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 80.4% (🎯 65%) 11047 / 13739
🟢 Statements 78.39% (🎯 65%) 12660 / 16150
🟢 Functions 71.1% (🎯 60%) 3976 / 5592
🟢 Branches 69.46% (🎯 58%) 9370 / 13489
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/Layout/Sidebar.tsx 96.55% 57.5% 100% 96.15% 86
src/components/Search/GlobalSearch.tsx 100% 72.72% 100% 100%
src/pages/ActivityDashboardPage.tsx 81.81% 73.43% 84.84% 84.34% 77, 86, 137, 146, 170, 178-183, 196, 212-213, 461-465, 611-613, 667, 674, 702
src/pages/ExportPage.tsx 63.83% 62.9% 64.92% 67.7% 80, 120, 121, 124, 126, 150, 160, 169-172, 180, 209-213, 219, 227, 233-265, 276, 291-292, 305, 310, 337, 344, 354, 361, 365-366, 373, 380, 384, 395-403, 429, 431, 457-477, 495, 510-514, 516, 517, 522, 544, 570-582, 587, 597, 610-626, 671-673, 722-831, 966, 1025-1060, 1082, 1182-1199, 1311-1362, 1444-1460, 1470-1473, 1482-1485, 1507, 1601-1622
src/pages/MarketplacePage.tsx 50% 46.87% 50% 54% 28-30, 103, 124-173, 230-245, 258, 270-287, 311-321, 335, 405-412
src/pages/ModerationQueuePage.tsx 89.47% 51.28% 89.28% 97.77% 41, 45, 49, 61-62, 76, 87
src/pages/NewsFlashesPage.tsx 94.82% 82.35% 94.28% 96% 100, 304, 429
src/pages/RubricBuilder.tsx 66.78% 60.98% 60.07% 68.28% 176-183, 240-248, 287-306, 330, 400, 438-443, 456, 469, 476, 481-482, 540-547, 556-562, 576-589, 604, 610-624, 638-642, 695-712, 757, 838-839, 873-910, 974, 1079-1081, 1147-1150, 1203-1244, 1326, 1348, 1393, 1414-1475, 1490, 1542-1581, 1618-1633, 1656-1709, 1723, 1739-1766, 1786-1797, 1805, 1888, 1914, 1921, 1931-1936, 2050-2056, 2079-2093, 2166, 2169, 2206-2208, 2238, 2246-2251, 2269, 2279, 2293, 2386-2393, 2514-2574, 2638, 2664-2674, 2751-2815, 2842
src/pages/SettingsPage.tsx 71.78% 71.34% 61.53% 74.6% 181, 199, 257-258, 268, 300, 311-312, 324, 327, 331, 338, 344, 350, 363, 378, 467-468, 538, 573-631, 699-748, 826-995, 1128, 1208-1259, 1344-1550, 1746, 1875-1890, 2015-2118, 2141, 2166-2168
src/pages/SpeakingSession.tsx 87.32% 83.2% 83.63% 88.42% 72, 99-101, 121-126, 148, 188, 206, 223, 237-257, 399
src/pages/StudentCefrOverviewPage.tsx 56.75% 64.7% 31.57% 53.12% 94-107, 120-129, 145-447
src/pages/StudentLearningPathPage.tsx 48.1% 41.66% 40.54% 50% 85, 111, 124-132, 141, 163-441
src/pages/StudentPortalPage.tsx 73.14% 66.84% 69.93% 75.43% 36, 83, 92, 194-196, 213, 216, 243-245, 262, 309, 313, 395, 453-480, 508-510, 525-526, 532, 559, 561, 562, 569, 572, 577-587, 599, 615-617, 705-953, 1063, 1116, 1153-1213, 1354-1377, 1478, 1485-1488, 1497, 1541-1636, 1680-1685, 1688-1692, 1752, 1796-1800, 1802-1806, 1809-1814, 1817-1822
src/pages/StudentsPage.tsx 58.55% 48.82% 47.25% 60.53% 100, 112, 119-120, 128-129, 145, 159, 214, 215, 216, 218, 225, 249-252, 330, 335-337, 344, 355-367, 391-401, 421-422, 441, 443, 470, 497-499, 503-505, 509-511, 514, 595-602, 604, 606, 612, 614-633, 655-658, 668-675, 705-722, 755, 831, 937-942, 971-987, 1021-1023, 1102-1112, 1237-1274, 1312-1335, 1368-1369, 1388-1389, 1414-1426, 1439-1789, 1795, 1827, 1846-1850, 1857-1903, 1907
Generated in workflow #1232 for commit 0edc9cd by the Vitest Coverage Report Action

@NesiciCoding
NesiciCoding changed the base branch from main to perf/selector-store-studentportal August 13, 2026 14:52
@NesiciCoding

Copy link
Copy Markdown
Owner Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant