From 51216b7281d4f4b2d000ec2ae5c472bebbd3f6f3 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Wed, 20 May 2026 22:11:20 +0200 Subject: [PATCH] docs(findings): note error handler still writes status fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- FINDINGS.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/FINDINGS.md b/FINDINGS.md index 1d2eb8b..6a22365 100644 --- a/FINDINGS.md +++ b/FINDINGS.md @@ -1,6 +1,20 @@ # Findings -No open pre-merge findings are currently tracked here. +## 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