feat: hide Next Action when current state matches step target

Only display the bead diff summary ("Next Action") when the current abacus
value differs from the target value for the current step. This eliminates
redundant information and provides a cleaner user experience.

Logic:
- Compare currentValue with expectedSteps[currentMultiStep].targetValue
- Show "Next Action" only when values don't match
- Automatically hides when user completes the step action
- Maintains pedagogical term display regardless of completion state

This creates a more intelligent UI that shows guidance only when needed.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-09-23 08:15:12 -05:00
parent cf1d6b8d35
commit ed3d89667e

View File

@@ -834,6 +834,10 @@ export function TutorialPlayer({
const mathTerm = expectedSteps[index]?.mathematicalTerm
const isCurrentStep = index === currentMultiStep
// Get the target value for this step to check if we need to show "Next Action"
const stepTargetValue = expectedSteps[index]?.targetValue
const needsAction = isCurrentStep && currentStepSummary && currentValue !== stepTargetValue
return (
<div key={index}>
<li className={css({
@@ -861,8 +865,8 @@ export function TutorialPlayer({
)}
</li>
{/* Show bead diff summary directly under current step */}
{isCurrentStep && currentStepSummary && (
{/* Show bead diff summary only when current value doesn't match step target */}
{needsAction && (
<div className={css({
ml: 6, // Align with step text (after number and dot)
mt: 1,