When an account is disconnected, its cached tasks are not removed from disk immediately — only from memory. The on-disk task snapshot is rewritten without that account on the next successful fetch, so the data lingers until then (and if no fetch happens, it persists).
Where
MainWindow.OnRemoveAccountClick → AccountManager.RemoveAccountAsync (revokes + deletes tokens) then MainViewModel.InvalidateAccountAndRefresh.
CalendarCache.InvalidateAccount and CalendarListCache.InvalidateAccount do delete on-disk state immediately (_store.Delete(...)).
TaskCache.InvalidateAccount (Services/TaskCache.cs ~L66) only does _tasksByAccount.Remove(account.Email) in memory; the disk blob is "rewritten without that account on the next successful fetch."
Why it matters
- Inconsistent with events/calendar-list, which purge from disk on disconnect.
- Privacy: tokens are revoked + deleted but the user's task text/titles remain in
%APPDATA%\Meridian until a later fetch. The privacy policy says disconnect removes cached data — currently true-ish but not immediate for tasks.
Fix
- On
TaskCache.InvalidateAccount, also delete/rewrite the on-disk task snapshot for that account immediately (mirror the events cache behavior), not lazily on next fetch.
Notes
When an account is disconnected, its cached tasks are not removed from disk immediately — only from memory. The on-disk task snapshot is rewritten without that account on the next successful fetch, so the data lingers until then (and if no fetch happens, it persists).
Where
MainWindow.OnRemoveAccountClick→AccountManager.RemoveAccountAsync(revokes + deletes tokens) thenMainViewModel.InvalidateAccountAndRefresh.CalendarCache.InvalidateAccountandCalendarListCache.InvalidateAccountdo delete on-disk state immediately (_store.Delete(...)).TaskCache.InvalidateAccount(Services/TaskCache.cs ~L66) only does_tasksByAccount.Remove(account.Email)in memory; the disk blob is "rewritten without that account on the next successful fetch."Why it matters
%APPDATA%\Meridianuntil a later fetch. The privacy policy says disconnect removes cached data — currently true-ish but not immediate for tasks.Fix
TaskCache.InvalidateAccount, also delete/rewrite the on-disk task snapshot for that account immediately (mirror the events cache behavior), not lazily on next fetch.Notes