Bead: Crdt Newsletter Editor

**Bead** `020a59c6-6b15-4c85-815a-c5f3feff7fc9` · [canonical URI](https://redfish.acequia.io/guerin/.agents/020a59c6-6b15-4c85-815a-c5f3feff7fc9/) · discussion: Talk: Crdt Newsletter Editor This page is the wiki facet of a [bead](https://redfish.acequia.io/guerin/.agents/); the bead is the source of truth.

Design bead for a **realtime, joint newsletter editor** with a Google-Docs feel — the "community editor workflow" Stephen flagged while setting up team git for the Size-Up. Scoping stage: foreground the design questions before building.

## Identity - **URI:** https://redfish.acequia.io/guerin/.agents/020a59c6-6b15-4c85-815a-c5f3feff7fc9/ - **GUID:** `020a59c6-6b15-4c85-815a-c5f3feff7fc9` - **Slug:** `crdt-newsletter-editor` - **Opened:** 2026-06-24 - **Animated by:** Claude (CV — Claude Code)

## Motivation (Why a GUID) Live co-editing is a **CRDT** problem, not a git problem (git is last-write-wins, wrong tool for concurrent edits). The Size-Up team wants Google-Docs-style joint editing; the simtable-size-up git/WebDAV layer becomes the **snapshot + publish** layer beneath a CRDT **live-edit** layer. This bead scopes that editor.

## Mechanism (What this bead does) Scopes (and later builds) a browser-based CRDT editor where each editor's browser is a **parciante node** on the Acequia P2P mesh — the same substrate Ember Defender uses (browser-is-a-parciante-node). Conflict-free concurrent editing; periodic/​on-publish serialization to the simtable-size-up `repo/`, committed and PUT to the `/size-up/<issue>/` permalink.

## The two layers (from simtable-size-up notes/05) | Layer | Tool | Job | |---|---|---| | Live edit | CRDT (Yjs / Automerge) over Acequia P2P | concurrent, real-time, no merge conflicts | | Checkpoint | git in the simtable-size-up bead `repo/` | named versions, history | | Publish | WebDAV PUT → `/size-up/<issue>/` | the public permalink |

## Open scope questions (foreground before building) 1. **CRDT lib:** Yjs (mature, y-webrtc / y-websocket providers, rich-text via ProseMirror/ Tiptap) vs Automerge (Rust core, document-database feel). Yjs is the likely default for rich-text editing. 2. **Transport:** which Acequia P2P channel carries the CRDT updates — WebRTC data channels (y-webrtc), a WebSocket relay, or the acequia mesh directly? Awareness/presence (cursors) rides the same channel. 3. **Document model:** edit **HTML/rich-text** directly (Tiptap/ProseMirror on a Yjs doc) or edit a **markdown/structured source** that renders to the issue template? The latter keeps the brand template stable and diffs clean. 4. **Persistence + publish:** when does CRDT state snapshot to `repo/` — on idle, on a "publish" button, or continuous? Who presses publish (per-parciante vs mayordomo)? 5. **Identity/auth:** editors as per-parciante nodes (own keys), presence + permissions (view vs edit) — ties to the htaccess-like, token-aware ACLs bead-orchestrator will own. 6. **Scope of v1:** just the Size-Up, or a general acequia rich-doc co-editor that the newsletter is the first consumer of?

## Mounted beads - alison-edits-anyhazard `e0cca7db` — **the bead Stephen named**: how to enable a non-developer owner (Alison) to edit `go.simtable.com/anyhazard.html`. **Same core issue as this bead — how to enable acequia editing of a webpage.** The newsletter editor is the realtime/joint generalization of it. - simtable-learnmore-anyhazard `3e978f25` — its productionized successor, which already runs the full loop this bead generalizes: editor surface → edits as **CRDT change-ops** into `request/` → apply → commit to local `.git` → **WebDAV publish**. The single-page precedent; reuse its `handler.mjs` / `webdav-publish.mjs` rather than reinvent. - simtable-size-up `bc2bd3b1` — the consumer; its `repo/` is the snapshot+publish layer. > **The throughline:** "edit a webpage on the acequia" is one problem with two scales — > single-author one-page (the anyhazard editor, done) and realtime multi-author (this > editor). Both = an edit surface in a browser-parciante → change-ops → git checkpoint → > WebDAV publish. This bead adds the CRDT (concurrent, multi-cursor) layer on top of the > anyhazard precedent.

## Lifecycle Scoping/design. Next step (when greenlit): Debbie sketch-ux pass on the editor UI + architecture forks above, then a thin Yjs+Tiptap spike on the Acequia P2P transport.

## Limitations - Scoping only; nothing built. Library/transport/document-model are open forks, not decisions.

## References (bead cross-links) - Bead: E0cca7db · [canonical](https://redfish.acequia.io/guerin/.agents/e0cca7db-ed8c-43a5-a027-b406d985e402/) - Bead: Simtable Learnmore Anyhazard · [canonical](https://redfish.acequia.io/guerin/.agents/3e978f25-63f0-4002-9501-83d3f79345f4/) - Bead: Simtable Size Up · [canonical](https://redfish.acequia.io/guerin/.agents/bc2bd3b1-10f7-40e1-9c92-5c444c3e13ae/)

See all: Beads