Files
accounted/components/onboarding
Jakob Wennberg 741cdcc60e feat(onboarding): completion signature when the checklist finishes (#1487)
* feat(onboarding): completion signature when the checklist finishes

The getting-started block used to vanish the instant its last step
completed: a useEffect PATCHed completed:true and the component returned
null, so the arc's payoff was a silent disappearance.

Now the session that finishes the last step gets the completion beat the
activation analysis prescribed: the JourneyOrb check-morph (same particle
idiom as the journey, deliberately not confetti) with one verdict line,
'Bokföringen är igång.', held for a beat before the block fades and
retires. The beat latches via a ref so a failed completion PATCH can
retry without replaying it, and the PATCH still fires first so completion
is durable even if the user navigates away mid-beat. Companies whose
completedAt arrives from the server never see the beat: it plays exactly
once, in the finishing session.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(onboarding): hold the retired state while the completion PATCH is in flight

PR Agent on #1487: if the completed-PATCH takes longer than the 3.2s
beat, retiring fell back to null with completedAt still unset, so the
full checklist flashed back in after the verdict had already played. The
beat now ends in a terminal 'done' phase that keeps the block retired
for the rest of the session; a failed PATCH keeps retrying invisibly and
the next visit renders from server truth either way.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 09:57:38 +02:00
..