Skip to content

Commit 5991f6d

Browse files
committed
fix(onboarding): restore page refresh on "Go to Dashboard" completion
- The onboarding refactor in afe1ae6 (#1949) introduced session-aware close behavior that distinguishes "manual" vs "automatic" onboarding - For manual sessions, closeModal() short-circuited with history.go() and the NEXT_STEPS onComplete passed `reload: !isManualSession.value`, meaning manual sessions never triggered a page refresh - This broke the "Go to Dashboard" flow: clicking it should always refresh so the dashboard loads with the newly configured state - Fix: always pass `reload: true` for NEXT_STEPS completion, and prioritize the reload path in closeModal() so it executes before the history navigation short-circuit
1 parent afe1ae6 commit 5991f6d

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

web/src/components/Onboarding/OnboardingModal.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,14 @@ const docsButtons = computed<BrandButtonProps[]>(() => {
304304
});
305305
306306
const closeModal = async (options?: { reload?: boolean }) => {
307+
if (options?.reload) {
308+
await onboardingModalStore.closeModal();
309+
cleanupOnboardingStorage();
310+
clearHistorySession();
311+
window.location.reload();
312+
return;
313+
}
314+
307315
if (typeof window !== 'undefined' && isManualSession.value && historyPosition.value >= 0) {
308316
window.history.go(-(historyPosition.value + 1));
309317
return;
@@ -312,10 +320,6 @@ const closeModal = async (options?: { reload?: boolean }) => {
312320
await onboardingModalStore.closeModal();
313321
cleanupOnboardingStorage();
314322
clearHistorySession();
315-
316-
if (options?.reload) {
317-
window.location.reload();
318-
}
319323
};
320324
321325
const setActiveStepByIndex = (stepIndex: number) => {
@@ -607,7 +611,7 @@ const currentStepProps = computed<Record<string, unknown>>(() => {
607611
case 'NEXT_STEPS':
608612
return {
609613
...baseProps,
610-
onComplete: () => closeModal({ reload: !isManualSession.value }),
614+
onComplete: () => closeModal({ reload: true }),
611615
};
612616
613617
default:

0 commit comments

Comments
 (0)