Expose comm and custom messages on the widget model#30
Merged
Conversation
martinRenou
reviewed
Jul 15, 2026
|
|
||
| private _onMsg = (msg: KernelMessage.ICommMsgMsg<'iopub' | 'shell'>) => { | ||
| if (msg.buffers) { | ||
| if (msg.buffers && msg.buffers.length > 0) { |
Member
There was a problem hiding this comment.
This condition is unfortunate, as we wouldn't be able to send custom comm messages that contain binary buffers. They would be trapped in here and processed as ydoc sync messages.
I think for now this is fine as we're only providing a new feature to partially support custom comms, but we should consider making a breaking change in both ypywidgets and yjs-widgets to properly define a comm protocol with ydoc sync messages properly separated.
I'm thinking something like
Suggested change
| if (msg.buffers && msg.buffers.length > 0) { | |
| if (msg.type === 'ydoc-sync') { |
Let's track that in an issue and resolve later.
martinRenou
approved these changes
Jul 15, 2026
martinRenou
left a comment
Member
There was a problem hiding this comment.
Thanks! I think this is looking good
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.
No description provided.