Repository navigation
feat: profile career path redesign, achievement claims and shared reward celebrations - #273
Merged
Merged
Conversation
…share links, and branding
…ersonal best, and exercise celebrations
FaisalMisbah23
marked this pull request as ready for review
December 3, 2026 11:37
The header showed course counts and the current course, which the career map below already shows. It now shows rank tiles: the all-time XP rank among learners on the leaderboards (Top N% on a board of 20 or more), this week's league rank, the best league finish and top-three finishes. Ranks come only from the global boards, which list only learners who joined the leaderboards, so a profile never shows a rank its owner did not choose to share. A learner with no rank keeps the old stats, and the owner gets a link to join the leaderboard.
The header was a tall card with a large avatar and a 2 by 2 grid of big tiles. Now the avatar is smaller, the share button sits beside the name, and the ranks are one strip of four cells (two by two on a phone).
The share button moves to the page header next to Edit in settings, so the card only shows the learner. Each rank now reads as a sentence, number first: "Top 8% of all learners", "#2 in Silver league". The league cell says how close promotion is ("2 spots from Gold"), a league win shows as "1st league win", and a learner in the bottom half sees their place ("#30"), never a large percent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Redesigns the learner profile around the six-tier career ladder, replaces silent achievement payouts with an explicit Claim flow, and unifies reward and milestone celebrations across the entire learning experience (level-ups, weekly resets, personal records, quests, exercises, quizzes, capstones, and mascot reactions) with consistent top-layer confetti, party popper bursts, audio cues, and modals.
Changes
Profile (
/profileand public/u/[slug])CosmeticDotavatar, stats, and public/private share handling), responsive six-tier career map (vertical stepper on mobile, 6-column path on desktop without horizontal scroll), personal records, and featured achievements.GET /api/v1/learner/my-profilereturnscareer(CareerProgress) so the owner view explains the exact remaining courses and quiz score needed for the next tier, while public/u/[slug]profiles never expose the quiz average or empty"Not yet"record tiles.<main>landmark on/profile(owner view lives inside the workspace shell's<main>), formatsLeague Climberprogress with tier names (Bronze → Silver), and replaces the share action on private profiles with a link to/settings/profile.Achievement claiming & dashboard discovery
/profileno longer grants achievement credits silently (pendingAchievementClaimsreplacesgrantAchievementRewards).POST /api/v1/learner/achievements/:achievementId/claimto pay all reached, unpaid tiers once per tier via the credit ledger (achievement:<id>:<tier>), returning400when nothing is claimable and404for unknown achievements."Claim +N"buttons on achievements and a summary banner on the owner profile.unclaimedAchievements(count,totalCredits, and tier-awareidsformatted as<id>:<tiers>) toMenteeDashboardViewModeland a highlightedUnclaimedAchievementsBanneron/dashboardthat links to/profile#achievements-headingand playscelebrate("small")once per newly unlocked achievement/tier set.Career tier promotion & Level-up celebrations
career_tier_upengagement event with separate dedupe keys for the course-completion mascot toast (career_tier_up:<tier>) and the/profilecelebration modal (career_tier_up:profile:<tier>), so completing a course does not suppress the/profilecelebration."New career tier!"mascot rule linking to/profile.EngagementEnginewith anonEvents(fresh, rewards, shownRuleId)listener andMascotReaction.level, subscribed viasubscribeToEngagementEventsinMascotPlayer:"large"RewardCelebrationDialog("You reached Level N",firePartyPopper()+completionchime +/profileCTA) on any freshlevel_upevent once quizzes and active modals close, even if a higher-priority event won the mascot bubble.celebrationchime forweekly_goal_met(including earned Streak Freeze) anddaily_goal_metevents when swallowed by higher-priority reactions.Shared celebrations, top-layer confetti & learning moments
frontend/src/lib/celebrate.tsandRewardCelebrationDialog(with backdrop-click dismissal) shared across achievement claims, cosmetic purchases, career promotions, level-ups, 5/5 weekly quests, Monday league results, and auto-issued certificates (CertificateCard.tsxupdated cleanly withmain's polling flow).celebrate("large")to trigger the 200-particlefirePartyPopper()burst (packages/learning-ui), and updatedfireMiniConfettito render in apopover="manual"top-layer overlay (withz-index: 9999fallback) so confetti always appears above open<dialog>.showModal()modals.fireMiniConfettialongside success sound).celebrate("medium")when a polled check newly passes;celebrate("small")on submitting to mentor).firePartyPopper()on a 100% perfect passed quiz;fireMiniConfettion a normal pass).message-approvedandenrolled), anchored to Dot's bubble withcelebrationchime when no voice clip or modal is already playing.WeeklyQueststo close the quests dialog and open a"large"RewardCelebrationDialoglinking to/rewards.isSoundEnabled()inpackages/learning-uiso reduced motion disables animations/confetti without muting audio./u/<slug>and cleaned up remaining"Buildment"copy to"Edorax".Leaderboard, Monday reset & personal bests
WeeklyLeagueCelebration(wired into both/dashboardand/leaderboard), waiting for active modals to close before presenting once per week:RewardCelebrationDialogon Monday league promotion (PROMOTED,PROMOTED_TARGET,PROMOTED_BOTH) or last week's top-3 podium finish.RewardCelebrationDialogon Monday League Shield or Recovery save (SHIELD_HELD,RECOVERY_HELD)."New personal best!"toast once per board per week whenyou.score > you.bestScore > 0.useLeaderboardConfettito live top-3 podium placements (skipping if a modal dialog is open) so Monday promotion celebrations never overlap with double confetti or audio.Verification
pnpm --dir server sync-shared:check— shared types/engine in sync.load-mentee-dashboard,dashboard-model,engagement/engine,rules,safety,mascots,events),pnpm --dir server typecheck, andpnpm --dir server lint— all passing.celebrate,weekly-league-celebration,leaderboard-format,profile-view),pnpm --dir frontend typecheck, and targeted ESLint — all passing.