caterium-app/tests
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
..
recovery Fix employee sync and expose mobile profile/logout (#37) 2026-09-20 13:55:56 +03:00
account-access.spec.mjs Remove device PIN and fit calendar to mobile screens 2026-09-18 20:43:09 +03:00
app.spec.mjs Stabilize settings updates, auth gates and modal lifecycle 2026-09-18 21:15:26 +03:00
auth-security-v1774.mjs Security: require verified email for signup 2026-09-11 07:27:37 +03:00
backend-cutover.mjs Route cloud access through Caterium and vendor login SDK 2026-09-18 19:07:47 +03:00
banquet-client-menu.spec.mjs One-page banquet menu for the client (#36) 2026-09-20 12:54:42 +03:00
banquet-menu.spec.mjs Add banquet packages, dish sections and guest totals 2026-09-17 21:07:54 +03:00
branding-v1774.mjs Separate account sidebar identity from company document branding 2026-09-17 19:51:01 +03:00
calendar-fixture.mjs Fit nine calendar orders per day and preserve all printed events 2026-09-17 21:25:25 +03:00
calendar-print.spec.mjs Remove device PIN and fit calendar to mobile screens 2026-09-18 20:43:09 +03:00
client-menu.spec.mjs Compact clients and explicit timed menu promotions (#31) 2026-09-19 09:34:50 +03:00
client-sync-v1780.mjs fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
company-branding.spec.mjs Start new companies with empty private catalogs 2026-09-17 20:27:07 +03:00
developer-mfa.spec.mjs Fix reopening incomplete developer MFA setup (#38) 2026-09-20 20:08:46 +03:00
edge-security-v1774.mjs fix: reconcile version/test drift from the unreviewed production merge 2026-09-12 14:40:22 +03:00
employee-create-v1774.mjs test: enforce owner-only employee roles 2026-09-12 08:53:42 +03:00
employee-session.spec.mjs Fix employee sync and expose mobile profile/logout (#37) 2026-09-20 13:55:56 +03:00
help-center.spec.mjs Add human support form with fixed email recipient (#40) 2026-09-21 07:12:26 +03:00
html-integrity-v1774.mjs Fix malformed style boundary and guard HTML integrity 2026-09-11 07:41:42 +03:00
login-recovery.spec.mjs Poll workspace revision through the authorized state RPC 2026-09-18 19:17:03 +03:00
mobile-menu-scenario.mjs Mobile menu editor above boxes with a matching return arrow (#34) 2026-09-19 20:02:43 +03:00
mobile-menu.spec.mjs Mobile menu editor above boxes with a matching return arrow (#34) 2026-09-19 20:02:43 +03:00
order-enhancements-v1775.mjs test: remove reminder requirements from order enhancements 2026-09-11 15:21:32 +03:00
order-import.spec.mjs Hide completed import catalog entries without losing order history 2026-09-18 20:17:30 +03:00
playwright.config.mjs Add human support form with fixed email recipient (#40) 2026-09-21 07:12:26 +03:00
production-banquet-client-menu.mjs One-page banquet menu for the client (#36) 2026-09-20 12:54:42 +03:00
production-employee-session.mjs Fix employee sync and expose mobile profile/logout (#37) 2026-09-20 13:55:56 +03:00
production-mobile-menu.mjs Mobile menu editor above boxes with a matching return arrow (#34) 2026-09-19 20:02:43 +03:00
production-promo-entry.mjs Expose developer promo creation with three subscription plans (#39) 2026-09-21 03:30:21 +03:00
production-support-form.mjs Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
production-training-catalog.mjs Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
production-ui-smoke.mjs Capture promotion screenshots without holding a row replaced by the normal save refresh 2026-09-19 09:51:41 +03:00
promo-entry-fixture.mjs Expose developer promo creation with three subscription plans (#39) 2026-09-21 03:30:21 +03:00
promo-entry.spec.mjs Expose developer promo creation with three subscription plans (#39) 2026-09-21 03:30:21 +03:00
proposal-quality.spec.mjs Refine six client proposal layouts and transparent company logos 2026-09-18 19:55:04 +03:00
proxy-http.php Preserve JSON content negotiation through both proxy routes 2026-09-18 19:25:00 +03:00
release-check.mjs Stabilize settings updates, auth gates and modal lifecycle 2026-09-18 21:15:26 +03:00
static-security.mjs Stabilize settings updates, auth gates and modal lifecycle 2026-09-18 21:15:26 +03:00
support-form.spec.mjs Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
support-mail.php Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
theme-startup.spec.mjs Apply saved theme before first paint and prevent startup flicker 2026-09-17 19:16:19 +03:00
training-catalog-fixture.mjs Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
training-catalog.spec.mjs Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
trial-demo.spec.mjs Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
ui-stability.spec.mjs Optional per-profile training catalog with reversible example visibility (#35) 2026-09-20 12:18:40 +03:00
workspace-loading.spec.mjs Match Help icon to native sidebar styling (#30) 2026-09-19 07:52:30 +03:00