Skip to content

Commit a14e7ce

Browse files
ndemiancclaude
andcommitted
Onboarding: make the LevelCode Welcome walkthrough first-run trigger robust
The 'Welcome to LevelCode' walkthrough (levelcode-ai#welcome) is our branded first-run onboarding (it's why the upstream Copilot 'Welcome to VS Code' modal was safe to kill — it would have duplicated it). But the trigger set didShowWelcome=true BEFORE opening, so a first-launch race that failed to open the walkthrough would suppress onboarding forever. Now it marks shown only after the walkthrough actually opens, and retries once at a longer delay for slow startups. Verified walkthroughCommand (defaultChatAgent → github.copilot.open.walkthrough) is dead config — only a type field, never read — so it surfaces nothing and defaultChatAgent is left untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 010ae7b commit a14e7ce

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎extensions/levelcode-ai/extension.js‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,10 +1548,16 @@ function activate(context) {
15481548
}
15491549
}
15501550

1551-
// First-launch onboarding: open the Welcome walkthrough once.
1551+
// First-launch onboarding: open the "Welcome to LevelCode" walkthrough once. Only mark it shown
1552+
// AFTER it actually opens (previously the flag was set up-front, so a first-launch race that failed
1553+
// to open the walkthrough would suppress onboarding forever). Retry once at a longer delay so a slow
1554+
// startup still gets it; give up quietly otherwise and try again next launch.
15521555
if (!context.globalState.get('levelcode.ai.didShowWelcome')) {
1553-
context.globalState.update('levelcode.ai.didShowWelcome', true);
1554-
setTimeout(() => { vscode.commands.executeCommand('workbench.action.openWalkthrough', 'levelcode.levelcode-ai#welcome', false).then(undefined, () => {}); }, 900);
1556+
const openWelcome = () => vscode.commands.executeCommand('workbench.action.openWalkthrough', 'levelcode.levelcode-ai#welcome', false);
1557+
const markShown = () => context.globalState.update('levelcode.ai.didShowWelcome', true);
1558+
setTimeout(() => {
1559+
openWelcome().then(markShown, () => setTimeout(() => openWelcome().then(markShown, () => {}), 1500));
1560+
}, 900);
15551561
}
15561562
}
15571563

0 commit comments

Comments
 (0)