FEAT Make onboarding tour opt-in via a top-bar button#2069
Merged
romanlutz merged 3 commits intoJun 22, 2026
Conversation
The onboarding tour auto-started on every visit when the 'pyrit-tour-completed' flag was not set, which re-triggered on reloads and in any browser/profile without the flag. Make the tour opt-in: it no longer auto-starts, and a visible 'Take a tour' button in the top bar launches it on demand. The old sidebar trigger is removed to avoid a duplicate entry point. Co-authored-by: Copilot <[email protected]>
jsong468
reviewed
Jun 22, 2026
jsong468
reviewed
Jun 22, 2026
jsong468
approved these changes
Jun 22, 2026
The tour is now launched only from the top-bar button, so the pyrit-tour-completed localStorage flag and hasCompletedTour return value are no longer read anywhere. Remove the storage key, the read/write, and the hook's hasCompletedTour output, along with the now-obsolete tests and mock fields. Co-authored-by: Copilot <[email protected]>
Resolve conflicts from main's theme/navigation refactor: - App.tsx: use handleNavigate + useTheme().resolved for useTour; keep tour opt-in (no auto-start, no hasCompletedTour). - Navigation.tsx: keep main's theme menu and onOpenFeedback; drop the sidebar tour button and onStartTour prop (tour now launches from the top bar). - MainLayout.tsx: pass only onOpenFeedback to Navigation. - MainLayout.test.tsx: keep the top-bar tour-button tests; drop the stale isDarkMode/data-dark-mode test removed by main's refactor. Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The onboarding tour felt like it showed up "every time." The tour only auto-started when the
pyrit-tour-completedlocalStorage flag was not set, and that flag is written only when the tour is finished/skipped/closed. So if a user ignored the tour and reloaded (or opened the app in a different browser, an incognito window, or after clearing site data), it kept re-appearing.This makes the tour opt-in instead:
useEffectinApp.tsxthat calledstartTour()for first-time visitors is removed (along with the now-unusedhasCompletedTourread).The
useTourhook itself is unchanged, so the tour content/flow and the existing "completed" persistence behavior are untouched; only the entry points and the auto-start are affected.Tests and Documentation
MainLayout.test.tsx: the "Take a tour" button renders whenonStartTouris provided, clicking it invokes the callback, and it is absent otherwise.Navigation,App, anduseToursuites still pass after removing the sidebar trigger and the auto-start.npm run type-checkandnpm run lintpass (0 warnings); affected Jest suites pass (57 tests). Manually confirmed in the running GUI that nothing auto-opens on a fresh load and the top-bar button launches the tour.Before (initial load, no auto-tour, button in the top-right) and after clicking "Take a tour":
No production documentation changes; JupyText not applicable (frontend-only change).