Show Local Storage save progress in the dashboard #3

Closed
opened 2026-09-25 09:19:34 +02:00 by kyuubi · 1 comment
Owner

Show the progress of Local Storage saves in the dashboard's sync indicator ("All Synced"), in place of the cloud status while a save runs. Placement decided: dash only.

Design

  • RecordSyncStatus.OnCommonUpdate postfix writes StatusMessage in vanilla's two-line style: Saving Locally / Cosmic Defender · 34/120 assets · 812 MB. The text refreshes 4×/s and goes back to the vanilla text when saves end.
  • SaveProgressBoard (engine-free, unit-tested) tracks running saves: one save shows its name, assets written/total and size; several show N saves · total size; the last step shows finishing.
  • The asset total is counted from the graph's URL nodes with the same filter PackageCreator.CollectAssets uses; the written count is RecordPackage.AssetCount, and the size is the package file's length on disk.
  • Covers item saves, Save As / Save Copy of worlds, and plain Save of a Local Storage world.

Limits

  • The world snapshot at the start is one blocking engine call; it shows no progress.
  • An asset that isn't cached is downloaded during packing; the count pauses on it.

Plan

  • Progress board + tests
  • Wire into package writing, pending saves and overwrite saves
  • Dashboard patch
  • Build, tests, install, commit + push
  • In-game check with a big world
Show the progress of Local Storage saves in the dashboard's sync indicator ("All Synced"), in place of the cloud status while a save runs. Placement decided: dash only. ## Design - `RecordSyncStatus.OnCommonUpdate` postfix writes `StatusMessage` in vanilla's two-line style: `Saving Locally` / `Cosmic Defender · 34/120 assets · 812 MB`. The text refreshes 4×/s and goes back to the vanilla text when saves end. - `SaveProgressBoard` (engine-free, unit-tested) tracks running saves: one save shows its name, assets written/total and size; several show `N saves · total size`; the last step shows `finishing`. - The asset total is counted from the graph's URL nodes with the same filter `PackageCreator.CollectAssets` uses; the written count is `RecordPackage.AssetCount`, and the size is the package file's length on disk. - Covers item saves, Save As / Save Copy of worlds, and plain Save of a Local Storage world. ## Limits - The world snapshot at the start is one blocking engine call; it shows no progress. - An asset that isn't cached is downloaded during packing; the count pauses on it. ## Plan - [x] Progress board + tests - [x] Wire into package writing, pending saves and overwrite saves - [x] Dashboard patch - [x] Build, tests, install, commit + push - [x] In-game check with a big world
Author
Owner

The first version showed nothing: the dash facet (template SyncStatus) never displays RecordSyncStatus.StatusMessage. A dump of the live facet showed its ProtoFlux picking a state from RecordQueueCount, AssetVariantQueueCount, CurrentTaskProgress and LastError, with locale drivers for the text and the bar/percentage driven by CurrentTaskProgress. Since e9c4f02 (v0.3.1), local saves are reported through those outputs: the pill shows vanilla's "Syncing N Items" with the bar filling (asset packing = 90%, writing the data = the rest). The name/size detail line is gone, because the facet has nowhere to show it.

The first version showed nothing: the dash facet (template `SyncStatus`) never displays `RecordSyncStatus.StatusMessage`. A dump of the live facet showed its ProtoFlux picking a state from `RecordQueueCount`, `AssetVariantQueueCount`, `CurrentTaskProgress` and `LastError`, with locale drivers for the text and the bar/percentage driven by `CurrentTaskProgress`. Since e9c4f02 (v0.3.1), local saves are reported through those outputs: the pill shows vanilla's "Syncing N Items" with the bar filling (asset packing = 90%, writing the data = the rest). The name/size detail line is gone, because the facet has nowhere to show it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kyuubi/ResoLocalStorage#3
No description provided.