You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🤖 Tutorial bubble: hand focus over when a covering panel closes, and Tab from the composer to the bubble #7198
Follow-up split out of #7170 (#7114). Impact 1. Two Codex findings from the PR's review round 5, deferred because that round fixes only blockers.
Background
#7170 stops the tutorial bubble from taking keyboard focus in two cases: when a text field (the composer) has focus, and when a full-screen layer (Artifacts, App View) covers the bubble. The bubble stays visible and clickable, and Escape on the bubble still skips the tutorial once the bubble has focus.
Problem 1: focus is not handed over when the covering panel closes
useBubbleFocus (src/browser/components/TutorialTooltip/TutorialTooltip.tsx) runs once, when the bubble is positioned. If a full-screen panel covers the bubble at that moment, the hook leaves focus alone. When the panel leaves full-screen, both panel implementations move focus back to their own panel, so the now-visible bubble never gets focus. The user must click or Tab to the bubble before Escape skips it.
Problem 2: Tab from the composer does not reach the bubble next
In the creation flow, focus stays in the composer. The bubble is portaled after the app tree with tabIndex={-1}, so Tab from the composer goes through the composer's mode and model controls and the rest of the page before it reaches Skip or Next.
Acceptance
When the layer that covered the bubble goes away, the bubble takes focus, unless a text field has focus.
From a focused composer, the next Tab reaches the bubble (for example, a focus sentinel or an explicit Tab handoff), and Shift+Tab from the bubble returns to the composer.
Activity
🤖 fix: keep the tutorial bubble from taking focus from a text field o…