Skip to content

Resolve enrollment release modules on dashboard so Continue skips completed chapters - #332

Merged
AQIB-NAWAB merged 1 commit into
mainfrom
fix/dashboard-continue-release-modules
Nov 28, 2026
Merged

AQIB-NAWAB merged 1 commit into
mainfrom
fix/dashboard-continue-release-modules

Conversation

@AQIB-NAWAB

Copy link
Copy Markdown
Collaborator

Summary

Fixes the dashboard's Continue card sending learners back to Chapter 1 (with 0 of N checkpoints complete and an inflated total chapter count) even after completing chapters in a course with releases.

Root cause

  1. loadMenteeDashboard queried raw course.modules instead of resolving each enrollment's selected release (releaseForEnrollment + releaseModulesWithBlocks), unlike the reader, course overview, /continue, and progress pages. On courses with releases/republishes, raw course.modules included older chapter rows whose IDs didn't match the learner's completed release ChapterProgress rows.
  2. pickContinueTarget compared c.slug === lastChapterSlug without normalizing --<releaseId> suffixes via cleanChapterSlug.

Changes

  • server/src/services/learner/load-mentee-dashboard.ts: Resolve each enrollment's modules via releaseForEnrollment and releaseModulesWithBlocks.
  • server/src/services/progress/enrollment-syllabus.ts: Normalize release-suffixed slugs with cleanChapterSlug in pickContinueTarget.
  • Added unit tests in load-mentee-dashboard.test.ts and enrollment-syllabus.test.ts.

Verification

  • tsc --noEmit in server/: passed.
  • Vitest (enrollment-syllabus.test.ts, load-mentee-dashboard.test.ts, dashboard-model.test.ts, streak-popup.test.ts): 43/43 passed.

@AQIB-NAWAB
AQIB-NAWAB merged commit 3b4f9f9 into main Nov 28, 2026
3 checks passed
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