caterium-app/public/core
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
..
access-policy.js Require account login and isolate all company client caches 2026-09-17 20:40:24 +03:00
account-center-v1780.js Fix employee sync and expose mobile profile/logout (#37) 2026-09-20 13:55:56 +03:00
auth-security-v1774.js Remove device PIN and fit calendar to mobile screens 2026-09-18 20:43:09 +03:00
banquet-client-menu.js One-page banquet menu for the client (#36) 2026-09-20 12:54:42 +03:00
banquet-menu.js One-page banquet menu for the client (#36) 2026-09-20 12:54:42 +03:00
brand-theme.js Stabilize settings updates, auth gates and modal lifecycle 2026-09-18 21:15:26 +03:00
catalog-pricing.js Compact clients and explicit timed menu promotions (#31) 2026-09-19 09:34:50 +03:00
classic-offer-pdf-v1767.js Refine six client proposal layouts and transparent company logos 2026-09-18 19:55:04 +03:00
client-menu.css Compact clients and explicit timed menu promotions (#31) 2026-09-19 09:34:50 +03:00
cloud-transport.js Route cloud access through Caterium and vendor login SDK 2026-09-18 19:07:47 +03:00
company-branding.js Fix employee sync and expose mobile profile/logout (#37) 2026-09-20 13:55:56 +03:00
data-layer-v1773.js fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
developer-console-v1768.js Start new companies with empty private catalogs 2026-09-17 20:27:07 +03:00
help-center.css Add AI support assistant to the Help dialog 2026-09-19 18:27:47 +03:00
help-center.js Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
hotfix-v1763.js Expose developer promo creation with three subscription plans (#39) 2026-09-21 03:30:21 +03:00
import-archive.js Hide completed import catalog entries without losing order history 2026-09-18 20:17:30 +03:00
login-signature-v1776.css Make workspace loading a calm progress-only screen (#29) 2026-09-19 06:57:27 +03:00
login-signature-v1776.js fix: remove legacy login flash during session restoration 2026-09-18 05:48:20 +03:00
mobile-order.js Mobile menu editor above boxes with a matching return arrow (#34) 2026-09-19 20:02:43 +03:00
offer-workspace-v1769.js Refine six client proposal layouts and transparent company logos 2026-09-18 19:55:04 +03:00
ops-ux-v1762.js Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
order-enhancements-v1775.js Preserve imported order history and saved order pricing 2026-09-17 20:15:32 +03:00
pdf-engine.js Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
performance.js fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
proposal-layout.js Refine six client proposal layouts and transparent company logos 2026-09-18 19:55:04 +03:00
server-automation-v1770.js Caterium v17.7.0 — architecture foundation 2026-09-08 13:24:34 +03:00
signature-offer-pdf-v18.js Restore distinct proposal designs and improve PDF typography and pagination 2026-09-18 04:05:36 +03:00
stability-v1760.css Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
sun-safe.js Fix employee sync and expose mobile profile/logout (#37) 2026-09-20 13:55:56 +03:00
support-form.js Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
training-catalog.js Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
trial-demo.js Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
trial-promo-developer-v181.js Expose developer promo creation with three subscription plans (#39) 2026-09-21 03:30:21 +03:00
ux-fixes-v1764.js Fix iPhone offer template flicker (#33) 2026-09-19 19:28:57 +03:00