feat(tour): added product tour#3703
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Integrates the tours into workspace/workflow layouts (auto-start with completion persisted via Updates multiple UI components with Written by Cursor Bugbot for commit d08805f. Configure here. |
Greptile SummaryThis PR introduces a guided product tour feature using Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Sidebar
participant NavTour
participant WorkflowTour
participant useTour
participant TourTooltip
Note over NavTour,WorkflowTour: Mounted in workspace/workflow layouts
NavTour->>useTour: autoStartDelay=1200ms, disabled=isWorkflowPage
useTour->>useTour: check localStorage (sim-nav-tour-completed-v1)
useTour-->>NavTour: run=true, stepIndex=0
NavTour->>TourTooltip: render step via TourTooltipAdapter
TourTooltip->>TourTooltip: querySelector(step.target)
TourTooltip-->>User: Popover anchored to target element
User->>User: Navigate to workflow page
NavTour->>useTour: disabled=true
useTour-->>NavTour: run=false (paused, not completed)
WorkflowTour->>useTour: autoStartDelay=800ms
useTour->>useTour: check localStorage (sim-workflow-tour-completed-v1)
useTour-->>WorkflowTour: run=true, stepIndex=0
User->>Sidebar: Click "Take a tour"
Sidebar->>Sidebar: dispatch START_WORKFLOW_TOUR_EVENT (isOnWorkflowPage=true)
WorkflowTour->>useTour: handleTrigger (event listener)
useTour->>useTour: clearTourCompletion, setTourKey+1, reset state
useTour-->>WorkflowTour: run=true, stepIndex=0 (re-mounted)
User->>TourTooltip: Click Next/Back/Close
TourTooltip->>useTour: handleCallback(STEP_AFTER / CLOSE)
useTour->>useTour: transitionToStep (fade-out → rAF × 2 → fade-in)
useTour-->>TourTooltip: isTooltipVisible=true at new position
|
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/components/product-tour/product-tour.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/components/product-tour/product-tour.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/components/product-tour/workflow-tour.tsx
Outdated
Show resolved
Hide resolved
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/components/product-tour/product-tour.tsx
Outdated
Show resolved
Hide resolved
- Extract shared TourState, TourStateContext, mapPlacement, and TourTooltipAdapter into tour-shared.tsx, eliminating ~100 lines of duplication between product-tour.tsx and workflow-tour.tsx - Fix stale closure in handleStartTour — add isOnWorkflowPage to useCallback deps so Take a tour dispatches the correct event after navigation
- Remove unused logger import and instance in product-tour.tsx - Remove unused tour-tooltip-fade animation from tailwind config - Remove unnecessary overflow-hidden wrapper around WorkflowTour - Add border stroke to arrow SVG in tour-tooltip for visual consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9078913 to
9c9c1f8
Compare
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/components/product-tour/tour-shared.tsx
Show resolved
Hide resolved
- Remove unnecessary 'use client' from workflow layout (children are already client components) - Fix ref guard timing issue in TourTooltipAdapter that could prevent Joyride from tracking tooltip on subsequent steps Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
apps/sim/app/workspace/[workspaceId]/components/product-tour/product-tour.tsx
Outdated
Show resolved
Hide resolved
- Extract duplicated Joyride floaterProps/styles into getSharedJoyrideProps() in tour-shared.tsx, parameterized by spotlightBorderRadius - Fix showArrow disabling content scrolling in PopoverContent by wrapping children in a scrollable div when arrow is visible Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/components/product-tour/use-tour.ts
Show resolved
Hide resolved
Prevents nav and workflow tours from overlapping. When a user navigates to a workflow page while the nav tour is running, the disabled flag now stops the nav tour instead of just suppressing auto-start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/components/product-tour/use-tour.ts
Show resolved
Hide resolved
…flict - Move hasAutoStarted flag inside setTimeout callback so it's only set when the timer fires, allowing retry if disabled changes during delay - Add data-popover-scroll attribute to showArrow scroll wrapper and exclude it from the flex-1 truncate selector to prevent overflow conflict Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
|
@greptile |
Joyride's spotlight already renders a full-screen overlay via boxShadow. The centered TourTooltip was adding its own bg-black/55 overlay on top, causing double-darkened backgrounds. Removed the redundant overlay div. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
The Docs link (https://docs.sim.ai) was buried in settings navigation. Moved it to the Help dropdown in the sidebar for better discoverability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add product tour * chore: updated modals * chore: fix the tour * chore: Tour Updates * chore: fix review changes * chore: fix review changes * chore: fix review changes * chore: fix review changes * chore: fix review changes * minor improvements * chore(tour): address PR review comments - Extract shared TourState, TourStateContext, mapPlacement, and TourTooltipAdapter into tour-shared.tsx, eliminating ~100 lines of duplication between product-tour.tsx and workflow-tour.tsx - Fix stale closure in handleStartTour — add isOnWorkflowPage to useCallback deps so Take a tour dispatches the correct event after navigation * chore(tour): address remaining PR review comments - Remove unused logger import and instance in product-tour.tsx - Remove unused tour-tooltip-fade animation from tailwind config - Remove unnecessary overflow-hidden wrapper around WorkflowTour - Add border stroke to arrow SVG in tour-tooltip for visual consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(tour): address second round of PR review comments - Remove unnecessary 'use client' from workflow layout (children are already client components) - Fix ref guard timing issue in TourTooltipAdapter that could prevent Joyride from tracking tooltip on subsequent steps Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(tour): extract shared Joyride config, fix popover arrow overflow - Extract duplicated Joyride floaterProps/styles into getSharedJoyrideProps() in tour-shared.tsx, parameterized by spotlightBorderRadius - Fix showArrow disabling content scrolling in PopoverContent by wrapping children in a scrollable div when arrow is visible Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * lint * fix(tour): stop running tour when disabled becomes true Prevents nav and workflow tours from overlapping. When a user navigates to a workflow page while the nav tour is running, the disabled flag now stops the nav tour instead of just suppressing auto-start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(tour): move auto-start flag into timer, fix truncate selector conflict - Move hasAutoStarted flag inside setTimeout callback so it's only set when the timer fires, allowing retry if disabled changes during delay - Add data-popover-scroll attribute to showArrow scroll wrapper and exclude it from the flex-1 truncate selector to prevent overflow conflict Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(tour): remove duplicate overlay on center-placed tour steps Joyride's spotlight already renders a full-screen overlay via boxShadow. The centered TourTooltip was adding its own bg-black/55 overlay on top, causing double-darkened backgrounds. Removed the redundant overlay div. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: move docs link from settings to help dropdown The Docs link (https://docs.sim.ai) was buried in settings navigation. Moved it to the Help dropdown in the sidebar for better discoverability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Adithya Krishna <aadithya794@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Type of Change
Testing
Tested manually
Checklist