feat(learning): show the solution as the step's debrief once its checks pass - #95
Merged
Merged
Conversation
Derssa
approved these changes
Sep 4, 2026
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 of Changes
A step's
solutionwas reachable only through the hint ladder's two-click reveal, so a learner who passes a step never sees the explanation written for it. Once a step's checks pass, the player now shows the solution on its own, marked debrief, with no reveal control.StepHintsgets apassedprop. When set and the step has a solution, the solution renders as the debrief; hints already revealed stay readable, unrevealed ones stay hidden, and the reveal button disappears. A solution the learner had already revealed keeps itssolutionmarker. Before the pass nothing changes.RoadmapPlayerpasses it from the persisted completion state or the latest validation result, so revisiting a completed step shows its debrief too.learning.player.debriefLabel(en/fr).docs/roadmap-format.md: thesolutionfield is now documented as the step's debrief after a pass, to be written explanation-first, recipe last.Types of Changes
Verification & Testing
Automated Checks
npm run lintsuccessfully with no errors (0 errors; the 5 warnings pre-date this change)npm run buildsuccessfully with no compilation errorsnpm testsuccessfully (all tests pass) — 371 frontend tests, including 4 newStepHintscases: debrief shown with no control after a pass, revealed hints kept under it, an already-revealed solution keeps thesolutionmarker, a passed step without a solution renders nothingManual Verification
Not exercised in the browser for this PR; the behaviour is covered by the component tests above. To check by hand: play any catalogue roadmap step to green, the debrief appears under the instruction with no hint button; use Previous to return to it, it is still there; on a step that has not passed, the hint ladder and the two-click solution reveal behave as before.
Checklist
🤖 Generated with Claude Code