super-productivity/packages/plugin-dev/google-calendar-provider
Johannes Millan 5b90fcdd9a fix(calendar): stop Google time-block sync hitting the write rate limit
Google Calendar time-block sync failed with 403 rateLimitExceeded. Root cause: every upsert did POST insert -> 409 duplicate -> PATCH (two writes plus a guaranteed 409 per sync), and a single user edit dispatched several actions that each issued a write to the same event within ~1s, bursting past Google's per-event write limit.

- google-calendar-provider: patch-first idempotent upsert (POST only on 404; recover a concurrent-create 409 via PATCH) + bounded exponential backoff on 403 rateLimitExceeded / 429, retried per network call. Follows Google's documented 409 remedy.

- caldav-calendar-provider: PUT is already an idempotent upsert; add the same bounded backoff on transient 429/503 from self-hosted servers. 404-swallow on delete unchanged.

- time-block-sync.effects: merge createOrUpdateOnSchedule$ + updateOnFieldChange$ into one upsertOnTaskChange$ that groups by task id and debounces (COALESCE_MS=1000) then switchMaps, re-reading the latest task post-debounce. One settled edit = one write. Still LOCAL_ACTIONS + action-driven (sync-correctness rules 1-2 preserved).

Adds vitest coverage for both plugins' timeBlock paths and the first effects spec for time-block sync.
2026-05-15 17:02:08 +02:00
..
scripts feat(two-way-sync): add plugin OAuth, two-way field sync, and remote issue deletion 2026-03-22 13:02:41 +01:00
src fix(calendar): stop Google time-block sync hitting the write rate limit 2026-05-15 17:02:08 +02:00
icon.svg fix(plugins): add missing humanReadableName to specs and fix google-calendar-provider build 2026-03-22 18:27:53 +01:00
package-lock.json chore(deps): sync plugin lockfiles after vite-plugin bump to ^6.4.2 2026-04-21 21:50:53 +02:00
package.json feat(two-way-sync): add plugin OAuth, two-way field sync, and remote issue deletion 2026-03-22 13:02:41 +01:00
tsconfig.json feat(two-way-sync): add plugin OAuth, two-way field sync, and remote issue deletion 2026-03-22 13:02:41 +01:00
vitest.config.ts feat(two-way-sync): add plugin OAuth, two-way field sync, and remote issue deletion 2026-03-22 13:02:41 +01:00