Commit Graph

18 Commits

Author SHA1 Message Date
ddidderr 6c8a2bb9f0 feat(peer): add transactional local game operations
Implement the peer-owned state model from PLAN.md. A root-level version.ini
is now the download completion sentinel, local/ as a directory is the install
predicate, and exact root-level version.ini detection prevents nested files
from becoming sentinels by accident.

Add the peer operation table that gates downloads, installs, updates, and
uninstalls by game ID. Serving paths now reject non-catalog games, active
operations, missing sentinels, and any request that points under local/.
Remote aggregation treats LocalOnly peers as non-downloadable so they do not
contribute peer counts, candidate source selection, or latest-version checks.

Move install-side filesystem mutation into lanspread-peer::install. The new
module writes atomic .lanspread.json intents, uses .local.installing and
.local.backup with .lanspread_owned markers, and performs startup recovery
from recorded intent plus filesystem state. Downloads now buffer version.ini
chunks in memory and commit the sentinel last through .version.ini.tmp.

Replace the fixed 15-second monitor with notify-backed non-recursive watches,
per-ID rescan gating, and a 300-second fallback scan. The optimized rescan
path updates one cached library-index entry and active operation IDs preserve
their previous summary during scans.

Test Plan:
- just fmt
- just clippy
- just test
- just build

Refs: PLAN.md
2026-05-15 18:18:55 +02:00
ddidderr b53f249512 minor clippy 2025-11-14 09:05:53 +01:00
ddidderr 833c8afedf game thumbnails 2025-11-14 09:03:05 +01:00
ddidderr a1dfc5cc89 wip 2025-11-13 23:42:12 +01:00
ddidderr 8fe68f9574 wip 2025-11-13 21:43:20 +01:00
ddidderr 2d7f7513ad peer count for all games 2025-11-13 19:38:21 +01:00
ddidderr bca85fbdc1 always a size 2025-11-12 22:11:29 +01:00
ddidderr 936111e3c6 Refine peer networking and chunked file transfers 2025-11-11 20:56:03 +01:00
ddidderr 6845a7d6fe wip 2025-11-08 17:27:01 +01:00
ddidderr 98126a72da [clippy] fixes 2025-08-12 08:44:59 +02:00
ddidderr 765447e6d1 [code][fix] improvements for LAN 202503
- more robust client <-> server connection
  - new client event: DownloadGameFilesFailed
  - 3 seconds to reconnect
  - retry forever if server is gone and never lose a UI request

- code cleanup here and there (mostly server)
2025-03-20 19:39:32 +01:00
ddidderr adf6f9d757 [code] improve structure (focus: server) 2025-03-02 13:06:18 +01:00
ddidderr 2b64d1e4ba [client][server] file transfer working, ui not ready for it 2024-11-14 23:26:31 +01:00
ddidderr 942eb8003e [improve] set game dir on client -> updates Play/Install button based on games existing 2024-11-14 19:41:55 +01:00
ddidderr a6ed6e04fe [backup] games from server with images 2024-11-13 23:51:28 +01:00
ddidderr 1388bc2115 [feat] use eti game.db, commit not working, something is wrong with game.id in the client/frontend 2024-11-12 22:12:49 +01:00
ddidderr 89af1f9176 [omg] GUI, mDNS, list games on client start 2024-11-10 15:11:22 +01:00
ddidderr 9d8f579a0f [feat][code] proto crate, one stream per request 2024-11-08 22:22:50 +01:00