From a29ca0ecb9c34961bce5d61974d2049f8fbae4a2 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Tue, 9 Dec 2025 09:48:23 +0800 Subject: [PATCH] feat: update onboarding-registry service to allow set `default` onboard flow on registration --- console/app/services/onboarding-registry.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/console/app/services/onboarding-registry.js b/console/app/services/onboarding-registry.js index 8b8d6313..300306b5 100644 --- a/console/app/services/onboarding-registry.js +++ b/console/app/services/onboarding-registry.js @@ -9,7 +9,7 @@ export default class OnboardingRegistryService extends Service { this.defaultFlow = flowId; } - registerFlow(flow) { + registerFlow(flow, options = {}) { if (!flow || !flow.id || !flow.entry || !Array.isArray(flow.steps)) { throw new Error('Invalid FlowDef: id, entry, steps are required'); } @@ -23,6 +23,11 @@ export default class OnboardingRegistryService extends Service { } } this.flows.set(flow.id, flow); + + // If specified, set as default flow + if (options.default) { + this.defaultFlow = flow.id; + } } getFlow(id) {