Go to file
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
.github/workflows Add human support form with fixed email recipient (#40) 2026-09-21 07:12:26 +03:00
docs Correct support mailbox to support@caterium.ru (#42) 2026-09-21 11:04:06 +03:00
ops Refine six client proposal layouts and transparent company logos 2026-09-18 19:55:04 +03:00
public fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
supabase Fix employee sync and expose mobile profile/logout (#37) 2026-09-20 13:55:56 +03:00
tests fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
.gitattributes Route cloud access through Caterium and vendor login SDK 2026-09-18 19:07:47 +03:00
.gitignore Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
deploy-trigger.txt ci: verify fresh auth cache on Timeweb 2026-09-12 08:15:01 +03:00
GITHUB-CLOUDFLARE-SETUP.txt docs: mark Cloudflare as verified-production fallback 2026-09-11 09:36:55 +03:00
package-lock.json Restore Caterium schema and switch production to fresh Supabase 2026-09-17 17:30:57 +03:00
package.json fix: stop re-sending every client on each start; drop rejected error-log records 2026-09-21 16:48:16 +03:00
PUSH-TO-GITHUB.bat Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
README.md docs: make Timeweb production source of truth 2026-09-11 09:36:48 +03:00
TIMEWEB-APP-PLATFORM.md Infra: production branch promotion for app.caterium.ru 2026-09-09 19:09:32 +03:00
UPDATE-FROM-REMOTE-AND-PUSH.bat Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
wrangler.jsonc Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00

Caterium

Caterium catering SaaS frontend with Supabase backend.

Production

Primary production URL: https://app.caterium.ru

Production frontend is hosted on Timeweb Cloud App Platform:

  • repository: pavlov346346-source/caterium-app
  • branch: production
  • publish directory: public
  • auto deploy: enabled for production

main is the integration branch. GitHub Actions runs the full Caterium QA workflow for each push to main. Only a successful QA run may promote the verified commit to production.

The Cloudflare Worker ancient-sound-04ab is retained only as a fallback. It is not the primary production target and must not replace the Timeweb deployment unless an intentional fallback procedure is being used.

Deploy checks

npm ci
npm audit --audit-level=high
npm run check:deploy
npm run test:e2e

The QA workflow performs these checks automatically. High/critical npm audit findings block promotion.

Cloudflare fallback

Use Cloudflare only as a backup deployment target. Manual fallback deployment is available as:

npm run deploy:cloudflare-backup

When configuring Git-based Cloudflare fallback deployment, use the verified production branch rather than main so the fallback receives the same QA-approved commit as Timeweb.

Backend

Supabase Edge Functions are versioned under supabase/functions/. SQL migration/history files live under ops/sql/. Database DDL changes should be applied as migrations and kept in repository history.

See TIMEWEB-APP-PLATFORM.md for the production hosting checklist.