Skip to content

Narrow follow-up composer collapses under its own model picker on a real click #2911

Closed

Description

@Techno911

The workflow

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:

  1. The picker's Popover trigger blurs the editor on pointerdown (popover.tsx#L90-L95, blurActiveKeyboardInputBeforeOverlayOpen).
  2. 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".
  3. 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.

Notes

Prototype (not a PR, per CONTRIBUTING): Techno911@8ca3861bc

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

  1. added theissue type on Sep 2, 2026
  2. added
    ui
    confirmed-repro
    on Sep 2, 2026
  3. bb-slop-cop commented on Sep 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions