From 15fc0bb5eec272e90e3e933d1b0f1e1b379e871b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 02:55:38 +0000 Subject: [PATCH] Replay the welcome tour from Settings (?welcome) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018xNjY7412Rp5bFuw5h69yu --- src/App.tsx | 10 +++++++++- src/routes/Settings.tsx | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 4d4af40..94fcd4b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -711,11 +711,19 @@ export default function App() { // First visit: a short welcome, unless a link already brought them here with a purpose. const [showOnboarding, setShowOnboarding] = useState(() => { const params = new URLSearchParams(window.location.search); + // ?welcome replays it on purpose (from Settings). + if (params.has("welcome")) return true; return !params.has("challenge") && !params.has("daily") && !params.has("drill") && shouldOnboard(); }); const finishOnboarding = useCallback((choice: OnboardingChoice | null) => { markOnboarded(); setShowOnboarding(false); + if (new URLSearchParams(window.location.search).has("welcome")) { + setSearchParams((params) => { + params.delete("welcome"); + return params; + }, { replace: true }); + } if (choice?.kind === "code") { if (devCategory !== "public") handleDevCategoryChange("public"); handleLanguageChange(choice.language); @@ -726,7 +734,7 @@ export default function App() { handleDevCategoryChange("passages"); } focusWorkspace(); - }, [devCategory, handleDevCategoryChange, handleLanguageChange, handleTextLanguageChange, focusWorkspace]); + }, [devCategory, handleDevCategoryChange, handleLanguageChange, handleTextLanguageChange, focusWorkspace, setSearchParams]); const handleNextSnippet = useCallback(() => { setResult(null); diff --git a/src/routes/Settings.tsx b/src/routes/Settings.tsx index 6e73d58..4653454 100644 --- a/src/routes/Settings.tsx +++ b/src/routes/Settings.tsx @@ -588,6 +588,9 @@ export default function Settings() { Esc: restart Tab: indent / stop Enter: retry + + Replay welcome tour +