[PB-6653] bugfix/Backup status can show as idle/cloud fetching while assets are still uploading - #552
Merged
CandelR merged 1 commit intoJul 30, 2026
Conversation
…t upload, and edited photos silently re-uploading as new files instead of replacing the synced version
|
larryrider
reviewed
Jul 28, 2026
| const fileSize = stat.size; | ||
|
|
||
| if (fileSize <= 0) { | ||
| logger.warn(`[Upload] File "${filePath}" has invalid size=${fileSize} (stat: ${JSON.stringify(stat)})`); |
There was a problem hiding this comment.
if a file has an invalid size, shouldnt this function stop here or throw an error? instead of only log a warning 🤔
Contributor
Author
There was a problem hiding this comment.
Totally, but as we’re currently doing QA of this feature, I wanted to check the QA logs first and add this straight away to see what happens, and then we’ll decide which fix to apply :)
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.



Fixes two backup reliability bugs: an incorrect "idle" status shown during an active upload, and edited photos silently losing their changes on retry.
Summary
src/store/slices/photos/index.ts:runDiscoveryThunkno longer overwrites the sync status withidleif an upload cycle is already running when it finishes.thunks/upload.ts:runUploadThunkalso dispatchesuploadingon its own reentrancy-guard skip path, as a second safeguard against the same race.buildUploadJobsnow keys theexistingRemoteFileIddecision offremoteFileIdpresence instead ofstatus, so a failed edit retry that falls tostatus='error'still replaces the existing Drive file instead of silently uploading (and keeping) the old, pre-edit version.network/upload.ts: added a diagnostic warning when a file has a zero/invalid size before upload.