Skip to content

feat(learning): show the solution as the step's debrief once its checks pass - #95

Merged
Derssa merged 1 commit into
mainfrom
feat/step-debrief
Sep 4, 2026
Merged

Derssa merged 1 commit into
mainfrom
feat/step-debrief

Conversation

@OthmaneZ05

Copy link
Copy Markdown
Collaborator

Summary of Changes

A step's solution was 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.

  • StepHints gets a passed prop. 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 its solution marker. Before the pass nothing changes.
  • RoadmapPlayer passes it from the persisted completion state or the latest validation result, so revisiting a completed step shows its debrief too.
  • New i18n key learning.player.debriefLabel (en/fr).
  • docs/roadmap-format.md: the solution field is now documented as the step's debrief after a pass, to be written explanation-first, recipe last.

Types of Changes

  • New feature / node type addition
  • Bug fix (non-breaking change resolving an issue)
  • Refactoring / structural cleanup
  • Documentation update

Verification & Testing

Automated Checks

  • Run npm run lint successfully with no errors (0 errors; the 5 warnings pre-date this change)
  • Run npm run build successfully with no compilation errors
  • Run npm test successfully (all tests pass) — 371 frontend tests, including 4 new StepHints cases: debrief shown with no control after a pass, revealed hints kept under it, an already-revealed solution keeps the solution marker, a passed step without a solution renders nothing

Manual 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

  • My code follows the repository's code style and lint standards
  • I have updated the documentation or instructions if necessary
  • All unit and integration tests are passing

🤖 Generated with Claude Code

@OthmaneZ05
OthmaneZ05 requested a review from Derssa as a code owner September 3, 2026 23:41
@Derssa
Derssa merged commit 1c186ba into main Sep 4, 2026
3 checks passed
@Derssa
Derssa deleted the feat/step-debrief branch September 4, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants