Uh oh!
There was an error while loading. Please reload this page.
improvement(tour): fix tour auto-start logic and standardize selectors - #3751
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Standardizes tour targeting to Updates settings tooltips to trigger from an info icon, tweaks Written by Cursor Bugbot for commit 7fddadf. Configure here. |
Uh oh!
There was an error while loading. Please reload this page.
Greptile SummaryThis PR makes several targeted fixes and improvements to the product tour system. The primary change — a module-level Key changes across the PR:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant C as Component Mount
participant H as useTour Hook
participant S as autoStartAttempted Set
participant LS as localStorage
participant RAF as rAF / setTimeout
C->>H: mount (disabled=false)
H->>S: has(storageKey)?
S-->>H: false
H->>LS: isTourCompleted(storageKey)?
LS-->>H: false
H->>RAF: setTimeout(autoStartDelay)
Note over C,H: Component remounts (e.g. navigation)
C->>H: unmount → cleanup clears timer
C->>H: remount (disabled=false)
H->>S: has(storageKey)?
S-->>H: false (add() not called yet)
H->>RAF: setTimeout(autoStartDelay) again ⚠️
RAF-->>H: timer fires
H->>H: check disabledRef.current
H->>S: add(storageKey)
H->>RAF: scheduleReveal() → rAF(outer) → rAF(inner) → setIsTooltipVisible(true)
Note over H,RAF: On step transition
H->>H: setIsTooltipVisible(false)
H->>RAF: cancelPendingTransitions() → clears transitionTimer + rafRef
H->>RAF: setTimeout(FADE_OUT_MS)
RAF-->>H: fires → setStepIndex, scheduleReveal()
Note over H,RAF: On pause/stop/unmount
H->>RAF: cancelPendingTransitions() → cancelAnimationFrame(rafRef.current)
Reviews (2): Last reviewed commit: "fix(tour): address PR review comments" | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Move autoStartAttempted.add() inside timer callback to prevent blocking auto-start when tour first mounts while disabled - Memoize setJoyrideRef with useCallback to prevent ref churn - Remove unused joyrideRef
waleedlatif1
commented
Mar 25, 2026
waleedlatif1
commented
Mar 25, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
#3751) * improvement(tour): fix tour auto-start logic and standardize selectors * fix(tour): address PR review comments - Move autoStartAttempted.add() inside timer callback to prevent blocking auto-start when tour first mounts while disabled - Memoize setJoyrideRef with useCallback to prevent ref churn - Remove unused joyrideRef
#3751) * improvement(tour): fix tour auto-start logic and standardize selectors * fix(tour): address PR review comments - Move autoStartAttempted.add() inside timer callback to prevent blocking auto-start when tour first mounts while disabled - Memoize setJoyrideRef with useCallback to prevent ref churn - Remove unused joyrideRef
#3751) * improvement(tour): fix tour auto-start logic and standardize selectors * fix(tour): address PR review comments - Move autoStartAttempted.add() inside timer callback to prevent blocking auto-start when tour first mounts while disabled - Memoize setJoyrideRef with useCallback to prevent ref churn - Remove unused joyrideRef
Summary
disabledRefso auto-start effect doesn't re-trigger on navigationdata-tourattributesloopprop to Tooltip.Preview (defaults to true), useloop={false}for auto-connectType of Change
Testing
Tested manually
Checklist