Skip to content

fix(mobile): sequenceless delivered messages stop reappearing once paged out - #18

Open
tebiggs wants to merge 1 commit into
mainfrom
fix/mobile-ack-window-fallback
Open

tebiggs wants to merge 1 commit into
mainfrom
fix/mobile-ack-window-fallback

Conversation

@tebiggs

@tebiggs tebiggs commented Oct 30, 2026

Copy link
Copy Markdown
Owner

On the phone, the first message of a long thread (sent from mobile) kept reappearing as the last bubble in the feed. The truenas-dev server holds the thread in correct order — that message is item 0 of 549 — so the stray bubble is the phone's local "acknowledged" copy, kept until the thread catches up to it. Servers that do not report the commit sequence leave only a lookup in the loaded projection as proof, and the bounded snapshot pages old messages out, so the copy resurfaced appended at the bottom. Its 1:28 PM timestamp (the server's copy says 1:31 PM) confirmed it was the local copy.

threadHasCaughtUpTo now also treats a sequenceless write that is older than the loaded window, with earlier history unloaded, as caught up. A reported sequence the thread has not reached still outranks that guess, so a message merely awaiting its echo stays visible. Both mobile readers pass the window bounds through: the feed selection in pending-thread-feed and the acknowledged cleanup in acknowledged-thread-messages. This builds on the sequence-based fix already on main; it covers the mixed-version case of a current app against an older server (truenas-dev is still on 0.1.3-nightly).

Verified: vp run check:changed passes (format, lint, knip, typecheck, tests beside the changes), plus the client-runtime thread sync/detail tests (59 passed). No before/after capture: reproducing needs an old server plus a long thread on a real phone; the regression test in pending-thread-feed.test.ts covers the ordering decision directly.

Work by muse-wonder-full-1.0 in Muse Code (T3 Code harness).

…ged out

A delivered user message stays in the acknowledged list until the thread
catches up to it. Servers that do not report the commit sequence leave
only the message search as proof, and a bounded projection pages old
messages out, so in a long thread the local copy came back appended at
the bottom of the feed.

threadHasCaughtUpTo now also treats a sequenceless write older than
the loaded window, with earlier history unloaded, as caught up. A
reported sequence the thread has not reached still outranks that
guess. Both mobile readers (the feed selection and the acknowledged
cleanup) pass the window bounds through.

Co-Authored-By: Claude <noreply@anthropic.com>
@tebiggs
tebiggs force-pushed the fix/mobile-ack-window-fallback branch from 5f64b5e to 763b26d Compare October 31, 2026 01:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant