Skip to content

fix(super-editor): keep editing-mode typing inside tracked changes plain [SD-3502]#3771

Merged
caio-pizzol merged 2 commits into
stablefrom
caio-pizzol/cherry-pick-sd-3502-stable
Jun 24, 2026
Merged

fix(super-editor): keep editing-mode typing inside tracked changes plain [SD-3502]#3771
caio-pizzol merged 2 commits into
stablefrom
caio-pizzol/cherry-pick-sd-3502-stable

Conversation

@caio-pizzol

Copy link
Copy Markdown
Contributor

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.

…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)
@caio-pizzol caio-pizzol requested a review from a team as a code owner June 24, 2026 11:56
@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

SD-3502

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/super-editor/src/editors/v1/core/Editor.ts Outdated
@codecov-commenter

Copy link
Copy Markdown

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.
@caio-pizzol caio-pizzol self-assigned this Jun 24, 2026
@caio-pizzol caio-pizzol merged commit 500b970 into stable Jun 24, 2026
53 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/cherry-pick-sd-3502-stable branch June 24, 2026 14:02
@superdoc-bot

superdoc-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in superdoc-cli v0.20.1

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in superdoc-sdk v1.19.1

@superdoc-bot

superdoc-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in @superdoc-dev/mcp v0.15.1

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in superdoc v1.43.1

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in @superdoc-dev/react v1.14.1

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in vscode-ext v2.15.1

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants