Files
buzz/mobile/lib/features
Tom Brow 76bc66acfc mobile: hold a queued list read for the 10s gap (#8958)
## Summary

Follow-up to [#8910](https://github.com/block/buzz/pull/8910) for the
two optional notes from its review:

- **A queued list read now waits out the 10s gap**
([note](https://github.com/block/buzz/pull/8910#discussion_r4447689472)).
If a change comes due while a slow read is still running, the read is
queued. When the slow read finished, the queued one used to start right
away, even if the gap after the previous read hadn't passed. That broke
the "reads start at least 10s apart" rule: a read could start 9s after
the one before. The queue now drains through `_readListIfChanged`, which
holds the read until the gap ends. If the finished read already covered
the change, nothing is read.
- **A test for a partly failed unread catch-up**
([note](https://github.com/block/buzz/pull/8910#discussion_r4447689485)).
Previously, deleting the line that retries a catch-up when only some
channels' fallback reads failed left the suite passing.

### Related issue

N/A. Follow-up to [#8910](https://github.com/block/buzz/pull/8910).

### Testing

- New step in the open-list journey: the relay answers each of a read's
two queries in 7s. A change that comes due while that read runs is read
once, after the gap, not as soon as the slow read ends. Restoring the
old drain fails the step.
- New step in the resume journey: after a reconnect, the batched
catch-up fails over to per-channel reads, and one channel's read is
refused. That channel turns unread on the retry, and nothing more is
read over the next 10 minutes. Removing the partial-failure retry fails
the step.
- `FakeRelay.holdQuery()` holds HTTP queries, so a test can make a read
slow.
- The full mobile suite passes, and `dart format` and `flutter analyze`
are clean.
- This is a timing-only change to background list reads, with no UI
change. The journeys above drive the real notifiers against a fake
relay. I did no device run.

🤖 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>
2026-11-03 07:01:07 -08:00
..