[PB-6591] feature/Photos database backup - #538
Merged
CandelR merged 2 commits intoJul 30, 2026
Merged
Conversation
|
larryrider
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add a device sync manifest so a reinstall or re-login restores Photos backup state without re-checking every asset against the backend.
Summary
PhotoSyncManifestService: exportsasset_syncto an encryptedmanifest.jsonunder {deviceFolder}/.sync/`. Restore validates schema version and device id, keeps only entries whose asset still exists in the local gallery, and inserts them back in a transaction.thunks/upload.ts: manifest checkpoint during the cycle plus a final upload at the end of any cycle that uploaded something.store/slices/photos:restoreLocalDbFromManifestThunkruns at the start of each backup cycle.PhotoUploadQueue: addedisCycleRunning()andwaitForCycleEnd(timeoutMs), backed by a deferred resolved inendCycle().auth+photosslices): Photos drains any in-flight upload cycle, uploads a last-chance manifest snapshot and wipes its local DB before credentials are cleared.SignOutModal: shows a spinner and a "Saving your latest Photos data…" message while sign-out runs.