Skip to content

Gamification: Dashboard summary card + module-completion toast #81

Description

@ljm20088

Parent PRD

#41

What to build

Surface gamification stats in two remaining UI locations (merged slice):

  1. Dashboard summary card (app/routes/dashboard.tsx) — a card showing current XP, level, progress toward next level, current streak, and longest streak, shown when the student logs in. See PRD "UI Placement" (Dashboard), user story 11.
  2. Module-completion toast — when a student completes the last lesson in a module, show a Sonner toast with the total XP earned across that module's lessons, e.g. "Module complete! +40 XP earned". No per-lesson XP toast. See PRD "UI Placement" (Module completion toast), user story 10.

Both consume stats/XP already produced by the foundation and streak slices.

Acceptance criteria

  • Dashboard shows a summary card with XP, level, progress-to-next, current streak, and longest streak
  • Completing the last lesson in a module triggers a toast showing total XP earned across that module
  • Completing a non-final lesson shows no module toast
  • Last-lesson-in-module detection uses lesson position ordering
  • pnpm test and typecheck pass

Blocked by

User stories addressed

  • User story 10
  • User story 11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions