Context
Challenges is the XP, levels and streaks feature in the learner player, built in August and September 2026. I was one of the implementers.
The problem
Schools wanted engagement mechanics tied to real watch progress, not to page opens. Completion sync and a watch-percentage gate had to agree with the player, or learners would earn XP for content they had not watched.
What I did
I built completion sync and a persisted watch bucket, so progress is kept.
I added the watch-percentage gate, so XP only counts after enough of a lesson is watched.
I built the XP and level header and the overview card, and streak rules taken from the batch.
I fixed the audit findings before launch: an audit on 8 September found 9 defects, and I fixed all 9.
Key decision
I tied XP to the player's own completion data, not to a separate counter in the feature. That kept one source of truth.
The cost was a dependency on the player's progress model, so changes there need care. I accepted it over two counters drifting apart.
Result
The feature shipped with 9 audit defects fixed before launch. I have no engagement figures, so I do not claim any effect on retention or completion.
What I learned
I would run the audit earlier in the build, so defects are found sooner.
Stack
- TypeScript
- React
- Next.js
