Part of #8364.
The frontend tracks the onboarding phase in frontend/src/stores/ux.js (onboardingStage: intake to building to done), but nothing lets the Expert move it. startOnboardingBuild() (the building transition) has no caller, and there is no way back to intake at all.
Add a frontend ui_ tool (like ui_navigate) that sets the onboarding phase to a target value. It lives at frontend/src/mcp/tools/onboarding.ts (modeled on frontend/src/mcp/tools/navigation.ts), registered in frontend/src/mcp/tools/index.ts; its handler runs in the user's Expert browser tab and calls the ux.js store, so the UI reacts. No new dispatch plumbing is needed: AutomationsService.dispatch already routes any registered tool. Mark the tool audience: expert so the caller-filtering work (FlowFuse/engineering#315) keeps it from mcp callers.
The tool takes a phase argument (intake | building | done) and maps it:
building to startOnboardingBuild()
done to endOnboarding()
intake to a new resumeOnboardingIntake() action that sets intake, re-raises the navigation intent so the UI returns to the onboarding page, leaves isNewlyCreatedUser untouched, and preserves the already-provisioned instance.
The Expert calls this tool the same way it calls ui_navigate: to reach building on entering the editor, back to intake when the user wants to add more before building, and done at handover.
Done when
- A frontend
audience: expert ui_ tool sets the onboarding phase; the FlowFuse/engineering#315 filter keeps it from mcp callers.
phase: building and phase: done drive startOnboardingBuild() and endOnboarding(), and the UI follows.
phase: intake moves a user in building back to the onboarding page via a new resumeOnboardingIntake() action, without restarting onboarding and without tearing down the provisioned instance.
- The Expert calls the tool at all three transitions.
Worth knowing
Depends on FlowFuse/engineering#315 for the audience marker. It runs in the user's Expert tab like ui_navigate, reached over that tab's own session; there is no tab pinning (pinning is a third-party concept the Expert does not use, which is why the browser-session tools are hidden from it). The skip path stays as-is (endOnboarding() called directly).
Part of #8364.
The frontend tracks the onboarding phase in
frontend/src/stores/ux.js(onboardingStage:intaketobuildingtodone), but nothing lets the Expert move it.startOnboardingBuild()(thebuildingtransition) has no caller, and there is no way back tointakeat all.Add a frontend
ui_tool (likeui_navigate) that sets the onboarding phase to a target value. It lives atfrontend/src/mcp/tools/onboarding.ts(modeled onfrontend/src/mcp/tools/navigation.ts), registered infrontend/src/mcp/tools/index.ts; its handler runs in the user's Expert browser tab and calls theux.jsstore, so the UI reacts. No new dispatch plumbing is needed:AutomationsService.dispatchalready routes any registered tool. Mark the toolaudience: expertso the caller-filtering work (FlowFuse/engineering#315) keeps it frommcpcallers.The tool takes a
phaseargument (intake|building|done) and maps it:buildingtostartOnboardingBuild()donetoendOnboarding()intaketo a newresumeOnboardingIntake()action that setsintake, re-raises the navigation intent so the UI returns to the onboarding page, leavesisNewlyCreatedUseruntouched, and preserves the already-provisioned instance.The Expert calls this tool the same way it calls
ui_navigate: to reachbuildingon entering the editor, back tointakewhen the user wants to add more before building, anddoneat handover.Done when
audience: expertui_tool sets the onboarding phase; the FlowFuse/engineering#315 filter keeps it frommcpcallers.phase: buildingandphase: donedrivestartOnboardingBuild()andendOnboarding(), and the UI follows.phase: intakemoves a user inbuildingback to the onboarding page via a newresumeOnboardingIntake()action, without restarting onboarding and without tearing down the provisioned instance.Worth knowing
Depends on FlowFuse/engineering#315 for the
audiencemarker. It runs in the user's Expert tab likeui_navigate, reached over that tab's own session; there is no tab pinning (pinning is a third-party concept the Expert does not use, which is why the browser-session tools are hidden from it). The skip path stays as-is (endOnboarding()called directly).