Files
buzz/mobile/test
Tom Brow ef2aa1ae38 fix(mobile): preserve thread replies through refresh failures (#7757)
## Summary

A failed mobile thread refresh could briefly remove replies and show “0
replies” even though Riverpod still retained the previous result. Read
the retained reply value directly and merge it with pending local
replies through errors and retries. When a reopened thread has no
retained result, show loading or failure instead of a false zero count.
Error status remains visible alongside retained replies.

No additional cache or retention is introduced. Current main
intentionally disposes thread queries on close; reopening still fetches
fresh data. The recorded symptom is reproduced by the failed-refresh
test, but the recording alone does not establish its network trigger.

### Related issue

Related to #4831 (thread refresh and disposal behavior), incorporated
into main through #6691. No duplicate for this rendering defect found.

### Testing

- Reproduced disappearing cached replies in widget tests before the fix;
the new retry/recovery, terminal-error, reopen/loading, initial-error,
and empty-result tests now pass.
- Provider coverage verifies cached and pending local replies survive a
failed refresh and confirmation still clears the local overlay.
- All five new widget regressions, the existing
hydration/scroll-position regression, all nine thread-provider tests,
Flutter analysis, and the final-head full mobile pre-push gate passed
(2,261 tests passed; four skipped).
- Phone-width and large-text rendering checked with synthetic messages.
[Before/after
screenshots](https://github.com/block/buzz/pull/7757#issuecomment-5743469556).
- All final-head GitHub checks passed, including mobile tests, Android
debug APK, iOS simulator app, and unsigned iOS release builds.
- Codex code review and security review are clean for `4e5f606ae`; the
earlier accessibility finding is fixed and resolved. Builderbot review
was requested but has not returned a result.
- Broad local `just ci` could not finish: unchanged ACP timing tests
failed, including `keepalive_resets_idle_past_deadline` on the
lower-concurrency retry. The separate ACP run passed all 941 tests.
Initial parallel mobile runs also hit timing flakes; the final-head full
mobile gate passed. No unrelated native code was changed.

---------

Signed-off-by: Tom Brow <tomb@block.xyz>
2026-09-19 11:00:47 -07:00
..
2026-06-10 13:38:11 -07:00