Skip to content

fix: catch up chat messages missed while the event stream was down#419

Open
raulriera wants to merge 1 commit into
mainfrom
fix/chat-reconnect-gap
Open

fix: catch up chat messages missed while the event stream was down#419
raulriera wants to merge 1 commit into
mainfrom
fix/chat-reconnect-gap

Conversation

@raulriera

Copy link
Copy Markdown
Collaborator

While you sit in a chat, new messages from the other person sometimes stopped appearing. The live message connection can't replay anything it missed, so whenever it briefly dropped — a network blip, switching between Wi-Fi and cellular, or coming back from the background — every message that arrived during the gap was silently lost until you left and reopened the chat. The app now notices when the connection comes back and refetches the conversation list plus the open chat to fill in whatever it missed, while skipping that work on the very first connection so there's no wasted fetch on open.

Test plan

  • Sit in a chat, briefly drop the network, then have the other person send a message — it appears once the connection recovers.
  • Background the app while a chat is open, receive messages, then reopen the app — the missed messages are there.
  • Open a chat normally and confirm the initial load isn't followed by a redundant refresh.
  • Log out and back in within the same session — the chat list loads normally with no errors.

The DM event stream is a cursorless live push and the server never replays, so messages delivered while it was dropped were silently lost until the user left and re-entered the chat. EventStreamer now surfaces its connection state; ConversationController treats the first live connection as the baseline and refetches the feed plus the open transcript on each reconnect after.
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