Skip to content

perf(render): migrate StudentLearningPathPage to the selector store - #436

Open
NesiciCoding wants to merge 1 commit into
perf/selector-store-speakingsessionfrom
perf/selector-store-studentlearningpath
Open

perf(render): migrate StudentLearningPathPage to the selector store#436
NesiciCoding wants to merge 1 commit into
perf/selector-store-speakingsessionfrom
perf/selector-store-studentlearningpath

Conversation

@NesiciCoding

Copy link
Copy Markdown
Owner

What

Migrates StudentLearningPathPage from seven whole-domain hooks to one useStoreSelector reading its ten data slices (students, classes, studentRubrics, rubrics, selfAssessments, analysisResults, tests, studentTests, flashcardDecks, settings).

Why

The page only renders derived learning-path data; whole-domain subscriptions re-rendered it on unrelated updates.

Notes

  • Domain-hook subscriptions drop from 7 → 0.
  • pages.student.a11y.test.tsx had the same error-boundary-swallowed render false pass as the admin suite; its base mock moved to module scope and selectors/actions now route through it, so the a11y suite genuinely renders the page again.

Stacked on #435 (part of the roadmap "Up Next" selector-store series).

The page read ten data slices across seven whole-domain hooks; all reads
now come from a single useStoreSelector. The student a11y suite also had
the same error-boundary-swallowed render as the admin suite, so its base
mock moved to module scope and selectors now route through it.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@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: 1aa6e206-4ed6-4457-9a43-97815de79e23

📥 Commits

Reviewing files that changed from the base of the PR and between 54599fc and ae981f8.

📒 Files selected for processing (3)
  • src/pages/StudentLearningPathPage.tsx
  • src/pages/__tests__/StudentLearningPathPage.test.tsx
  • src/pages/__tests__/pages.student.a11y.test.tsx

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


📝 Walkthrough

Walkthrough

The student learning path page now retrieves its required state through one store selector. Related tests use shared mock state and expose compatible selector and action mocks.

Changes

Student learning path store migration

Layer / File(s) Summary
Consolidate page state selection
src/pages/StudentLearningPathPage.tsx
The page replaces separate AppContext hooks with one useStoreSelector call for students, classes, rubrics, assessments, tests, flashcard decks, and settings.
Align test state and action mocks
src/pages/__tests__/pages.student.a11y.test.tsx, src/pages/__tests__/StudentLearningPathPage.test.tsx
The tests use a shared base context object. Store selector and action mocks consume this shared state.
Estimated code review effort: 3 (Moderate) ~20 minutes

Merge Risk: ⚪ Minimal · up to ae981

This localized performance refactor changes how the page subscribes to store data without supplied evidence of a correctness or production-impact issue. It is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the migration of StudentLearningPathPage to the selector store.
Description check ✅ Passed The description accurately explains the selector-store migration, performance goal, test updates, and stacked PR context.
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.

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.

@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