Files
buzz/mobile/test/features/channels/compose_bar_test
Matt Toohey e008151c6c fix(mobile): close the mention chooser while the composer has no focus
With the chooser open for `@bo`, dragging the keyboard away collapsed
the composer to one line but left the chooser row floating above it
(scenario 09). The chooser now follows the field's focus, as buzz-app's
does (recommendation 8): it hides whenever the text field loses focus,
through the keyboard-dismiss drag, the Android back key, a tap elsewhere
or Shift+Tab traversal, and comes back when focus returns.

The draft, the live query and its rows are untouched while hidden. The
composer keeps watching the same candidate and search providers, so a
return to the field shows the same rows in the same order without a new
directory search, and a search that was running finishes into the hidden
rows. The `#channel` chooser lives in the same panel and follows focus
the same way. Hardware Tab and Enter accept a row only while the panel
is shown. A tap on a chooser row is a touch outside the field, which
takes no focus on mobile, so a row still inserts its pick, the search
retry still runs, and the outside-channel prompt is unchanged. The edit
sheet is unchanged.

The composer widget had passed the mobile file-size ceiling, so the
expansion spring and the iOS clipboard probe move to `helpers.dart` as
`_useComposerExpansionMotion` and `_useComposerClipboardImage`.

Tests: the search journey opens `@bo`, unfocuses the field and sees the
chooser gone with the draft and caret kept, refocuses and sees Bob then
Bobby again with no new search, taps Bob with focus kept and sends him
tagged, then checks `#cur` the same way; the Shift+Tab test now expects
the chooser to leave with focus and return with the query. The journey
fails when the focus gate is removed. `dart format`, `flutter analyze`,
`just file-size-check` and the full mobile `flutter test` suite pass;
one run hit the known community snapshot timing flake, which passes
solo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
2026-11-19 15:07:14 +11:00
..