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
Narrow follow-up composer collapses under its own model picker on a real click #2911
Several thread panes side by side, each around 300–480 px wide. In one of them I click the model picker at the bottom of the follow-up composer.
What happens today
The composer collapses to its single-row state under the picker and stays collapsed after the picker closes; the prompt cannot be typed until the row is focused again. It happens in every pane once panes are narrow enough for the container-compact presentation (--follow-up-composer-container-compact, app.css#L409-L413).
Sequence:
The picker's Popover trigger blurs the editor on pointerdown (popover.tsx#L90-L95, blurActiveKeyboardInputBeforeOverlayOpen).
FollowUpPromptBox sees the blur and schedules its focus-loss check for the next frame (FollowUpPromptBox.tsx#L413-L446). The check keeps the composer open only if focus is still inside it or an overlay trigger already reports aria-expanded="true".
A real click holds the pointer for 50–150 ms. The frame fires before pointerup, the popover has not opened yet, the trigger is not expanded, focus is on body, so the check collapses the composer. The popover then opens over a collapsed composer.
A synthetic click (Playwright click(), test fireEvent.click) fires down/up in the same task, so the popover is already expanded by the time the frame runs and the bug never shows. Holding the pointer (mouse.down(); wait 150ms; mouse.up()) reproduces it every time.
What you would expect
Pressing a control that belongs to the composer does not collapse the composer. The focus-loss check should treat a pointer held on an overlay trigger inside the composer as "still in the composer" until the trigger has had a chance to open.
The fix marks pointerdown on [aria-haspopup] inside the composer and skips the collapse while the mark is set; the mark clears a tick after pointerup so a later real focus loss still collapses. A test reproduces the not-yet-open trigger and asserts both halves.
Activity
bb-slop-cop commentedon Sep 2, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotui,confirmed-repro.confirmed-repro.Keep narrow composer open during overlay trigger presses (get-bb#2912)