Skip to content

[HT-64]: Game history storage foundation — file persistence channel #112

Description

@Maiz27

Parent

PRD-05: Game History & Replay — #111

What to build

Add a file-based local storage capability so the game can persist heavy per-match replay data outside the small key-value preferences store. The app currently has no file I/O — local storage is a key-value method channel backed by platform preferences — so this is net-new platform surface.

Extend the existing local_storage platform channel (rather than adding a new file-path dependency) with file write / read / delete / list operations against a no-backup location, and a flag that marks written files excluded from iCloud backup on iOS (and the equivalent no-backup directory on Android). Expose a small Flutter-side file-store abstraction over the channel. The throwaway web build, which has no filesystem, falls back to browser storage behind the same abstraction.

This slice is the enabling foundation for recording matches; it is verifiable on its own via a round-trip (write → read → list → delete) through the real channel.

Acceptance criteria

  • A Flutter-side file-store interface exposes write, read, delete, and list operations and is backed by the platform channel on Android/iOS and by browser storage on web.
  • Written files live in a no-backup location and are marked excluded from cloud backup on iOS; the Android equivalent no-backup directory is used.
  • A value written through the store can be read back identically, listed, and deleted, on device.
  • Reading a missing key returns a clean "absent" result rather than throwing.
  • The abstraction stays consistent with the app's hand-rolled, no-extra-dependency storage approach (no new database/file-path package added).
  • Unit tests cover the store's round-trip, list, delete, and missing-key behavior against a fake backend.

Blocked by

  • None — can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✅ readyWell-scoped, unblocked, and ready for implementation or review work to begin.💾 persistenceLocal storage for settings, preferences, match state, resume, or history.🔹 p2Normal-priority work that matters but does not block the immediate critical path.🚦 ciGitHub Actions, analysis/test automation, build checks, release checks, or toolchain health.🧩 featureA vertical slice that delivers user-visible behavior or playable product capability.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions