Files
buzz/mobile/test/features
Tom Brow 9f88eb9c45 mobile: hide self-joins and leaves, collapse membership runs like desktop (#8962)
Busy channels fill the mobile timeline with page after page of small "X
joined the channel along with Y and N others" and "X added Y to the
channel" rows. Desktop now hides most of that
([buzz-app#2258](https://github.com/block/buzz-app/pull/2258)). This
brings mobile's membership notices in line with desktop's current rules
(`membershipRows` / `membershipDescription` in buzz-app
`src/features/messages/membership-rows.ts`).

### Behavior

- **Only explicit changes show.** Self-joins and voluntary leaves are
hidden. That covers both relay leave shapes: a normal Leave (kind 9022,
actor only) and removing yourself (kind 9001, with a target). Additions
by someone else and removals still show.
- **One row per run.** Each uninterrupted run of additions and removals
becomes one row, whatever the elapsed time, local day or actor. Messages
and other channel events (topic, archive, huddles) still split runs.
- **Each person appears once**, under their latest change in the run.
- **Wording:**
- One adder: "Alice added Bob, Carol and N others to the channel. See
all" (unchanged)
  - One remover: "Alice removed Bob ... from the channel" (unchanged)
- Several adders: "Bob, Carol and N others were added to the channel".
It no longer says they "joined".
- Additions and removals together, or several removers: "Bob and 4
others were added · Dan was removed". Each "N others" opens that list.

Mobile keeps its "See all" sheet in place of desktop's hover popover.

### Validation

- Added tests:
  - unit tests for hiding self-joins and both leave shapes
  - grouping across hours, days and actors
  - runs split by messages and other channel events
- a channel page journey with a self-join, a 9022 leave, a 9001 leave,
additions by two people hours apart and a removal: it renders one mixed
row, and the "1 other" sheet works
  - a several-adders wording test
- Updated tests that previously relied on visible self-joins or leaves.
- Full mobile suite (`just mobile-test`) and `flutter analyze` pass.
- Automated full-app run on an iPhone 17 Pro simulator, signed in to a
hosted community:
- The home list and a 33-member channel with membership history load.
Self-joins are gone, messages flow without them, and a two-adder run
reads "X and Y were added to the channel".
- Scrolling back through history and opening and closing a thread work.
  - Captures are not attached because they show internal names.
- Limitation: the internal community now rejects the simulator's
websocket without hosted sign-in, so the 1,500-member channel wasn't
re-checked on this head.
- Human testing is waived per the owner's standing policy.

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

---------

Signed-off-by: Tom Brow <tomb@squareup.com>
Co-authored-by: Tom Brow <tomb@squareup.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
2026-11-03 15:50:33 -08:00
..