Repository navigation
docs: COLLAB_DESIGN.md — loro CRDT integration design - #14
Merged
Merged
Conversation
…tion Resolves the architecture on paper before any collab code: dual-model op bridge (EditorState stays the local source of truth; a shadow LoroDoc is the convergence authority), block tree -> LoroTree + textblock -> LoroText/Peritext mapping with a per-Step translation table, a transport-agnostic CollabSession API shipped as a new taino-edit-collab crate (amending the old core-feature plan, rationale in §6), deterministic host-side convergence testing, honest 4-5 week estimate, and five open questions that gate the first implementation PR. ROADMAP's Up next now links the doc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design-before-code for the biggest remaining roadmap item, in the same spirit as DESIGN_NOTES.md. No implementation in this PR — the document exists to de-risk a ~4–5 week / ~4k LOC build before the first line is written, whether it's built by the maintainer or picked up by a contributor.
Key decisions drafted for review:
EditorStateremains the local source of truth; a shadowLoroDocowned by aCollabSessionis the convergence authority. LocalSteps translate to loro ops; remote loro diffs come back as history-exemptSteps through the normal transaction pipeline — adapters, history, and plugins untouched.LoroTree(movable-tree convergence for splits/joins/wraps); textblock content →LoroTextwith Peritext mark ranges; a per-Steptranslation table is the implementation contract.map_againstturns out unnecessary for convergence under this architecture (loro merges; we never rebase) — the Phase-2 trait bet held, just not the way we expected.taino-edit-collabcrate rather than acollabfeature on core (dependency discipline, public-API dogfooding, versioning freedom); the umbrella's reservedcollabfeature still delivers the original UX.🤖 Generated with Claude Code