fix(super-editor): keep editing-mode typing inside tracked changes plain [SD-3502]#3771
Conversation
…ain [SD-3502] Cherry-pick of the editing-mode direct-edit fix to stable. A collapsed insertion strictly inside another user's tracked insertion or deletion (track changes off) now stays plain text and splits the existing suggestion, instead of being recorded as a tracked change. Includes the slice.size mark-cleanup fix plus unit and export tests. The original commit's apps/cli/src/lib/context.ts formatting hunk was intentionally omitted: stable's version differs (it carries ACCEPTED_RUNTIME_VALUES) and is already prettier-clean, so the hunk does not apply and is unrelated to the fix. (cherry picked from commit 71fb047)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0fb579cb79
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
… keep pasted review marks The editing-mode mark cleanup used removeMark by TYPE across the whole inserted range, so pasting a SuperDoc slice that already carries trackInsert/trackDelete into the interior of another suggestion silently dropped the pasted review marks (and exported them as plain text). Strip only the specific ENCLOSING mark instances inherited from the neighbour (matched by type + attrs); marks the pasted slice carries in (a different review id) are preserved. Adds a paste-with-marks regression. Addresses review on PR #3771.
|
🎉 This PR is included in superdoc-cli v0.20.1 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.19.1 |
|
🎉 This PR is included in @superdoc-dev/mcp v0.15.1 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.43.1 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/react v1.14.1 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.15.1 |
Backports the editing-mode direct-edit fix to stable. With track changes off (editing mode), typing a character inside another user's tracked insertion or deletion was recorded as a tracked change, so a new suggestion appeared even though suggestions were off. A collapsed insertion strictly inside a tracked span now stays plain text and splits the existing suggestion around it - no new review item, no silent expansion. The deliberate collab guard that protects existing review state is only narrowed for pure insertions (which destroy nothing); delete, replace, and tracking-on behavior are unchanged.
Cherry-pick of 71fb047 (merged to main). The mark-cleanup range uses the inserted size (slice.size, what ProseMirror maps the insert to), and unit + export tests are included. The original commit's apps/cli/src/lib/context.ts formatting hunk was intentionally dropped: stable's version differs and is already prettier-clean, so it does not apply and is unrelated to the fix.
Verified: the same change is green on main CI (super-editor unit shards, behavior browser shards, build, format); stable CI on this PR is the gate here.