Files
buzz/mobile/lib/features
Tom Brow e34acb0ac5 fix(mobile): keep reply counts on screen while a reconnect catches up (#9100)
Every time the app comes back from the background, the "N replies" links
under messages in an open channel vanish and reappear a moment later. On
an iPhone 12 mini in a busy channel this happened on nearly every
resume, since the session drops its socket five seconds into the
background and the channel reconnects.

A reconnect discards the channel window and refetches its newest page.
Until that page lands, thread summaries came only from replies already
loaded, which in a windowed channel is usually none. The discarded
window's summaries now stand, below every fresher source (live
summaries, thread queries, overflow floors), until the replacement
history lands, which then decides, including dropping a summary the
relay no longer reports.

### Validation

- Added `reply counts stay on screen while a reconnect catches up`,
which fails when the retained summaries are left out.
- `flutter analyze` is clean and the full mobile suite passes.
- iPhone 12 mini, Profile build, a 2,000-member channel backgrounded 12
s and resumed (same scenario, one run each). Before: the "6 replies"
link vanished for about a second and the timeline shifted up, then back.
After: the link and the scroll position stay put through the catch-up.
- Automated app run on the same phone with this change: Home, search,
the large channel and its resume after the reconnect grace period.

### Accepted gap

If you had scrolled back past the first page, those older rows still
lose their reply counts once the reconnect catch-up finishes, as they do
on main today. Their counts return when pagination refetches their page
or the channel is reopened.

🤖 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: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
2026-11-05 11:14:52 -08:00
..