Files
lanspread/IMPL_DECISIONS.md
T

21 lines
1.3 KiB
Markdown
Raw Normal View History

# Implementation Decisions
- Added a `just test` recipe so unit tests can be run through the repository's
required `just ...` command surface instead of invoking `cargo test`
directly.
- Kept the existing frontend `game-unpack-finished` event name for successful
transactional installs. The peer now emits install lifecycle events, but the
compatibility event still lets the UI reuse its existing "install complete"
path.
- Implemented watcher rescans by reusing the existing `.lanspread/library_index.json`
cache and updating a single game entry in that index. This satisfies the
per-ID optimized rescan requirement without adding a second cache format.
- Kept a separate `active_downloads` cancellation-token map next to the single
`active_operations` table. The operation table is the authoritative state for
gates; the token map is only cancellation plumbing for in-flight downloads.
- Treated a downloaded-but-not-installed game as immediately installable from
Tauri by sending `PeerCommand::InstallGame` directly. A not-downloaded game
still uses `GetGame`, and the peer auto-installs after the sentinel commit.
- Derived the UI's `LocalOnly` badge from `installed && !downloaded` because the
UI-facing `Game` type does not carry the protocol-level `Availability` enum.