Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FEAT Make onboarding tour opt-in via a top-bar button#2069

Merged
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz/fix-gui-continue-target-input
Jun 22, 2026
Merged

FEAT Make onboarding tour opt-in via a top-bar button#2069
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz/fix-gui-continue-target-input

Conversation

@romanlutz

@romanlutz romanlutz commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

The onboarding tour felt like it showed up "every time." The tour only auto-started when the pyrit-tour-completed localStorage 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:

  • The tour no longer auto-starts on load. The useEffect in App.tsx that called startTour() for first-time visitors is removed (along with the now-unused hasCompletedTour read).
  • A visible "Take a tour" button is added to the top bar (right side, with a help icon), so the tour is easy to discover and launch on demand.
  • The previous trigger lived at the bottom of the left sidebar; it is removed to avoid a duplicate entry point.

The useTour hook 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

  • Added three tests to MainLayout.test.tsx: the "Take a tour" button renders when onStartTour is provided, clicking it invokes the callback, and it is absent otherwise.
  • Existing Navigation, App, and useTour suites still pass after removing the sidebar trigger and the auto-start.
  • Verified locally: npm run type-check and npm run lint pass (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":

Initial view After clicking "Take a tour"
Initial view with Take a tour button in the top bar Tour launched showing step 1 of 5

No production documentation changes; JupyText not applicable (frontend-only change).

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]>
Comment thread frontend/src/App.tsx
Comment thread frontend/src/components/Layout/MainLayout.tsx
Copilot AI added 2 commits June 22, 2026 12:41
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]>
@romanlutz romanlutz enabled auto-merge June 22, 2026 20:23
@romanlutz romanlutz added this pull request to the merge queue Jun 22, 2026
Merged via the queue into microsoft:main with commit ab0f5e7 Jun 22, 2026
47 checks passed
@romanlutz romanlutz deleted the romanlutz/fix-gui-continue-target-input branch June 22, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants