Switchbordswitchbord
v0.18.98

v0.18.98 — inbox thread cache staleness fix

Prevents selected inbox chats from showing stale or missing recent messages after switching between conversations.

Fixed


  • Inbox thread freshness. Selected chat threads now treat IndexedDB/Dexie as a warm-history source only when it belongs to the current conversation, then overlay realtime/React-state rows so newly arrived inbound messages and optimistic outbound sends cannot be hidden by an older cache snapshot.
  • Conversation switching. The live-cache hook now resets by scope immediately on conversation changes, preventing a one-render flash where the previous conversation's cached messages could appear under the new selection.
  • Freshness catch-up. The selected-thread sync path no longer skips /messages delta catch-up when the conversation envelope says a newer message exists than the cache watermark.

Tests


  • Adds regression coverage for stale cache plus newer React rows, optimistic sends with cache enabled, previous-conversation cache rows during rapid switching, and the freshness-gate bypass.