Skip to content

feat: added skippedOrigins option#2

Merged
unadlib merged 1 commit into
mutativejs:mainfrom
LuckyOneDev:main
May 11, 2026
Merged

feat: added skippedOrigins option#2
unadlib merged 1 commit into
mutativejs:mainfrom
LuckyOneDev:main

Conversation

@LuckyOneDev
Copy link
Copy Markdown
Contributor

@LuckyOneDev LuckyOneDev commented Apr 14, 2026

This option is needed in cases where you want to track custom transaction origin when using mutative-yjs to update doc. For example:

    this.undoManager = new Y.UndoManager(scope, {
      trackedOrigins: new Set([MY_ORIGIN]),
      captureTimeout: 1000,
    });

Proposed syntax:

    const binder = bind(ydoc.getMap(), {
      skippedOrigins: [MY_ORIGIN],
    });

@unadlib
Copy link
Copy Markdown
Member

unadlib commented May 11, 2026

Since this PR has been delayed, I'll merge it first and address the necessary fixes in a follow-up.

@unadlib unadlib merged commit 28e0da4 into mutativejs:main May 11, 2026
@unadlib
Copy link
Copy Markdown
Member

unadlib commented May 11, 2026

hi @LuckyOneDev, thanks for the PR and for explaining the Y.UndoManager.trackedOrigins use case.

I merged this and added some follow-up fixes around nested transactions, multi-binder sync, structural sharing, and Set support for skippedOrigins.

This is now released in mutative-yjs@0.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants