Skip to content

bug(web): clicking inside the crew roster gate expands the composer #189

Closed

Description

@Jacksondr5

What happens

Clicking anywhere inside the crew roster gate card (a seat's expander, the remove button, the seat name or persona picker, Approve or Decline) switches the composer from its resting layout to its expanded layout: wider insets, taller prompt area, the card re-flows. The card itself did not ask for that; it reads as an unintended UI state change. Seen on web (desktop viewport) in the Test Squad thread on a /crew proposal.

Two screenshots of the same card, before and after one click:

roster gate, resting composer

roster gate after one click, expanded composer

Why

CrewRosterGate is mounted inside the composer's root <form> (apps/web/src/components/chat/ChatComposer.tsx, the J5 mount beside SteerUnavailableNotice). That form's onFocusCapture sets isComposerFocused(true) for any focus event inside it, and the focused flag drives the resting-versus-expanded geometry. The handler exempts only two scopes, found with closest() in composerEventScope.ts: elements under [data-chat-composer-collapsed-controls="true"], and, when the controls are in the strip, elements under [data-chat-composer-resting-controls="true"], [data-chat-composer-resting-images="true"], or [data-composer-context-control]. The gate's root carries none of these, so its first focusable element expands the composer.

Fix, J5-owned either way

  • Preferred: mount the gate above the composer form rather than inside it. It is a planning-style question answered before the next message, not a composer control, and outside the form its focus is nobody's business. The mount line is already the fork's appended case, so moving it is the same one-line seam.
  • Alternative: keep the mount and give the gate's root one of the exempt markers so focus inside the card is ignored by the expand logic. Cheaper, but it borrows an attribute whose name means something else.

Not a blocker for #148; noted there.

Activity

  1. bryantderosier commented on Sep 18, 2026

    @bryantderosier
    Collaborator

    Implemented in #148 and carried through the stack. CrewRosterGate now sits above the composer form. In an isolated local app, focusing the seat name, instructions textarea, and custom-seat picker kept the composer collapsed. Leaving this issue open for maintainer review.

    Focused roster field with composer remaining collapsed

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions