Files
buzz/mobile/test/shared
Matt Toohey 9152e91fe3 fix(mobile): make picked mentions atomic chips bound to their recipient
Picked people (channel members and directory results) now render as
atomic composer chips like agents already did, and the recipient a send
notifies comes from the same occurrence scan that draws the chips.

- Backspace right after a chip removes the trailing space first and the
  whole chip second, for people and agents alike; Left and Right step
  over a chip as one unit. The agent chip previously broke into plain
  `@Scou` on the second Backspace because an undo heuristic mistook any
  Backspace landing on earlier typed text for Undo. Undo and Redo are
  now detected explicitly through an `Actions` override of
  `UndoTextIntent`/`RedoTextIntent` around the field, so the editing
  formatter leaves restored values exact and widens real deletions.
- `mentionOccurrences` opens a mention after `(`, `[` and `{` as the
  query trigger already did, so `see (@Bob` picked after a bracket
  notifies Bob, and the typed exact-member fallback accepts the same
  brackets. Draft pruning, rendering and send resolution share it.
- Deleting or editing a chip removes its recipient; text left behind
  notifies nobody. Typed, unpicked names keep their existing behaviour,
  visible draft text stays `@Label`, and qualified namesake labels still
  render as coloured text.
- Person chips use key `composer-person-mention-chip` with semantics
  `Mention: <name>` and an `@` prefix; agent chips keep their key, bot
  icon and `Agent mention:` semantics. Chip widgets, the editing
  formatter and the history action move to `composer_chips.dart`.

Tests: a compose bar journey covers person chip insertion, two-Backspace
removal of person and agent chips, arrow stepping, chip deletion sending
no recipient, bracket-prefixed picks and space-selected names notifying,
and the typed fallback after a bracket; `mention_bindings_test` gains
bracket rows. `flutter analyze`, `dart format` and the full mobile
`flutter test` suite pass.

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