Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(onboarding): not marked as complete on close, skip should close (#3693)

dev-rb49e2a1cca76d
diff --git a/js/app/packages/app/component/interactive-onboarding/InteractiveOnboardingModal.tsx b/js/app/packages/app/component/interactive-onboarding/InteractiveOnboardingModal.tsx
index 7a7c76cd82..73e3b69156 100644
--- a/js/app/packages/app/component/interactive-onboarding/InteractiveOnboardingModal.tsx
+++ b/js/app/packages/app/component/interactive-onboarding/InteractiveOnboardingModal.tsx
@@ -250,14 +250,10 @@ function InteractiveOnboardingModalLayout(props: {
onClose: () => void;
}) {
const [phase, setPhase] = createSignal<ModalPhase>('start');
- const completeTutorial = useCompleteTutorialMutation();
const onboarding = useOnboarding();
const handleSkip = () => {
- if (props.isFirstTimeOnboarding) {
- completeTutorial.mutate(undefined);
- }
- setPhase('end');
+ props.onClose();
};
const handleReplay = () => {
@@ -292,10 +288,14 @@ export function InteractiveOnboardingModal(
const [internalOpen, setInternalOpen] = createSignal(
props.defaultOpen ?? false
);
+ const completeTutorial = useCompleteTutorialMutation();
const open = () => props.open ?? internalOpen();
const setOpen = (nextOpen: boolean) => {
+ if (!nextOpen) {
+ completeTutorial.mutate(undefined);
+ }
setInternalOpen(nextOpen);
props.onOpenChange?.(nextOpen);
};