Skip to content

Constrain composer banner stacks to prevent horizontal overflow - #2528

Merged
ymichael merged 3 commits into
get-bb:mainfrom
vburojevic:bb/composer/prompt-stack-track
Sep 7, 2026
Merged

ymichael merged 3 commits into
get-bb:mainfrom
vburojevic:bb/composer/prompt-stack-track

Conversation

@vburojevic

@vburojevic vburojevic commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

A long plugin composer banner can widen the shared grid column above the composer and stretch neighboring cards offscreen. At a 402px mobile viewport, a synthetic routing-rule banner using the normal plugin card wrapper made both itself and the native queue 1,255.84px wide inside a 370px stack. The queue's collapse and message-action buttons moved outside the viewport. The banner already used min-w-0 flex-1 truncate; the implicit auto column still allowed its intrinsic width to determine the track size.

A long queued message alone stayed within bounds in our tests on both the original base and current main. The confirmed reproduction is a wide plugin banner affecting the shared stack; this PR does not claim that queued messages alone trigger the issue.

What changed

Constrain all three banner stacks—the follow-up composer, its stack-only variant, and the new-thread composer—to grid-template-columns: minmax(0, 1fr). A shared PROMPT_STACK_TRACK_CLASS keeps their declarations consistent. Cards receive the available stack width, allowing existing text truncation to work and keeping neighboring controls onscreen.

How you verified

  • Integrated with main at accd559592 before verification.
  • pnpm exec turbo run typecheck test --filter=@bb/app --output-logs=errors-only passed: 480 test files, 3,925 tests passed, 4 skipped. The regression test guards the explicit grid declaration; jsdom does not validate layout geometry.
  • pnpm exec oxfmt --check passed for all four changed files; git diff --check passed.
  • Drove the integrated source app with dev-browser 1.0.0-rc.3 in headless Chromium, using a synthetic plugin banner registered through the app's real slot registry and a scheduled queued message. No custom widths were assigned to the fixture banner.
  • At 402x874, the follow-up banner and queue both measured 370px wide, with their right edges at x=386. Overriding only the stack's grid track back to none reproduced 1,255.84px cards; removing the override restored the fixed layout. Captured before/after screenshots and verified queue collapse, reopen, and the message action menu through browser input.
  • The new-thread banner also measured 370px at the same mobile viewport; the same control override reproduced 1,255.84px overflow there. At a 1280px desktop viewport, follow-up cards fit the 728px stack with the composer expanded and collapsed.
  • The stack-only variant uses the same explicit declaration but was not independently exercised in the browser. Mobile checks used Chromium emulation, not iOS Safari.

AGENT GENERATED

vburojevic and others added 3 commits August 27, 2026 08:27
The stack of cards above the composer is a bare `grid gap-2`, which drops
every card into an implicit `auto` column. That column's base size is the
widest card's min-content width, and `justify-items: stretch` then hands
that width to every other card — so one wide card takes the whole stack
off-screen with it.

The cards themselves are not at fault. A row built as
`min-w-0 flex-1 truncate` still reports its full untruncated string as its
min-content contribution, because the truncation only bites once the parent
hands the row a definite width. Under intrinsic sizing there is no such
width, so the guard never engages.

`grid-cols-[minmax(0,1fr)]` pins the track to the shell instead. Each card
gets a definite width and its own truncation does the rest.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@ymichael ymichael changed the title Pin the composer prompt stack to a single-column grid track so one wide card stops dragging the rest off-screen Constrain composer banner stacks to prevent horizontal overflow Sep 7, 2026
@ymichael
ymichael merged commit 06aeaa9 into get-bb:main Sep 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants