caterium-app/public
pavlov346346-source 2e6c0e3939
Some checks failed
Caterium QA / qa (push) Failing after 8m8s
fix: stop re-sending every client on each start; drop rejected error-log records
Clients: every page load re-sent all clients (72 requests for 18 clients)
because pushAll ran from several startup events at once, never skipped
unchanged clients, and overlapping saves of one client read the same stale
version, so ~40% ended in 409 conflicts. The payload also carried a fresh
updatedAt, so even identical re-sends bumped the server version and wrote a
change event, which made other devices' next save conflict too.

- Remember what the server holds per client (content fingerprint, scoped to
  the workspace) and skip unchanged clients; seed it from the server
  snapshot so a device that is already in sync sends nothing.
- Serialise saves per client and make pushAll single-flight.
- Load the server snapshot before the startup push instead of racing it.
- Drop the volatile updatedAt from the payload (server keeps updated_at).

Error log: a record the server refuses (Access denied for a workspace the
user is not in) stayed in the IndexedDB queue forever, was re-sent on every
flush and could block newer records behind it. Records from another
workspace are now dropped, others after 3 attempts.

Adds tests/client-sync-v1780.mjs (fake server enforcing the SQL conflict
rule; fails on the old module) to test:static, and bumps the cache-busting
versions of performance.js / app-runtime.js.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 16:48:16 +03:00
..
api Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
catalog Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
core fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
demo Fill empty trial tabs with premium, drinks, tableware, extras and delivery 2026-09-18 08:26:21 +03:00
fonts Restore distinct proposal designs and improve PDF typography and pagination 2026-09-18 04:05:36 +03:00
help Remove device PIN and fit calendar to mobile screens 2026-09-18 20:43:09 +03:00
legacy Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
offer-gallery Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
offer-templates Refine six client proposal layouts and transparent company logos 2026-09-18 19:55:04 +03:00
vendor Route cloud access through Caterium and vendor login SDK 2026-09-18 19:07:47 +03:00
.htaccess Cache optimized trial photos for legacy URLs in the installed app 2026-09-18 04:59:16 +03:00
app-runtime.js fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
caterium-login-logo.png Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
caterium-mark-light.svg feat: add approved Caterium mark for light login 2026-09-12 05:56:39 +03:00
index.html fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
manifest.webmanifest brand: update PWA identity to Caterium 2026-09-11 10:03:25 +03:00
pwa-icon-192.png Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
pwa-icon-512.png Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
refresh-login-20260912.html fix: add one-click PWA cache refresh for login 2026-09-12 08:27:31 +03:00
service-worker.js Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
sun-logo.png Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00