Skip to content

Mobile: wire CacheStore.clearAll() into a sign-out flow #13

Open

Description

@alex-mextner

What

Why (motivation)

The offline cache work added a persistent, on-disk CacheStore (SwiftDataCacheStore) with a clearAll() primitive, but nothing calls it yet. The app has no explicit sign-out button today (SettingsView only lets you overwrite or clear the token fields), so wiring this needs a small UX decision about what counts as signing out - that decision belongs to the auth and Settings feature, not to the cache-layer ticket, so clearAll() was deliberately shipped as a primitive without a caller.

User impact

Without this, a user's private repository names, issue and pull request bodies, and ticket content persist on disk after they clear their token, and would be served via the offline fallback to whoever signs in next on a shared device.

Cost of inaction

Cached private data silently outlives the credential that fetched it - a real privacy leak on a shared or resold device.

Acceptance criteria

  • Clearing or removing a GitHub or Linear credential (manual token or OAuth) in Settings calls cache.clearAll(), so no private data from the previous account survives in the on-disk SwiftData cache file.
  • A test exercises the full cycle: load data with account A, sign out, assert the cache is empty, sign in with account B, assert no account-A data appears anywhere in the UI-facing store.

Screenshots

(none)

Links

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions