Skip to content

feat(onboarding): stateful first-task onboarding flow (#418)#555

Open
Rufai-Ahmed wants to merge 1 commit into
SoroLabs:mainfrom
Rufai-Ahmed:feat/first-task-onboarding-flow
Open

feat(onboarding): stateful first-task onboarding flow (#418)#555
Rufai-Ahmed wants to merge 1 commit into
SoroLabs:mainfrom
Rufai-Ahmed:feat/first-task-onboarding-flow

Conversation

@Rufai-Ahmed

Copy link
Copy Markdown

Summary

Implements the stateful, fault-tolerant orchestration for the "create your first task" onboarding flow — the resilient core the issue emphasizes (#418).

What's included

  • src/lib/onboarding/firstTaskFlow.ts — a pure reducer + helpers modelling the flow (create-taskfund-walletdeploy-target). Each step tracks status (idle/running/success/error), attempts, and error; supports advance-on-success, error capture, retry, skip, reset, and flowProgress.
  • src/lib/onboarding/useFirstTaskOnboarding.ts — a hook that runs each step's async action in order, advancing on success and surfacing failures for a manual retry() (plus skip()/reset()).

Design notes

  • The side-effecting actions (fund testnet wallet, deploy mock target, create task) are passed in as a single injected runStep(stepId) function — so the orchestration is decoupled from the blockchain and fully unit-testable, and integrators wire the real Stellar calls.
  • Complements (does not replace) the existing product-tour onboarding in src/lib/onboarding.

Scope

This delivers the stateful/fault-tolerant flow engine. The concrete testnet-funding (friendbot), mock-contract deploy, and onboarding UI are the integration follow-up — they plug into runStep and the exposed state.

Testing

14 Jest tests (reducer transitions + hook lifecycle: full run-through, failure→retry→resume, skip), all passing; tsc --noEmit clean for the new files.

Closes #418

@Rufai-Ahmed Rufai-Ahmed reopened this Jun 26, 2026
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Rufai-Ahmed Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Frontend] Create Automated Onboarding Flow with Interactive Tutorials

1 participant