Skip to content

Disconnecting an account leaves cached tasks on disk until next fetch #13

Description

@Phoenix-

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.OnRemoveAccountClickAccountManager.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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions