Files
lanspread/crates/lanspread-tauri-deno-ts
ddidderr 2b3851f837 fix(ui): keep peer-check state backend-driven
Downloading a game could keep showing "Checking peers" while the backend was
already transferring files. The frontend owned a five-second fallback that could
invent a no-peers error during a valid long download, then return the action to
Download until install began.

Remove that frontend timer and make the peer lifecycle authoritative instead.
The UI now treats CheckingPeers as only an optimistic click response, ignores it
if a real operation is already in progress, and switches to Downloading when the
existing game-download-pre bridge reports that peer metadata was found.

A review found one backend path that previously had no terminal event: candidate
peers existed, but every peer detail request failed before GotGameFiles. That
path now emits DownloadGameFilesFailed so the UI can leave CheckingPeers without
falling back to a frontend guess.

Test Plan:
- just fmt
- just clippy
- just test
- just build
- git diff --check

Refs: local review P2
2026-05-19 22:23:27 +02:00
..
2026-05-17 23:16:42 +02:00
2026-05-17 23:16:42 +02:00