Commit Graph
4 Commits
Author SHA1 Message Date
velixio fb232a3b38 fix(account): address Greptile and code-scanning review on #2931
Greptile:
- Settings changed while sync was stopped are compared with the merge bases
  when sync starts again, so they are pushed instead of lost.
- A pulled value for a partly-synced object (clone settings, dictation)
  merges into the local one, so the draft, reference text and chosen voice
  survive a first sync.
- A stalled stream or too_many_streams runs the fallback poll and marks the
  stream down, so the 60-second poll keeps going.
- Replacing a voice's reference audio clears its sync consent attestation.
- A request stays aborted-on-off and timed until its body is read, not just
  until headers arrive.
- Cancel invalidates the sign-in attempt at every step: no browser opens and
  no token is stored after Cancel.

Code scanning:
- The sync client accepts only https (or loopback http) endpoints and Base62
  Organization IDs.
- Static SQL for sync IDs; no empty excepts; no unused imports or no-op
  statements; Cloud-sync applies notify stores through an app event instead of
  a synthetic StorageEvent.
2026-10-17 11:36:04 +05:30
velixio 4aaca2e234 fix(cloud-sync): never wipe settings on a tombstone; keep unknown keys; guard newer schemas
- A malformed pulled item is skipped instead of killing the round.
- Singleton items (settings groups, shortcuts, favorites) only forget their
  base on a tombstone or a full resync; local values are never wiped.
- Value keys this version does not manage are carried over on every push
  and merge.
- Collections seen with a newer schema_version are never pushed over, and
  are pulled again once this app supports them.
- The outbox row gets a generation: an edit made while its push is in
  flight is not lost, each change gets a new idempotency key, batches use
  their own key, and idempotency_key_reused renews the key.
- Collections switched on later pull what the cloud already has and drop
  stale removals.
2026-10-16 12:29:32 +05:30
velixio a52d8698f4 feat(cloud-sync): sync service, desktop routes and start-up wiring
The service runs the engine and the event stream when the user is signed in
with sync on, stops at once on /stop, and exposes Choose what to sync,
devices and the renderer localStorage mirror. The token bridge now carries
the Organization and sync endpoint, and a 401 asks main for a fresh token.
2026-10-16 07:24:32 +05:30
velixio 8a501d4262 feat(cloud-sync): the sync engine (pull, merge, push, full resync, guards) 2026-10-16 07:19:13 +05:30