Skip to content

feat(api): add active-room-aware content mutation and restore gateway - #19

Merged
PeterGuy326 merged 1 commit into
mainfrom
qoder/issue-4-active-room-mutation
Aug 7, 2026
Merged

feat(api): add active-room-aware content mutation and restore gateway#19
PeterGuy326 merged 1 commit into
mainfrom
qoder/issue-4-active-room-mutation

Conversation

@PeterGuy326

Copy link
Copy Markdown
Contributor

Summary

  • Add an active-room-aware gateway that serializes content mutations through the Yjs collaboration authority
  • Implement version creation/listing and safe restore with base-version preconditions
  • Define idempotency keys and structured conflict responses for stale base versions

Test plan

  • Verify mutation routes apply changes through collaboration layer
  • Test conflict detection when base version is stale
  • Test idempotent request replay does not duplicate mutations
  • Test restore creates a version record and preserves recoverability
  • Run npx vitest run src/__tests__/lib/api-v1-mutations.test.ts

Closes #4

Serialize document mutations through the Yjs collaboration authority
instead of bypassing active rooms with direct DB writes. Supports
optimistic base-version preconditions, idempotent retry, version
listing, and safe restore with pre-mutation snapshots.

Closes #4
@PeterGuy326
PeterGuy326 requested a review from Bindy-lbb as a code owner August 7, 2026 03:30
@PeterGuy326
PeterGuy326 merged commit 80c4a42 into main Aug 7, 2026
1 of 2 checks passed
@PeterGuy326
PeterGuy326 deleted the qoder/issue-4-active-room-mutation branch August 7, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(api): add an active-room-aware content mutation and restore gateway

1 participant