You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ui): finish the 404-vs-unreachable sweep across the saves surfaces
Review caught three consumers that still spoke of an unreachable server on
an answered 404, and three smaller defects:
- computeSyncSummary (the Saves-tab slot header, #1560's own surface) printed
a literal "Server unreachable" off the bare server_query_failed flag. Gate
it on server_query_reason: only server_unreachable says so, otherwise "Save
status unavailable".
- CustomPlayButton's resolve-conflict toast body was left ungated inside the
branch whose store feed was already gated, so it asserted reachability on a
404. Gate the copy on the same slug.
- VersionHistoryPanel's load and restore copy claimed the game's saves are
gone. The 404 can be the device registration, not the ROM (the backend says
so in its own comment), so it now says RomM couldn't find the save data —
matching the wizard's wording.
Each of these three strings now carries a test asserting it never claims
reachability nor that the saves are absent; the two that had unpinned copy
were how the drift got in.
Also: the 404 gate's nested-try handling was the reverse of its docstring —
a nested peel leaked into the outer handler's scan and would false-positive.
Scope the dict walk to skip nested try statements (each is scanned as its own
statement) and pin both directions with tests. Move a misplaced union comment
onto the member it describes, and drop a dead duplicate mock setup.
// instead of telling the user the version is gone.
155
155
toaster.toast({title: "RomM Sync",body: "Couldn't reach RomM. Check your connection and try again."});
156
156
}elseif(result.status==="not_found"){
157
-
// Mirror of the branch above: RomM answered, so a retry cannot help
158
-
// and the toast must not send the user to check their connection.
159
-
toaster.toast({title: "RomM Sync",body: "RomM no longer has this game's saves — nothing was restored."});
157
+
// Mirror of the branch above: RomM answered, so a retry cannot help.
158
+
toaster.toast({title: "RomM Sync",body: "RomM couldn't find this game's save data — nothing was restored."});
160
159
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- exhaustive final branch of the 9-member RollbackStatus union; an explicit check (vs. plain `else`) keeps the per-status symmetry and leaves any future-added status unhandled instead of silently routing it to the "unsupported" toast
161
160
}elseif(result.status==="unsupported"){
162
161
toaster.toast({title: "RomM Sync",body: "Version history requires RomM 4.7+"});
0 commit comments