Skip to content

Add persistent save/resume for in-progress puzzle sessions #26

Description

@Mkalbani

Description

Currently a puzzle session is lost if the player quits mid-session (whether via TUI or future WASM/web frontend). Add a persistence layer so a session can be serialized to disk (native) or localStorage (WASM) and resumed later with the same puzzle state, elapsed time, hint count, and score-in-progress.

Acceptance Criteria

  • Session struct derives Serialize/Deserialize (serde)
  • save_session(path: &Path) and load_session(path: &Path) added to the persistence module
  • Autosave triggers on answer submission and on hint reveal
  • --resume <session_id> CLI flag loads the last saved session
  • Corrupted or version-mismatched save files fail gracefully with a clear error, not a panic
  • Unit tests cover save/load round-trip for at least 3 puzzle types

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions