← Vissza a katalógushoz

Skill · 1.0.0 verzió

Közös dokumentumszerkesztés

Közös állapotmodellel, saját visszavonással és jogosított újracsatlakozással integrál párhuzamos szerkesztést teljes dokumentumfelülírás helyett.

collaborative-editing-integration

Nézd meg, miben segít

Mikor hasznos?

Akkor használd, ha párhuzamos szerkesztéseknek mások munkájának felülírása nélkül kell összeolvadniuk.

Miben segít neked?

  • Bevált együttműködési modellt kapcsol a szerkesztő támogatott integrációjához.
  • Elkülöníti a tartós tartalmat az átmeneti kurzortól és jelenléttől.
  • A visszavonást saját módosításra korlátozza, újracsatlakozáskor ellenőrzi a jogosultságot.

Például ezt kérheted

Tervezz egyidejű bekezdésszerkesztést offline visszatéréssel és csak a saját módosítást érintő visszavonással. Két felhasználó szomszédos szöveget szerkesszen, egyikük szakítsa meg a kapcsolatot. Visszatérés után mindkét munka maradjon meg, a visszavonás csak saját módosítást érintsen.

Részletes dokumentáció

Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.

Részletek…Összecsukás

Collaborative Editing Integration

Use this skill when real-time multi-user editing, live cursors/presence, or concurrent conflict-free document synchronization is explicitly required.

Core Collaborative Architecture Principles

  1. Do Not Bolt Real-Time Sync Onto an Ad-Hoc State Model:
    • Never attempt multi-user real-time editing by broadcasting full JSON snapshots over WebSockets—concurrent edits will overwrite each other and reset peers' cursors.
    • Use a proven collaborative model matched to the editor engine:
      • CRDTs (Yjs, Automerge) with official editor bindings (y-prosemirror, @tiptap/extension-collaboration, @lexical/yjs).
      • Operational Transformation / Authority Step Stream (prosemirror-collab) where a central authority orders steps and clients rebase unconfirmed local steps.
  2. Strictly Separate Shared Document CRDT from Ephemeral Awareness:
    • Shared Document (Y.Doc / Y.XmlFragment / Y.Map): Stores persistent blocks, text, marks, and canvas shapes.
    • Ephemeral Presence (Awareness protocol): Stores live cursor coordinates, text selection ranges, active user name/color, and viewport focus. Never write cursor movements or hover states into the persistent CRDT document, which would bloat history and storage permanently.

Local-Scoped Undo/Redo & Relative Cursors

  • User-Scoped Collaborative UndoManager:
    • In collaborative sessions, disable the single-user history plugin and use the CRDT's local-origin UndoManager (trackedOrigins) so pressing Cmd/Ctrl+Z undoes only the local user's own operations, never reverting a teammate's concurrent edits.
  • Relative Positions for Selections and Anchors:
    • Represent comments, annotations, and remote cursors using CRDT Relative Positions (Y.RelativePosition) rather than raw integer indices so anchors stay attached to the intended text/block when remote peers insert or delete content above them.
  • Reconnection, Initial Sync & Authorization:
    • Gate document room access and write vs. read/comment-only permissions on the server before accepting CRDT updates, and handle offline buffering and reconnection merge cleanly without duplicating initial template content.

Checklist

  • Is real-time sync backed by a proper CRDT/OT binding rather than whole-document WebSocket overwrites?
  • Are live cursors and selections broadcast via ephemeral Awareness rather than persisted in the document CRDT?
  • Is UndoManager scoped to local user origins so Undo never reverts another collaborator's edits?
  • Are initial template seeding and reconnect merges idempotent so two users opening a new doc do not duplicate initial blocks?

Csomagban lévő fájlok 1

  • SKILL.md

A skillcsomag bemutatása

collaborative-editing-integration

collaborative-editing-integration: Egységes dokumentummodellel, kijelöléssel, visszavonással, automatikus mentéssel és megbízható szerializálással épít vizuális és szövegszerkesztőket.

Részletek…Összecsukás

collaborative-editing-integration

collaborative-editing-integration: Egységes dokumentummodellel, kijelöléssel, visszavonással, automatikus mentéssel és megbízható szerializálással épít vizuális és szövegszerkesztőket.

A teljes skillt és a hozzá tartozó fájlokat tartalmazza (1 fájl). Az alábbi eredeti leírás rögzíti a pontos alkalmazási területét.

A skill eredeti leírása (a forrás nyelvén)

Use when integrating CRDT or OT real-time collaboration (Yjs, Automerge, ProseMirror collab), separating ephemeral presence awareness from document state, and scoping undo/redo to the local user.

Telepítsd a skillt, nézd át a forrását és a megbízhatósági beállításait, majd engedélyezd a megfelelő projektben vagy ügynöknél.

Előfeltételek

  • A számítógépedre telepített Orqestria.