fix(plugin-sdk-value): drop remote normalize-merge mutation echoes#3000
fix(plugin-sdk-value): drop remote normalize-merge mutation echoes#3000ryanbonial wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
📦 Bundle Stats —
|
| Metric | Value | vs main (11d72d0) |
|---|---|---|
| Internal (raw) | 806.6 KB | - |
| Internal (gzip) | 154.9 KB | - |
| Bundled (raw) | 1.42 MB | - |
| Bundled (gzip) | 319.2 KB | - |
| Import time | 90ms | +0ms, +0.5% |
@portabletext/editor/behaviors
| Metric | Value | vs main (11d72d0) |
|---|---|---|
| Internal (raw) | 467 B | - |
| Internal (gzip) | 207 B | - |
| Bundled (raw) | 424 B | - |
| Bundled (gzip) | 171 B | - |
| Import time | 2ms | +0ms, +3.1% |
@portabletext/editor/plugins
| Metric | Value | vs main (11d72d0) |
|---|---|---|
| Internal (raw) | 2.7 KB | - |
| Internal (gzip) | 894 B | - |
| Bundled (raw) | 2.5 KB | - |
| Bundled (gzip) | 827 B | - |
| Import time | 7ms | +0ms, +1.1% |
@portabletext/editor/selectors
| Metric | Value | vs main (11d72d0) |
|---|---|---|
| Internal (raw) | 82.7 KB | - |
| Internal (gzip) | 15.4 KB | - |
| Bundled (raw) | 78.4 KB | - |
| Bundled (gzip) | 14.3 KB | - |
| Import time | 7ms | -0ms, -1.0% |
@portabletext/editor/traversal
| Metric | Value | vs main (11d72d0) |
|---|---|---|
| Internal (raw) | 28.1 KB | - |
| Internal (gzip) | 5.6 KB | - |
| Bundled (raw) | 28.1 KB | - |
| Bundled (gzip) | 5.5 KB | - |
| Import time | 6ms | +0ms, +0.6% |
@portabletext/editor/utils
| Metric | Value | vs main (11d72d0) |
|---|---|---|
| Internal (raw) | 30.6 KB | - |
| Internal (gzip) | 6.4 KB | - |
| Bundled (raw) | 28.2 KB | - |
| Bundled (gzip) | 6.1 KB | - |
| Import time | 6ms | -0ms, -0.6% |
🗺️ . · ./behaviors · ./plugins · ./selectors · ./traversal · ./utils · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @portabletext/markdown
Compared against main (11d72d02)
| Metric | Value | vs main (11d72d0) |
|---|---|---|
| Internal (raw) | 53.8 KB | - |
| Internal (gzip) | 9.8 KB | - |
| Bundled (raw) | 348.9 KB | - |
| Bundled (gzip) | 96.3 KB | - |
| Import time | 35ms | -2ms, -5.5% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
Confirmation vs #3001 /
|
| Cell | Result |
|---|---|
duo-typing.mjs format |
4/4 SAFE (first run); confirming second run |
| Completed trials MANGLED | 0 |
Plugin contains remoteApplyEchoGate |
No (7.1.3) |
Agreed with the #3001 rationale: skipping cosmetic normalize on remote apply removes the echo at the source, so this plugin push gate has nothing left to drop. Keeping a local-only merge would still fork span structure from the store.
Recommendation: close this draft as superseded by #3001. Residual roadmap work (paste counts, same-block scramble, overlapping-format SILENT-LOSS) is separate and does not need this branch.
Description
Receiving editors were pushing their own normalize fallout after applying a collaborator's formatting (adjacent same-mark span merges). Those competing merges truncated or duplicated text on the originator's block under concurrent edit (Axios format-while-peer-types).
Studio FormBuilder does not show this class for the same gesture; the SDK plugin path does because it eagerly pushes every mutation flush. This change arms a short gate after remote apply and drops a flush only when its patches look like a normalize merge (
unsetof a keyedchildrenmember plus textdiffMatchPatch/set). Ordinary typing flushes are unaffected.Supersedes the approach in #2999 (core
withoutPatchingnesting), which broke self-solving tests. Prefer fixing at the plugin push boundary.Not in scope: paste-count loss, same-block typing scramble, overlapping-format SILENT-LOSS. Those remain a separate roadmap; Phase 0 research will decide whether follow-ups branch from this PR or from
main.What to review
packages/plugin-sdk-value/src/plugin.sdk-value.tsx:remoteApplyEchoGate/isNormalizeMergeEcho/ drop inlistenToEditorpackages/plugin-sdk-value/src/plugin.value-sync.browser.test.tsx: echo not pushed; unpushed typing still pushed after remote normalizeTesting
pte-sdk-concurrent-reproon local plugin build):duo-typing.mjs format: block A text integrity restored vs released (released still mangled)duo-typing.mjs blocks/solo-typing.mjs: green after shape-based gate (value-equality gate had caused blocks scramble; fixed before this PR)Notes for release
Customer-facing: concurrent bold/format while another user types in another block should no longer scramble the formatted block's text via competing normalize merges when using
@portabletext/plugin-sdk-value.