mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 02:22:44 +01:00
`scan_platforms` ends in four places, and three of them had to remember to flush the counters a coalesced increment held back. The fourth, the early return on a folder structure it cannot read, did not, and was correct only because it sits above the first report. `finish` pairs the flush with the emit so every exit gets both, including that one. The failure path's guard around the flush goes with it. It was protecting against an emit that fails, one line above an emit that would fail the same way and is not protected, and `update_job_meta` already swallows its own errors, so it bought nothing. Also: `refetchCurrentRom` wrote `currentRom` twice, once directly and again through `syncCachedRom`, which owns that write and applies the same identity guard. `useRomScanRefresh` kept an `alive` check that `useSocketEvent`'s unsubscribe already covers; its test was passing on the check rather than the unsubscribe, so the socket mock now actually unsubscribes. DeleteManualDialog was the tenth surface still spelling out the refetch by hand, and seven components kept a rom store binding nothing reads any more. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>