Related
- ADR-0071 (Cache-first path:
FORCE_EMAIL_QUERY = false)
Description
Pass collapseThreads: true on the cache-first path (getAllEmail()) when thread mode is enabled. Handle cache inconsistency when user toggles thread ON/OFF by clearing the email cache on toggle.
Problem
The local DB reflects whichever collapseThreads mode it was built under:
- OFF to ON: cache has individual emails, server returns collapsed — stale first yield
- ON to OFF: cache has collapsed emails, server returns all — missing emails in first yield
Tasks
Acceptance Criteria
- Cache-first path returns collapsed emails when thread is enabled
- Toggle OFF to ON: cache is cleared, reloads with collapsed data
- Toggle ON to OFF: cache is cleared, reloads with individual emails
- No stale data displayed after toggling