Problem Description
Currently, vimstoat only caches User objects in the local cache.db (CacheStore). Message history is not cached anywhere on disk:
- Opening a DM channel triggers a fresh network call to fetch up to 50 messages via
fetch_message_history.
- Loaded messages and live WebSocket message events (new messages, edits, deletes) are stored solely in memory in
app.store.current_dm_messages: Vec<Message>.
- Navigating between channels or restarting the app discards message history, requiring full re-fetching over the network each time.
Proposed Solution
- Persist messages locally (e.g. keyed by
channel_id + message ID or in an indexed structure per channel in CacheStore).
- Hydrate channel messages instantly from local cache when entering a channel.
- Fetch newer/missing messages from the API to sync and update the cache.
- Ensure WebSocket updates (edits, deletions) write through or invalidate the cache accordingly.
Problem Description
Currently,
vimstoatonly cachesUserobjects in the localcache.db(CacheStore). Message history is not cached anywhere on disk:fetch_message_history.app.store.current_dm_messages: Vec<Message>.Proposed Solution
channel_id+ message ID or in an indexed structure per channel inCacheStore).