Migrate the lastActiveChallengeId to lastActiveChallengeIds, a map of {courseId: challengeIds} to correctly track the last active challenge a user is on within a given course. Also include the lastActiveChallengeId in this map, to track exactly which challenge the user was last active on.
Add a new API for handling these updates, remove older side effect code, and make other updates to track this across the entire user flow: pre-account -> account creation.
Update e2e tests and add new test for lastActiveChallengeIds API.
Add Cypress tests to test the app tracks the lastActiveChallengeIds correctly.
Update the app initialization logic to improve how it initializes the challenge state, and separate this from the course initialization.
Allow currentChallengeId to be null on app initialization outside of the Workspace, partially/fully addressing #168. 😲
Demo:
Display "Resume" or "Start" depending on the user's last active challenge/default challenge. Resume links to the last active challenge, specific to each course.
This PR:
lastActiveChallengeId
tolastActiveChallengeIds
, a map of{courseId: challengeIds}
to correctly track the last active challenge a user is on within a given course. Also include thelastActiveChallengeId
in this map, to track exactly which challenge the user was last active on.e2e
tests and add new test forlastActiveChallengeIds
API.lastActiveChallengeIds
correctly.currentChallengeId
to benull
on app initialization outside of the Workspace, partially/fully addressing #168. 😲Demo: