Skip to content

Properly separate ydoc-sync from custom comm messages #31

Description

@arjxn-py

In yCommProvider, _onMsg treats any message with binary buffers as a ydoc sync message and everything else as a custom message. This is unfortunate, as we wouldn't be able to send custom comm messages that contain binary buffers — they'd be trapped here and processed as ydoc sync messages.

For now this is fine, since we're only partially supporting custom comms. But we should consider a breaking change in both ypywidgets and yjs-widgets to properly define a comm protocol with ydoc sync messages properly separated, e.g. branching on msg.type === 'ydoc-sync' instead of the buffers check.

Originally raised by @martinRenou in #30 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions