Skip to content

fix(android): correct chat timeline ordering, catch-up missed messages, and preserve draft tombstone - #408

Open
Liis17 wants to merge 14 commits into
nightlyfrom
t3/3aabe4d5
Open

Liis17 wants to merge 14 commits into
nightlyfrom
t3/3aabe4d5

Conversation

@Liis17

@Liis17 Liis17 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes four defects in the regular-chat timeline, catch-up flow, and draft state on Android:

  • Confirmed messages now sort chronologically by sentAt with nanosecond precision instead of being appended in sender order, eliminating out-of-order rows.
  • After returning to an active chat, missed messages are always fetched from the server, not an incomplete tail from cache; capped at 10 pages of 30 messages per miss, with remaining history loaded on scroll-down.
  • A server-revised sent draft no longer loses its tombstone after restart; the client re-reads the server draft and overwrites local state only when the local draft is matching, blank, or strictly newer.
  • Chat list display cache (title/avatar/other-user id) is now populated on initial load and saveDisplay() is actually invoked, eliminating redundant per-chat user() lookups on every list refresh.

Testing

  • Full testNightlyDebugUnitTest suite passed (exit 0); new tests added for chronological insertion, catch-up page cap, draft tombstone, and cached display resolution.
  • Diff covers 11 files (~950 insertions, ~113 deletions) across ChatViewModel, ChatsViewModel, ChatCacheRepository, RegularChatSession, ChatDraftRepository, SearchChatsGateway, and 4 new test files.
  • Device runtime checks on Pixel required to confirm realtime catch-up and display cache behaviour; run after the device is authorized (see remaining risks).
  • Docs in Obsidian/ClaudeVault/Clients/Android.md updated to document timeline order, catch-up, draft conflicts, and chat display cache.
  • Remaining risks: stale avatar from cache after peer deletion; incomplete tail cache defect left in normal scroll-down only.

Liis17 added 14 commits October 24, 2026 16:42
- defer reconnect until network changes via networkEpoch
- use idle-based recreation and stable stream detection
- jittered backoff to avoid thundering herd
- add HTTP/2 keepalive settings
- new ReconnectPolicyTest
…reams, parallel TLS preflight, drop temp logs
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