Skip to content

feat(learning): roadmap completion screen with share post and next-roadmap flow - #92

Open
OthmaneZ05 wants to merge 9 commits into
mainfrom
feat/completion-share
Open

feat(learning): roadmap completion screen with share post and next-roadmap flow#92
OthmaneZ05 wants to merge 9 commits into
mainfrom
feat/completion-share

Conversation

@OthmaneZ05

Copy link
Copy Markdown
Collaborator

Summary of Changes

Finishing a roadmap now opens a completion screen over the canvas instead of a plain toast. It celebrates the run with facts read off the real play-through and turns it into something the learner can carry out of the app:

  • Run receipt (single mono block, copyable): roadmap id, project, steps passed, started/finished timestamps. The progress store now stamps startedAt when a play-through's entry is created (backend + docs/learning-api.md updated).
  • Steps recap in two columns and skills chips derived from the validators — same deriveTopology source as the briefing page, no parallel derivation.
  • Downloadable share image card (1200x630): renders the run receipt as a PNG, sized to its content, with its own legible font scale and DPR handling; the on-screen preview is decoupled from the downloaded image size and scales to its container width.
  • Copy share post (primary action): copies the share text together with the share image in one ClipboardItem, EN/FR.
  • Next roadmap: resolves the first unstarted (then first unfinished) roadmap of the catalogue in the UI language and lands on its briefing page in the home shell — new LearningExit intent mirroring LearningIntent, consumed one-shot by ProjectsPage. Falls back to "All roadmaps" plus a catalogue-complete note when nothing is left.
  • Keep building link dismisses back to the canvas (containers keep running); the player then shows a quiet "Roadmap complete — View summary" row so the screen stays replayable, and reopening an already-finished roadmap replays it.
  • The completion detection lives in useLearningPlayer (fresh completion = the verdict that turned the last missing step green; deduplicated so re-validating a complete roadmap never reopens the screen). The step toast is suppressed/consumed when the celebration opens.

Types of Changes

  • New feature / node type addition
  • Bug fix (non-breaking change resolving an issue)
  • Refactoring / structural cleanup
  • Documentation update

Verification & Testing

Automated Checks

  • Run npm run lint successfully with no errors
  • Run npm run build successfully with no compilation errors
  • Run npm test successfully (all tests pass)

Backend: npm run build clean, 448/448 tests pass. Frontend: npm run build clean, lint clean (0 errors, 6 pre-existing warnings unrelated to this change), 299 tests pass — 2 initially timed out under parallel load (CanvasPage rename test, PostgresModal tabs test, both unrelated to this feature) and passed cleanly re-run in isolation.

Manual Verification

Playwright recipe against the dev server with every backend call mocked via page.route() (progress = all steps but the last passed), run in EN and FR:

  • Validate on the last step → completion screen opens with the receipt (started/finished from the store), steps recap, skills chips, and the share image card preview.
  • "Copy share post" → clipboard holds the share text and the share image together as a single ClipboardItem.
  • "Keep building" → back on the canvas with no stale step toast; "View summary" reopens the screen.
  • "Next roadmap" → home shell lands directly on the next unfinished roadmap's briefing page.

Checklist

  • My code follows the repository's code style and lint standards
  • I have updated the documentation or instructions if necessary
  • All unit and integration tests are passing

@OthmaneZ05
OthmaneZ05 requested a review from Derssa as a code owner August 16, 2026 03:11
# Conflicts:
#	frontend/src/shared/types/index.ts
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