Part of #1946 — Redux → React Query migration (Stage 1). Part of the #1976 courseware decomposition (plan) — Target 1 (courseware player). Stacked on the de-class and bridge-extension peels.
Goal: convert the courseware metadata fetch to React Query.
Tasks
- Convert
getCourseMetadata + getLearningSequencesOutline → query hooks feeding coursewareMeta / sections / sequences via the extended bridge.
- Reuse the existing
useCourseHomeMeta for the courseHomeMeta model that fetchCourse currently double-produces — don't re-fetch it.
- Peel
getCoursewareOutlineSidebarToggles aside — it feeds only the outline sidebar; convert it there (the sidebar layer), not here.
- Move the access-gating decision (
courseAccess.hasAccess + outline result → success / denied / failure) into the functional container.
- Keep the
courseware slice status (courseId/courseStatus) written transitionally.
Verify: player renders from the query; useModel readers still served via the bridge; access-denied/redirect behavior unchanged.
Scoped-but-light; a full plan gets added when this is picked up.
Part of #1946 — Redux → React Query migration (Stage 1). Part of the #1976 courseware decomposition (plan) — Target 1 (courseware player). Stacked on the de-class and bridge-extension peels.
Goal: convert the courseware metadata fetch to React Query.
Tasks
getCourseMetadata+getLearningSequencesOutline→ query hooks feedingcoursewareMeta/sections/sequencesvia the extended bridge.useCourseHomeMetafor thecourseHomeMetamodel thatfetchCoursecurrently double-produces — don't re-fetch it.getCoursewareOutlineSidebarTogglesaside — it feeds only the outline sidebar; convert it there (the sidebar layer), not here.courseAccess.hasAccess+ outline result → success / denied / failure) into the functional container.coursewareslice status (courseId/courseStatus) written transitionally.Verify: player renders from the query;
useModelreaders still served via the bridge; access-denied/redirect behavior unchanged.Scoped-but-light; a full plan gets added when this is picked up.