Repository navigation
Drop Unused @kerebron/extension-automerge Dependency - #550
Merged
Merged
Conversation
🗑️ Preview Environment Cleaned UpThe preview container for this PR has been deleted. |
The app never imported it: a repo-wide grep for "automerge" outside node_modules hits only the package.json line itself. It is not a peer dependency @mieweb/ui asks for either — it wants editor, editor-kits, extension-yjs and wasm — and it sat pinned at 0.2.1 while the rest of the kerebron stack moved to 0.8.9, which reads like a leftover from an experiment that concluded in favour of Yjs. Removing it prunes @automerge/automerge 2.2.4, @automerge/automerge-repo 1.1.9 and their trees (cbor-x, bs58, xstate, prosemirror-keymap and the six @cbor-extract native builds) — 285 lines out of the lockfile. prosemirror-keymap and xstate were reachable only through this package; prosemirror-model and uuid stay, resolved at top level. Carried forward from #475, which is otherwise obsolete: the tarball and vendor/ui submodule it targeted were removed in 8ea7377.
Dharp02
force-pushed
the
chore/drop-unused-automerge-dep
branch
from
September 21, 2026 16:58
0d804b8 to
1e3e3fe
Compare
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.
Overview
@kerebron/extension-automergeis declared inpackage.jsonbut nothing in the repo uses it. This removes it and the ~20 transitive packages that came with it. No application code changes.Carried forward from #475, which is otherwise obsolete — the
vendor/mieweb-ui.tgztarball andvendor/uisubmodule that PR targeted were removed in 8ea7377, and@mieweb/uinow resolves^0.7.3from the public registry. This was the one live item left in it.Is this related to co-editing being switched off? No — but here is why that question comes up
Live co-editing is currently disabled in the app, and this PR deletes a package with "collaborative editing" written all over it. Those two facts are unrelated, and it is worth being explicit about that so nobody reads this as part of the outage or part of the fix.
There are two different collaborative-editing libraries. Automerge and Yjs solve the same problem — two people typing in one document, both seeing each other's keystrokes — using different underlying algorithms. They are alternatives, not layers. You pick one.
This project picked Yjs. That choice is visible throughout:
@kerebron/extension-yjs,yjsandy-protocolsinpackage.json, the/yjsrelay inmeteor-backend,collabRoomon the composer,tests/e2e/huddle/yjs-collab-editing.spec.ts. Automerge was evaluated at some point and not chosen. Nobody removed the dependency line afterwards, so it has been installed on everynpm installand CI run since, feeding nothing. That is what this PR deletes — the un-chosen option, which no code has ever imported.Why co-editing is off is a Yjs problem, entirely separate. In
RichEditor, passing acollabprop makes the component lazy-load a chunk containing the Yjs pieces, deliberately, so they stay optional peers. If that import rejects, the rejection escapes into a handler that only logs it,CoreEditor.create()is never reached, and no editor is created at all. TimeHuddle passescollabonly when editing an existing post, so "Edit post" opened to an empty 18px strip with no toolbar while writing a new post worked perfectly — the same component behaving oppositely depending on one prop. #547 shipped the stopgap: detect the editor that never appeared, remount withoutcollab. That trades live co-editing for an editor that opens, which is the right trade, but it is a workaround, not a fix.The real fix is upstream in mieweb/ui#480, which makes the library fall back to a local editor when the collaborative kit fails instead of failing to mount anything, and tells the host through a new
onUnavailablecallback. When that lands and ships, #547 comes out and co-editing goes back on.So: removing Automerge does not affect co-editing, because no code path has ever touched it. Restoring co-editing does not need Automerge, because the app's collaboration runs on Yjs. And nothing upstream needs changing for this PR —
mieweb/ui's ownpackage.jsoncontains no reference to Automerge anywhere, in any dependency block.The four PRs, in one place:
@mieweb/uitarball upgrade that first spotted the unused dependencyOnly #547 and mieweb/ui#480 are about the outage. This PR is housekeeping that happened to surface alongside them.
Current State
@kerebron/extension-automergeis pinned at^0.2.1while the rest of the kerebron stack is on^0.8.9— it reads like a leftover from an experiment that concluded in favour of Yjs.automergeoutsidenode_moduleshits exactly one line: thepackage.jsonentry itself.@mieweb/uiasks for. Its kerebron peers areeditor,editor-kits,extension-yjsandwasm.@kerebron/extension-yjs,yjs,y-protocols), which is untouched here.Proposed Changes
@kerebron/extension-automergefrompackage.jsondependencies.package-lock.json— 17 insertions, 285 deletions. Pruned:@automerge/automerge2.2.4 and@automerge/automerge-repo1.1.9cbor-x,cbor-extractand its six@cbor-extract/*platform binariesbs58,bs58check,base-x,@noble/hashes,fast-sha256,tiny-typed-emitter,node-gyp-build-optional-packagesxstateandprosemirror-keymap, which were reachable only through this package (xstatevia@automerge/automerge-repo,prosemirror-keymapvia@kerebron/extension-automergeitself)prosemirror-modelanduuidlost only their nested copies; both still resolve at top level (1.25.9 and 7.0.3). Neitherprosemirror-keymapnorxstateis imported anywhere insrc/,meteor-backend/,packages/ortests/.Acceptance Criteria
npm run typecheckpassesnpm run lintpassesnpm run formatcleannpm run test:unit— 149/149 across 16 filesnpm run buildsucceeds (remaining warnings are pre-existing:onnxruntime-webdirecteval, ineffective dynamic imports)automerge,prosemirror-keymaporxstateOut of Scope (for Now)
tests/e2e/huddle/yjs-collab-editing.spec.tscovers that path and is not modified here.@kerebron/extension-codecrock. Installed transitively viaeditor-kits, unpatched, with a known production-buildIllegal invocationcrash upstream. Pre-existing and unrelated to this change — see the Kerebron 0.8.12 note in #520.