You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: fail when the email editor would load two copies of a ProseMirror core package - #515
The bug: from Oct 26 to Nov 16 2026, typing in the email editor did nothing. Keys moved the cursor, but no text was added or deleted, and nothing was saved. A customer reported it through in-app feedback on Nov 3.
Cause:#470 overrode prosemirror-view to 1.42.6 for an advisory. Its copy of prosemirror-model (1.25.12) differed from the one @tiptap/pm 2.27.2 used (1.25.10), so the bundle shipped two copies.
ProseMirror's view and model must be the same copy. Otherwise each DOM change fails with "Can not convert <…> to a Fragment (looks like multiple versions of prosemirror-model were loaded)" and is discarded.
Already fixed in production by #513, which moved Tiptap to 2.27.3. That unified everything on prosemirror-model 1.25.12.
Verified in Chromium with the real @usesend/email-editor component, built from apps/web's dependencies. Typing " world" after "Hello", then Backspace twice:
The production Next build from the new lockfile contains one copy of prosemirror-model.
This PR adds a unit test that fails if the lockfile ever installs more than one version of prosemirror-model, -state, -transform or -view. So a future override or upgrade can't silently break the editor again.
It fails on the old lockfile, flagging prosemirror-model, and passes on main.
Verified: typecheck; unit 348; pnpm build:editor && pnpm build:web (29/29).
Note: the self-hosted images v1.10.0–v1.10.3 all contain the broken lockfile, so self-hosters need a new release.
Ask Polylane for an impact assessment of this pull request:
Summary by cubic
Adds a regression test that fails if the lockfile ever resolves more than one version of a ProseMirror core package.
Duplicate copies of prosemirror-model silently broke typing in the email editor from Oct 26 to Nov 16 2026: the cursor moved but no text was added or saved. The fix shipped in #513; this test guards prosemirror-model, prosemirror-state, prosemirror-transform, and prosemirror-view so a future override or upgrade fails the build instead of regressing the editor.
Rollout
Self-hosted images v1.10.0–v1.10.3 contain the broken lockfile and need a new release.
Written for commit c877a81. Summary will update on new commits.
Summary by CodeRabbit
Tests
Added an automated check that verifies the lockfile contains exactly one version of each of four ProseMirror packages.
The check helps flag inconsistent package versions during testing.
No actionable comments were generated in the recent review.
Walkthrough
The change adds a Vitest test that reads pnpm-lock.yaml and checks that prosemirror-model, prosemirror-state, prosemirror-transform, and prosemirror-view each have exactly one matching package version. A comment describes a prior duplicate-ProseMirror issue and suggests aligning versions if the test fails.
Change: Other
Merge Risk: Minimal · up to c877a
This change adds a test that guards against duplicate ProseMirror core packages in the lockfile. It does not alter runtime behavior, and no actionable merge risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: a new unit test that fails when the lockfile would install two copies of a ProseMirror core package (model, state, transform, or view). The raw summary confirms the ad…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a new unit test that fails when the lockfile would install two copies of a ProseMirror core package (model, state, transform, or view). The raw summary confirms the added test checks exactly one version per package. The title is specific and matches the changeset, so it passes.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
ESLint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
apps/web/src/editor-dependencies.unit.test.ts
ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: c32cff29-dead-490c-b865-d38a81112bda
Commits
Reviewing files that changed from the base of the PR and between 74c195d and c877a81.
Files selected for processing: 1
apps/web/src/editor-dependencies.unit.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
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
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.
The bug: from Oct 26 to Nov 16 2026, typing in the email editor did nothing. Keys moved the cursor, but no text was added or deleted, and nothing was saved. A customer reported it through in-app feedback on Nov 3.
Cause: #470 overrode
prosemirror-viewto 1.42.6 for an advisory. Its copy ofprosemirror-model(1.25.12) differed from the one@tiptap/pm2.27.2 used (1.25.10), so the bundle shipped two copies.Already fixed in production by #513, which moved Tiptap to 2.27.3. That unified everything on prosemirror-model 1.25.12.
Verified in Chromium with the real
@usesend/email-editorcomponent, built fromapps/web's dependencies. Typing " world" after "Hello", then Backspace twice:HelloHello worThe production Next build from the new lockfile contains one copy of prosemirror-model.
This PR adds a unit test that fails if the lockfile ever installs more than one version of
prosemirror-model,-state,-transformor-view. So a future override or upgrade can't silently break the editor again.prosemirror-model, and passes on main.Verified: typecheck; unit 348;
pnpm build:editor && pnpm build:web(29/29).Note: the self-hosted images v1.10.0–v1.10.3 all contain the broken lockfile, so self-hosters need a new release.
Ask Polylane for an impact assessment of this pull request:
Summary by cubic
Adds a regression test that fails if the lockfile ever resolves more than one version of a ProseMirror core package.
Duplicate copies of
prosemirror-modelsilently broke typing in the email editor from Oct 26 to Nov 16 2026: the cursor moved but no text was added or saved. The fix shipped in #513; this test guardsprosemirror-model,prosemirror-state,prosemirror-transform, andprosemirror-viewso a future override or upgrade fails the build instead of regressing the editor.Rollout
Written for commit c877a81. Summary will update on new commits.
Summary by CodeRabbit