refactor: convert the dates tab to React Query (#1987)
Convert the dates tab off Redux thunks to React Query. The tab becomes
self-wrapping: it renders TabPage itself and owns its data loading via query
hooks.
- DatesTab renders TabWithTimer and owns its data via useCourseHomeMeta +
useDatesTabData; courseId comes from useParams.
- TabPage: courseStatus becomes a union (StatusValue | { metadataQuery,
tabDataQuery }); a converted tab passes its queries and TabPage derives the
view (loading/error/denied/loaded), reading access from the metadata query,
and gating on isPending (not isLoading, which is false for a disabled/paused
query and would misread "not loaded yet" as denied).
Builds on the TabPage TypeScript conversion in the layer below (#1986).
- TabWithTimer wraps TabPage with OuterExamTimer, keeping
@edx/frontend-lib-special-exams out of the shared TabPage; TabContainer uses
it, CoursewareContainer keeps rendering plain TabPage.
- ShiftDatesAlert invalidates the dates query on reset; its fetch prop is now
optional (the still-Redux outline tab's transitional refresh). The dates
subtree reads courseId from useParams.
- The app QueryCache is built in a new src/queryClient.ts: onError reports query
failures via logError, and onSuccess runs the transitional model-store bridge
(bridgeToModelStore in data/modelStoreBridge) that mirrors results into
existing useModel readers until the store is removed. index.jsx and
createTestQueryClient use it.
- Drop the now-unused fetchDatesTab thunk and its re-export.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> B
Brian Smith committed
d6d9a6192672cd72feb10326feddfbc73bce60c7
Parent: 1724600
Committed by GitHub <noreply@github.com>
on 8/21/2026, 6:34:38 PM