mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-27 17:53:50 +00:00
Replace the unsafe upload retry loop with a single-attempt strategy that
correctly handles concurrent uploads to file-based sync providers (WebDAV,
Dropbox, local file).
The old _uploadWithRetry called getStateSnapshot() inside a retry loop while
concurrent client ops could be in recentOps but not yet applied to NgRx,
creating a stale snapshot that caused data loss for fresh-bootstrap clients.
The new _uploadWithMismatchFallback:
- Attempts upload once with the current snapshot
- On UploadRevToMatchMismatchAPIError: re-downloads to distinguish
- Same rev (WebDAV ETag glitch): force-uploads the already-built uploadData
- Different rev (genuine concurrent upload): throws so the next sync cycle
downloads the concurrent ops first, then uploads with a consistent snapshot
- SyncWrapperService handles the thrown error as transient (UNKNOWN_OR_CHANGED,
no error snackbar)
Removes snapshotSyncVersion, extraOpIds, retry constants, and the retry-loop
infrastructure that was part of the broken approach.
|
||
|---|---|---|
| .. | ||
| app | ||
| assets | ||
| environments | ||
| static | ||
| styles | ||
| test-helpers | ||
| typings | ||
| _common.scss | ||
| favicon.ico | ||
| hammer-config.class.ts | ||
| index.html | ||
| karma.conf.js | ||
| main.ts | ||
| manifest.json | ||
| polyfills.ts | ||
| styles.scss | ||
| test.ts | ||
| tsconfig.app.json | ||
| tsconfig.spec.json | ||
| tsconfig.worker.json | ||