Skip to content

Match compact composer touch actions and keep empty recording compact - #4585

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-discrepancies-in-the-compact-composer-thr_qbgqwhee67
Sep 30, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fix-discrepancies-in-the-compact-composer-thr_qbgqwhee67

Conversation

@ymichael

@ymichael ymichael commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

At phone touch widths, the compact follow-up composer used 32px actions while the new-thread composer used 40px. Both the compact action utility and an unlayered follow-up container rule forced the smaller size. Voice activity also unconditionally expanded the composer, even when there was no draft content to show. See #4584.

What changed

  • Match compact touch actions to the existing 40px new-thread sizing and remove the follow-up CSS size override.
  • Keep empty recording and transcription in the single-row composer; expand for text, attachments, or pending uploads so existing draft content remains visible.
  • Give compact recording controls the full row and hide the empty editor visually and from accessibility traversal.
  • Preserve the Stop-to-draft, Send-after-transcription, cancellation, and failure behavior introduced by merged Add one-tap Send during voice dictation #4551. No voice hooks, transport contracts, server policy, SDK, or CLI behavior changed.

How you verified

  • pnpm exec turbo run test --filter=@bb/app -- src/components/promptbox/VoiceRecordingBar.test.tsx src/components/promptbox/usePromptVoice.test.tsx src/components/promptbox/PromptBoxInternal.test.tsx src/hooks/useVoiceInput.test.tsx — 165 tests passed.
  • pnpm exec turbo run lint typecheck --filter=@bb/app — passed; lint reports existing warnings and no errors.
  • git diff --check — passed.
  • Final CI on 4c60862a20046cbbf026770453cdd1f43f6e0acb: 17 successful checks, 3 skipped, no failures or pending jobs. The skipped jobs include iOS and Android flows; no physical-device claim is made.
  • Actual source app, isolated pnpm start:worktree, seeded idle thread, Chromium 390 × 844 with touch: compact primary action and recording controls are 40 × 40px; empty recording stays 50px tall (baseline: 156px).
  • At 320px and 430px touch widths, all three 40px recording controls remain on screen and usable. Nonempty text and uploaded attachments stay visible; cancel recording preserves text, cancel transcription leaves the empty draft untouched.
  • A real Codex transcription followed by voice Send produces exactly one /send request containing the preexisting draft, transcript, and retained attachment; the agent replies compact voice send verified., and the draft clears. Stop run measures 40 × 40px.
  • Matched source-app before/after screenshots and QA details are in the originating BB thread storage, HANDOFF.md. The labeled capture fixture supplies synthesized speech to the real browser recorder; physical microphones and Safari/iOS are not verified.

Fixes #4584

AGENT GENERATED

@ymichael
ymichael merged commit c1d72f0 into main Sep 30, 2026
20 checks passed
@ymichael
ymichael deleted the bb/fix-discrepancies-in-the-compact-composer-thr_qbgqwhee67 branch September 30, 2026 21:55
ymichael added a commit that referenced this pull request Oct 1, 2026
## Human comments

## What was wrong

PR #4585 (`c1d72f0ee2`) removed the narrow follow-up composer’s fixed
width/height to allow 40px touch controls, but retained its padding
reset. The narrow follow-up composer also hides submit labels. Expanded
icon-only buttons then shrink to the glyph width while retaining their
normal height: the microphone was 16 × 40 pixels on touch screens.

## What changed

Give submit actions in the existing compact container query an automatic
width and a 1:1 aspect ratio. This preserves the existing 32px desktop
and 40px touch heights and makes the microphone, send, and stop controls
square in collapsed and expanded follow-up composers. Two CSS
declarations; no API, CLI, schema, or host-daemon protocol change.

## How you verified

- `pnpm start:worktree --dryrun` and `pnpm start:worktree` built and
launched the actual production source app at commit
`20f204214b0b12bd4333ab8da93dd5eb48f750cb`; fresh isolated data and one
idle thread fixture, no provider turn.
- Chromium touch emulation: collapsed and expanded microphone/send
buttons are 40 × 40. Restoring the prior CSS in the same source app
reproduces the expanded microphone at 16 × 40; matched screenshots are
in the originating thread storage.
- Narrow desktop follow-up: collapsed and expanded submit buttons are 32
× 32; new-thread microphone/send controls retain 32px desktop and 40px
touch sizing, with empty and typed drafts.
- iOS 26.5 Simulator Safari on iPhone 17 Pro: collapsed follow-up
microphone visibly square. Expanded Safari and recording/transcription
are not covered; no simulator input driver is available. Touch emulation
is distinct from the Safari screenshot.
- Final-head CI passed, including all three app shards. App-3 initially
failed a sidebar hide-menu assertion at `NavigationPlugin.test.tsx:557`;
all 51 tests in that file passed locally, and rerunning only that CI job
passed. No test or sidebar change was needed.
- `pnpm exec turbo run lint --filter=@bb/app`: passed, with existing
warnings and zero errors. `pnpm exec oxfmt --check apps/app/src/app.css`
and `git diff --check`: passed.

> AGENT GENERATED
brsbl added a commit that referenced this pull request Oct 1, 2026
## Human comments

## What was wrong

On phones, the follow-up composer's action button squeezed to 16px wide
once the composer expanded: the mic when the draft is empty, Send once
text is typed, and Stop while a run is active. A compact-container rule
in `app.css` sets `padding: 0` on `[data-promptbox-submit-action]`. It
used to sit next to `width: 2rem; height: 2rem`, which #4585 removed.
The expanded variants size themselves with horizontal padding (`px-2` /
coarse `px-3`) rather than a fixed width, so with the padding zeroed
they collapse to the 16px icon. The collapsed variants set `p-0` and a
fixed size themselves and never needed the rule.

## What changed

- `apps/app/src/app.css`: drop `padding: 0` from the compact
`[data-follow-up-composer] [data-promptbox-submit-action]` rule and keep
`margin-left: 0`.
- With this change, expanded phone actions are 40×40 again, matching the
collapsed composer. Desktop and the new-thread composer are unchanged.

## How you verified

- Dev web app in headless Chrome for Testing (BB Browser Automation),
390×844 at 2×, touch emulation. Before is `main` at `2573ad5e8`; after
is this branch at `39097d801`.
- Measured the expanded composer's action button: mic 16×40 → 40×40,
Send 16×40 → 40×40, Stop 16×40 → 40×40.
- The Stop pair was captured during two separate runs, so the timelines
differ; the composer state is the same.

| State | Before | After |
| --- | --- | --- |
| Expanded, empty draft (mic) | ![Before: mic squeezed to
16px](https://github.com/user-attachments/assets/a91cfe28-d725-4fc8-ab0b-d269d0674c29)
| ![After: mic
40×40](https://github.com/user-attachments/assets/e7dffc62-2772-40a5-a9a6-42c826d7587c)
|
| Expanded, with text (Send) | ![Before: Send squeezed to
16px](https://github.com/user-attachments/assets/5a5922d6-270d-4992-9081-4ef05f6ef1da)
| ![After: Send
40×40](https://github.com/user-attachments/assets/8f0c8865-434d-4ab3-b3c1-8e95f365edd2)
|
| Expanded, run active (Stop) | ![Before: Stop squeezed to
16px](https://github.com/user-attachments/assets/5a9f9f90-98c4-4d92-8863-b286966c6539)
| ![After: Stop
40×40](https://github.com/user-attachments/assets/8ec06fec-ca2c-471c-a4af-abcacd5d9edc)
|

BB-Thread-ID: thr_nefp8h4g4r

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

Compact composer shrinks touch actions and expands empty voice input

1 participant