Challenge 3: Optimistic vs. Confirmed Messages
The user sends a message. It appears immediately. Then a poll returns the same message (with real GUID). The transition from optimistic to confirmed must be seamless — no flicker, no duplicate, no layout jump.
Open question: How to match optimistic messages with confirmed ones? By text content + timestamp proximity? By a client-generated temp GUID that the relay could echo back?
Challenge 4: Multi-Chat Unread State
If the user is in Chat A and Chat B receives a message, the chat list needs to show an unread indicator. But the chat list is only visible when the user navigates back. Should the unread state update in real time even while in a chat?
Decision needed: Yes, but only the config file is updated in the background. The visual unread indicator only appears when the user returns to the chat list.