Skip to content

Conversation

@zpoint
Copy link
Collaborator

@zpoint zpoint commented Aug 13, 2025

Description

Resolve #6542
Resolve #6661

Problem:
After restoring tour auto-start in #6565, opening a new browser tab triggers the tour again. It should only auto-start once per browser profile/session.

Root cause:
FIRST_VISIT_KEY was stored in sessionStorage, which is scoped per tab. Each new tab appeared as a "first visit."

Change:
Switch FIRST_VISIT_KEY from sessionStorage to localStorage to share state across tabs.

Behavior:

  • Tour auto-starts only once across all tabs for the same browser profile.
  • Manual start via the help button still works.
  • Completion is still tracked via TOUR_COMPLETED_KEY in localStorage.

Files Changed

sky/dashboard/src/hooks/useFirstVisit.js

  • Read/write/remove FIRST_VISIT_KEY from localStorage instead of sessionStorage.
  • Updated inline comment to reflect cross-tab behavior.

Testing

  1. Open the dashboard in one tab: tour auto-starts once.
  2. Open a second tab (same profile): tour does not auto-start.
  3. Click "Dismiss" on the prompt: no further prompts.
  4. Manually start tour via help button: works.
  5. After completion, refresh and open new tabs: tour does not reappear.
image

Tested (run the relevant ones):

  • Code formatting: install pre-commit (auto-check on commit) or bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: /smoke-test (CI) or pytest tests/test_smoke.py (local)
  • Relevant individual tests: /smoke-test -k test_name (CI) or pytest tests/test_smoke.py::test_name (local)
  • Backward compatibility: /quicktest-core (CI) or pytest tests/smoke_tests/test_backward_compat.py (local)

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zpoint! LGTM

@zpoint zpoint merged commit 09e6cd7 into skypilot-org:master Aug 14, 2025
16 checks passed
massaindustries pushed a commit to Seeweb/skypilot that referenced this pull request Aug 26, 2025
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.

[SkyPilot API Server] Show "Welcome to SkyPilot" less The tour pop up keeps showing up

2 participants