While reviewing the download progress bar feature we noticed that
`handleErrorEvent` in `crates/lanspread-tauri-deno-ts/src/hooks/useGames.ts`
still writes `install_status`, `status_message`, `status_level`, and now also
`download_progress` directly from a lifecycle event handler.
This is the same "two sources of truth" pattern that commit `5df82aa`
("fix(ui): derive operation status from snapshots") removed everywhere else.
That commit explicitly carved out error messages as a preserved side effect,
so this is a documented exception rather than a regression — but if we want
strict snapshot-is-truth, the error handler should stop writing status fields
and let the next snapshot reconcile the card, keeping only the error message
overlay (which the snapshot does not carry).
Captured in `FINDINGS.md` under a new "Open" section so a future cleanup pass
can pick it up. Not blocking the progress bar work.
Refs: 5df82aa (fix(ui): derive operation status from snapshots)
1.8 KiB
Findings
Open
handleErrorEvent still writes status fields directly
crates/lanspread-tauri-deno-ts/src/hooks/useGames.ts:80-89 — the error
handler writes install_status, status_message, status_level, and
download_progress from a lifecycle event, which is the same "two sources of
truth" pattern that commit 5df82aa ("fix(ui): derive operation status from
snapshots") removed everywhere else. That commit explicitly carved out error
messages as a preserved side effect, so this is a documented exception rather
than a regression — but if we want strict snapshot-is-truth, the error handler
should stop writing status fields and let the next snapshot reconcile the card,
keeping only the error message overlay (which the snapshot does not carry).
Not blocking. Captured here for a future cleanup pass.
Claude Review Scope Triage
No out-of-scope code smells or issues were identified in Claude's review. All four points were direct follow-up cleanup for the current protocol change and were handled in code.
The previous three findings have landed in code and tests:
update_gamenow usesPeerCommand::FetchLatestFromPeersto skip local manifest serving and fetch fresh peer metadata. Covered byupdate_fetch_emits_fresh_manifest_from_latest_peerandupdate_request_skips_local_manifest_even_when_download_exists.- Download-to-install handoff no longer relies on
OperationGuard::Dropfor ordered state transitions. Covered bydownload_handoff_waits_for_readers_and_auto_installsand the liveness cancellation tests. - Library index reads and writes are serialized by
LIBRARY_INDEX_LOCK. Covered byconcurrent_rescans_preserve_both_index_updates.
Manual install/update/uninstall smoke testing is still a useful release check, but there are no known blocking findings left in this file.