Skip to content

CRDT for documents (2/2): wire Automerge into the document editor - #1758

Draft
gearnode wants to merge 2 commits into
automerge/lib-cleanfrom
automerge/app-integration-clean
Draft

CRDT for documents (2/2): wire Automerge into the document editor#1758
gearnode wants to merge 2 commits into
automerge/lib-cleanfrom
automerge/app-integration-clean

Conversation

@gearnode

Copy link
Copy Markdown
Contributor

Part 2/2 of the clean split of #1657 ("CRDT for documents"), stacked on #1757.

What this PR does

Wires pkg/automerge into the app to give documents real-time collaborative editing:

  • The automerge-repo gateway server (pkg/server/api/console/v1/document_collaboration_*)
  • The document collaboration service and DB-backed change/state persistence (pkg/probo, pkg/coredata)
  • Cross-instance ephemeral fan-out over Postgres LISTEN/NOTIFY (pkg/pgnotify, pkg/realtime)
  • Moves the console editor onto the official @automerge/automerge-repo client with cursor-based selection presence (packages/ui/src/RichEditor)

Verification

Full-repo go build ./... and go vet pass after generating GraphQL/MCP codegen; packages/ui typechecks clean.

Stack

  1. automerge/lib-clean (CRDT for documents (1/2): Automerge CRDT engine for Go #1757): Automerge CRDT engine for Go
  2. → this PR: wire Automerge into the document editor

Introduces pkg/automerge: a pure-Go implementation of the Automerge
CRDT achieving full V2 wire and state interoperability with the
upstream Rust and JS implementations, verified by a differential
parity and fuzzing suite run against both.

Includes the automerge-repo wire protocol client/session/gateway
codec (pkg/automerge/collaboration), a ProseMirror rich-text bridge
(pkg/automerge/prosemirror), an embedded Rust/WASM reference backend
used only in tests, and the supporting JS conformance oracle and
benchmark tooling (packages/automerge-conformance,
packages/automerge-benchmark).

Nothing in the application imports this package yet.

Signed-off-by: Bryan Frimin <bryan@probo.com>
Wires pkg/automerge into the app to give documents real-time
collaborative editing. Adds the automerge-repo gateway server
(pkg/server/api/console/v1/document_collaboration_*), the document
collaboration service and DB-backed change/state persistence
(pkg/probo, pkg/coredata), cross-instance ephemeral fan-out over
Postgres LISTEN/NOTIFY (pkg/pgnotify, pkg/realtime), and moves the
console editor onto the official @automerge/automerge-repo client
with cursor-based selection presence (packages/ui/src/RichEditor).

Signed-off-by: Bryan Frimin <bryan@probo.com>
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.

1 participant