mirror of
https://github.com/block/buzz.git
synced 2026-11-24 02:02:07 +00:00
## Summary The mobile composer ignored Tab and Enter from hardware keyboards. Tab and Enter now accept the first selectable mention or channel suggestion while its picker is visible. Otherwise Enter or numpad Enter sends the message when attachment controls are closed. Enter leaves the draft untouched while an attachment surface is open. Tab leaves the draft unchanged while the picker is hidden or the field is read-only. A visible picker with no selectable row consumes Tab and Enter without sending. Only unmodified Tab accepts suggestions. Native attachment and emoji pickers own keyboard input until dismissal. Keyboard suggestion acceptance and sending use the same selection haptic as touch. Modified Enter and active IME composition retain normal text-field handling. Android IMEs can emit Enter as a key event too. Sending requires a mapped physical Enter key on Android, so scan-code-free IME Enter keeps newline handling. ### Related issue None found. ### Testing The composer widget regressions reproduce ignored Tab/Enter before the feature and an unintended send from Android IME Enter before its guard. The picker regressions cover Enter accepting a visible suggestion, Enter and numpad Enter retaining an Android draft while the attachment menu is open, and Tab leaving hidden or read-only suggestions untouched. They verify suggestion acceptance, error-only picker handling, native attachment popover ownership, modified Tab, sending, software Return and Android physical-key handling. Rapid Enter while member scanning is pending sends only once through the existing draft revision guard. Native validation and screenshots use an isolated Android API 28 ComposeBar harness at `09fb673f9`, with an observed send callback and a test-only native key injector. Physical Enter sends once and clears the draft; IME Enter inserts a newline without sending. Native validation of picker acceptance, visibility and read-only handling remains outstanding. ### Screenshots | Physical Enter sends and clears the draft | IME Enter keeps a newline without sending | | --- | --- | |  |  | | Mention suggestions | Tab accepts the suggestion | | --- | --- | |  |  | --------- Signed-off-by: John Tennant <jtennant@squareup.com> Signed-off-by: Tom Brow <tomb@squareup.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Oliver <e78152627ea32fbacb070e5047afcfb8e409fa3343d9e618227baacca5b5e607@buzz.block.builderlab.xyz> Co-authored-by: Tom Brow <tomb@squareup.com> Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>