Skip to content

Cloud save status for each game from this PC alone, and a save-sync event - #289

Merged
elripalda merged 4 commits into
elripalda:mainfrom
Xarishark:feat/game-save-sync-status-a2bdc4
Nov 18, 2026
Merged

elripalda merged 4 commits into
elripalda:mainfrom
Xarishark:feat/game-save-sync-status-a2bdc4

Conversation

@Xarishark

Copy link
Copy Markdown
Collaborator

What this changes

The backend for a cloud save status on each game's page (the badge itself comes in a follow-up PR). Today the only way to see whether a save reached the cloud is the Saves tab, and that asks the website every time. Some things aren't remembered at all: a conflict is only a toast, and a copy too big to send is only a toast.

Each game's saves/<id>/state.json on this PC now also keeps:

  • when this PC and the cloud last agreed, and when and on which PC that save was made (synced_at, synced_made, synced_device);
  • a conflict, until the player picks a save (conflict);
  • why the last sync didn't go through, until one does (problem: offline, full, paused, too-big-copy, too-big-folder or error).

Older state files read as before, with the new fields empty.

New:

  • saves_status(id): one game's status from this PC alone, never asking the website. state is one word: signed-out, off, conflict, problem, waiting, none or up-to-date. With it come the sync time and PC, the copies waiting, the next retry and the problem. It's in SAVE_CMDS in games.js, so a game of a recomp with several asks with its own id.
  • A save-sync event {id, phase}: check, up or down while a check, upload or download runs, then idle on every way out of it. Before, the window only heard about saves once a new local copy was made, so background retries and restores were silent.
  • saves_overview gives each game the same state, for the Saves page.

Fixed along the way: a copy over 95 MB cleared pending without moving synced_hash, so it looked like it was waiting to go up forever. It's now recorded as a too-big-copy problem.

No website change is needed: the saves list already returns made, device, played and hash for each copy. Nothing changes in recomplauncher.json.

Google Drive (#228): this only knows RecompStore. I'll put the changes Drive needs on that branch and say what they are there.

How you tested it

On bazzite-kde (Fedora 43 toolbox), on main at 0a053e8:

  • cargo test --lib: 724 passed, 0 failed, 1 ignored. 23 new tests: 14 in saves.rs for the state word and syncing (a too-big copy is a problem, not waiting; an offline problem is still only waiting; a conflict until a sync; an old state file still reads), and 9 in cloud.rs for recording failures and the too-big folder.
  • node --test tests/games.test.cjs: 24 of 25. Test 23 fails the same way on main when the files are checked out with Windows line endings (its regex expects \n); nothing to do with this change.
  • Tried it in the launcher (npm run dev): nothing to see yet; the badge is the next PR.

Checklist

  • One change per pull request
  • No version bump or patch notes (those are done at release time)
  • If it changes what developers can write in recomplauncher.json: the schema and docs are updated too (nothing new to write)

…y didn't

Each game's save state keeps when this PC and the cloud last agreed (and when and where that
save was made), a conflict until the player picks, and the reason a sync didn't go through.
sync_state turns that into one word for the game page, without asking the website.
…ve-sync event

Uploads, restores and checks say what they're doing (check, up, down, idle) and record how they
ended. A copy too big for the cloud and a save folder too big to look through are kept as
problems, so a page no longer shows them as waiting for good. The Saves page list carries each
game's state too.
…connected in one place

saves_status and the Saves page ask provider_name and cloud_ready (RecompStore and signed in,
for now), so a second cloud only has to answer those two. A conflict a cloud reports as an
upload error is kept like one the website list shows, and a copy that went up is recorded the
same way whichever cloud took it.
…er it's connected in one place"

This reverts commit 377017d.
Xarishark added a commit to innateessence/RecompLauncher that referenced this pull request Nov 18, 2026
Brings in main since Beta 55 and the cloud save status from elripalda#289, which this branch now builds
on. Conflicts in cloud.rs (take_cloud, upload_current, check_saves, the tests) and lib.rs (the
command list) keep both sides: Drive's provider branches, with the status hooks around them.
@elripalda
elripalda merged commit e48daf1 into elripalda:main Nov 18, 2026
6 checks passed
@Xarishark
Xarishark deleted the feat/game-save-sync-status-a2bdc4 branch November 23, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants