Skip to content

Commit 6595f11

Browse files
committed
🤖 fix: stabilize ChatInput focus in bash stories
1 parent cb99a07 commit 6595f11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/browser/stories/App.bash.stories.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ async function expandAllBashTools(canvasElement: HTMLElement) {
6363
}
6464
}
6565

66-
// Avoid leaving focus on a tool header (some components auto-focus inputs on timers)
66+
// Avoid leaving focus on a tool header.
67+
// ChatInput also auto-focuses on a 100ms timer on mount/workspace changes; wait for
68+
// that to fire before blurring so Storybook screenshots are deterministic.
69+
await new Promise((resolve) => setTimeout(resolve, 150));
6770
(document.activeElement as HTMLElement | null)?.blur?.();
6871
}
6972

0 commit comments

Comments
 (0)