Commit History
20 days ago
-
feat(collab)!: migrate to Hocuspocus v4 and harden persistence
- Upgrade Hocuspocus 3 -> 4.8, Tiptap 3.33, @tiptap/y-tiptap 3.2, Yjs 13.6.33 and require Node 22 (Docker images and README). - Wire Hocuspocus v4 custom integration (web Request, forwarded messages and close events) and freeze inbound edits before the final shutdown snapshot. - Fail-closed document loading, atomic local writes, ordered HF pushes with retry, and a cloud-pull error stage in the sync indicator. - Run typecheck and tests as blocking steps in the Docker build, the only CI gate for a Space that deploys on push. - Add data-safety, storage-ordering, shutdown-flush and auth-guard suites, plus an opt-in Playwright collab-sync E2E test. BREAKING CHANGE: Node 22+ is required; y-tiptap 3.2 drops position migrations, so every collaborating client must reload after deploy. Co-authored-by: Cursor <cursoragent@cursor.com>3557a6a
-
refactor(backend): modular server split with new routes, persistence and agent layer
- Introduce create-app factory to compose routes, middleware and Hocuspocus in isolation - Extract route modules (auth, chat, publish) and move storage logic into persistence.ts - Harden auth + HF storage integration (user token fallback, secure cookie in production) - Add embed studio AI pipeline (embed-chat, embed-tools, system prompt) and shared stream handler - Cover the new surface with api-routes, persistence and agent-chat test suites - Ship .env.example and .gitignore so new contributors can boot without guesswork Made-with: Cursorf6678ab
-
fix: XSS escaping, DRY utils, agent undo batch, graceful shutdown
- Escape meta.licence in published HTML to prevent XSS - Extract shared sanitizeName/docPath/DATA_DIR into utils.ts (DRY) - Disable WS debug logging in production - Fix startup log message (was /collab/:doc, now /collab) - Remove unused NextFunction import in auth.ts - Remove duplicate JSDoc in publisher/index.ts - Add timeout to graceful shutdown (SIGTERM/SIGINT) - Fix agent undo batch: close batch on stream finish (onFinish) - Fix replaceSelection: return error when no text selected Made-with: Cursore371833