super-productivity/src
Johannes Millan 09f5ced2c9 fix(sync): prevent data loss for fresh clients from upload retry race condition
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.
2026-04-16 17:41:39 +02:00
..
app fix(sync): prevent data loss for fresh clients from upload retry race condition 2026-04-16 17:41:39 +02:00
assets fix(sync): handle data validation errors and improve client ID management 2026-04-16 17:41:39 +02:00
environments 18.1.3 2026-04-01 21:27:44 +02:00
static
styles feat: change very small container to 356px 2026-04-01 20:23:45 +02:00
test-helpers
typings
_common.scss
favicon.ico
hammer-config.class.ts
index.html fix: show black logo on loading screen for light system theme 2026-03-20 21:36:30 +01:00
karma.conf.js
main.ts fix(sync): scope interval timer to file-based providers and drop unneeded migration 2026-04-14 22:09:02 +02:00
manifest.json
polyfills.ts
styles.scss
test.ts
tsconfig.app.json
tsconfig.spec.json
tsconfig.worker.json