Skip to content

Commit c4bd242

Browse files
waleedlatif1claude
andcommitted
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>
1 parent 905d73b commit c4bd242

File tree

2 files changed

+10
-3
lines changed
  • apps/sim

2 files changed

+10
-3
lines changed

apps/sim/app/workspace/[workspaceId]/components/product-tour/use-tour.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ export function useTour({
145145
/** Auto-start on first visit */
146146
useEffect(() => {
147147
if (disabled || hasAutoStarted.current) return
148-
hasAutoStarted.current = true
149148

150149
const timer = setTimeout(() => {
150+
hasAutoStarted.current = true
151151
if (!isTourCompleted(storageKey)) {
152152
setStepIndex(0)
153153
setIsEntrance(true)

apps/sim/components/emcn/components/popover/popover.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,8 @@ const PopoverContent = React.forwardRef<
610610
showArrow ? 'overflow-visible' : 'overflow-auto',
611611
STYLES.colorScheme[colorScheme].content,
612612
STYLES.content,
613-
hasUserWidthConstraint && '[&_.flex-1]:truncate [&_[data-popover-section]]:truncate',
613+
hasUserWidthConstraint &&
614+
'[&_.flex-1:not([data-popover-scroll])]:truncate [&_[data-popover-section]]:truncate',
614615
border && 'border border-[var(--border-1)]',
615616
className
616617
)}
@@ -628,7 +629,13 @@ const PopoverContent = React.forwardRef<
628629
...style,
629630
}}
630631
>
631-
{showArrow ? <div className='flex-1 overflow-auto'>{children}</div> : children}
632+
{showArrow ? (
633+
<div data-popover-scroll className='min-h-0 flex-1 overflow-auto'>
634+
{children}
635+
</div>
636+
) : (
637+
children
638+
)}
632639
{showArrow && (
633640
<PopoverPrimitive.Arrow width={14} height={7} asChild>
634641
<svg

0 commit comments

Comments
 (0)