Skip to content

A cloud save status above Play, and an easier choice when both saves changed - #319

Merged
elripalda merged 11 commits into
elripalda:mainfrom
Xarishark:feat/save-status-badge
Nov 19, 2026
Merged

elripalda merged 11 commits into
elripalda:mainfrom
Xarishark:feat/save-status-badge

Conversation

@Xarishark

@Xarishark Xarishark commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

A cloud save status above Play on every game page, so the player sees whether the last save reached the cloud without opening the Saves tab. It's the window side of #289, which added saves_status and the save-sync event. The "which save do you want?" dialog also gets easier to answer.

The status above Play

A coloured line, not a button: the cloud mark and a few words in the state's colour, with a short grey note.

  • Up to date (green), with how long ago: "12 min ago".
  • Checking cloud…, Uploading…, Getting cloud save… (cyan) while a check, upload or download runs, from save-sync.
  • Syncs after you play (cyan) while the game runs.
  • Waiting to upload (amber): offline, the next try in a few minutes, or going up after the next session.
  • Choose a save · press Play to pick (amber) when both sides changed.
  • Can't upload · cloud full, Too big for the cloud, Sync paused (a save folder too big to read), Cloud saves paused, or an error (red).
  • Cloud saves off, Not signed in, No saves yet (grey).

Hovering it gives the details in its tooltip: what's going on in a sentence, when it last synced and from which PC, how many copies are waiting. What to do about it stays on the Saves tab (and Play, for a conflict).

The status is asked once per game and again when something changes: a save-sync start or end, the saves event, anything that reloads the Saves tab, signing in or out. A game of several that keeps its own saves shows its own.

Big Picture: the same line above the game's buttons.

Light theme has darker green, amber and red so they read on white. The moving marks (checking, uploading) stay still with reduced motion.

Which save to keep

When both saves changed (on Play, or Sync Now on the Saves tab):

  • The two save cards are the choices themselves, as in the "Where's your build?" dialog: "Keep this PC's" and "Use the cloud one", each with when it was saved, on which PC and the playtime. No buttons under them.
  • The one saved later has a green Newer beside its heading (text, not a pill); none when both were saved in the same second. This PC's save is dated by the first copy that holds it, not by its files' time: restoring an older save writes its files anew, which called it Newer than the cloud's.
  • "The other one is kept as a copy on its Saves tab" sits under the question.
  • Big Picture's sheet shows Newer on the label's line, and the cloud choice has a cloud icon (it had a tick).

ask() can show any choice as cards this way (cards argument); the conflict dialog still goes through it, so the existing save-sharing test reads it as before.

After a game closes

  • The line keeps Syncs after you play from the moment the game closes (quit or crash) until its save is copied and, with cloud saves on, sent. Before, it showed "Up to date" for a moment in between, which the session's save had already made untrue. A session under five seconds isn't copied, so the line goes straight back.
  • Signed out, with cloud saves off, or with no known save folder, the copy after a session isn't called a sync: the line keeps saying Not signed in, Cloud saves off, or that the saves aren't backed up.
  • A launcher that closes or crashes mid-way: each game's sync notes (saves/<id>/state.json) get after_play when it starts, cleared by any copy of its save (after the session, Sync Now, Back Up Now, before a restore or a cloud save). Still set when the launcher starts again, that session's save is copied and sent first, and until then the status says Waiting to upload instead of a stale Up to date.

New strings go through t() and N_(); they aren't translated yet.

How you tested it

On bazzite-kde (Fedora 43):

  • node --test tests/*.test.cjs: 391 passed, 0 failed. New in tests/save-badge.test.cjs: one per state the line can show, the tooltip text, the coarse time fallback, which save is newer (this PC, the cloud, neither), and the step after a session (shown only for a game that syncs).
  • cargo test --lib: 800 passed, 0 failed. New: a session not copied yet is waiting, any copy ends it, open sessions found at start, and the first copy dates a restored save.
  • node --check on account.js, app.js and tv.js.
  • Looked at the whole game page on the desktop and in Big Picture, every state, with the real index.html, app.js, tv.js and account.js against a stand-in core, in dark and light. Opened the conflict dialog both ways; picking a card sends saves_pick with that choice.
  • Tried it in a real build on Windows with two test games (with and without a save folder), signed in to a real account and signed out: every status above Play through Checking, Syncs after you play, Uploading and Up to date; Turn On; a both-changed conflict and picking the cloud save; Big Picture. With the launcher killed mid-session, the next start copied and sent that session's save. Signed out and with cloud saves off, sessions are copied and nothing tries to upload.

Overlaps: #228 (Google Drive) and #265 (saves between versions) also edit account.js and tv.js, in other functions. In the core: the step after a session and the session notes (cloud.rs, saves.rs, lib.rs). Nothing changes in recomplauncher.json.

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)

Up to date (and how long ago), checking, uploading, getting a newer save, syncs after you play,
waiting to upload (offline, or the next try), choose a save, can't upload, too big, sync paused,
off, not signed in or no saves yet. Clicking it shows when it last synced and from which PC,
with the button that fits: Sync Now, Try Again, Choose a Save, Turn On, Sign In or Open Saves.
It reads saves_status (this PC only, never the website) and follows the save-sync event, so it
changes while a save goes up or comes down.
The same state as on the desktop, among the game's buttons; A opens its Saves.
It looked clickable as a pill. Now it's the cloud mark and the state's words in the state's
colour, above Play on the desktop and above the game's buttons in Big Picture. The details it
showed on a click are its tooltip; what to do about it stays on the Saves tab.
…says so

On the desktop the cards for this PC's save and the cloud's are what the player clicks (no
buttons under them), with what happens to the other under the question. The one saved later
has a green Newer beside its heading; in Big Picture beside its label in the sheet. ask() can
show any choice as cards this way.
Xarishark added a commit to Xarishark/RecompLauncher that referenced this pull request Nov 19, 2026
…opied, and the Newer date

# Conflicts:
#	src-tauri/src/cloud.rs
Xarishark added a commit to Xarishark/RecompLauncher that referenced this pull request Nov 19, 2026
Xarishark added a commit to Xarishark/RecompLauncher that referenced this pull request Nov 19, 2026
@Xarishark
Xarishark marked this pull request as ready for review November 19, 2026 19:22
@elripalda
elripalda merged commit ae59a3e into elripalda:main Nov 19, 2026
6 checks passed
Xarishark added a commit to Xarishark/RecompLauncher that referenced this pull request Nov 19, 2026
elripalda#319 went in squashed, so its files clashed with the branch commits this branch already holds; this branch's side is elripalda#319's plus the Saves tab, so it is kept for those five files.
Xarishark added a commit to Xarishark/RecompLauncher that referenced this pull request Nov 19, 2026
Xarishark added a commit to Xarishark/RecompLauncher that referenced this pull request Nov 19, 2026
elripalda#325)

No conflicts. elripalda#325's game title line and elripalda#319's save status line already sit together in main's refreshGame; this branch doesn't change app.js.
@Xarishark
Xarishark deleted the feat/save-status-badge 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