Skip to content

fix(behavior-tests): unblock main by fixing 3 failing specs#2785

Merged
caio-pizzol merged 2 commits intomainfrom
caio/fix-behavior-tests-main
Apr 12, 2026
Merged

fix(behavior-tests): unblock main by fixing 3 failing specs#2785
caio-pizzol merged 2 commits intomainfrom
caio/fix-behavior-tests-main

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol commented Apr 12, 2026

f

…l in extract.spec

- Line 40: removed superdoc.click() — the method doesn't exist on the fixture
  and the fixture already focuses the editor on setup.
- Line 95: replaceText expects a SelectionTarget; findFirstTextRange returns a
  TextAddress, which fails doc.replace() validation. Switch to
  findFirstSelectionTarget.
…nd mark removal

The SD-2517 lost-keys preservation was re-applying values from
runNode.attrs.runProperties whenever a key in runPropertiesInlineKeys
dropped out of the computed inline props. Two scenarios left stale
values in place:

1. Track-change accept/reject: the restored marks are canonical but
   runNode.runProperties still reflects the pre-resolution (suggested)
   state, so preservation re-injected the rejected fontFamily/color/etc.
2. User toggles a standalone mark off (bold, italic, underline): the
   removed mark's value stayed in the run node's runProperties and
   preservation brought it back, causing new paragraphs created via
   Enter to inherit stale formatting (SD-2228).

Skip preservation during 'acceptReject' transactions, and skip per-key
when the transaction batch contains a RemoveMarkStep for that mark
type. The SD-2517 heading round-trip case is unaffected (no mark
changes occur during zero-edit import → export).
@caio-pizzol caio-pizzol enabled auto-merge April 12, 2026 14:55
@caio-pizzol caio-pizzol added this pull request to the merge queue Apr 12, 2026
Copy link
Copy Markdown

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

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: b75395df00

ℹ️ 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".

//
// Skip entirely during accept/reject: the restored marks are canonical, and
// existing run.runProperties still reflect the pre-resolution (suggested) state.
if (hadInlineKeys && !isAcceptReject) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve unaffected inline keys during accept/reject

The new !isAcceptReject guard disables lost-key preservation for all inline keys whenever any accept/reject transaction runs, not just for keys that are actually stale from suggestion marks. In imported docs where explicit w:rPr keys can be dropped by style-equivalence comparison, accepting/rejecting a change now strips those keys from runProperties; exporter logic only writes keys that still exist in runProperties, so the original explicit formatting can be lost on round-trip export.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — narrowing the check so it only skips fields that were actually part of the removed marks, not all of them. Follow-up PR incoming.

Merged via the queue into main with commit 4537381 Apr 12, 2026
54 checks passed
@caio-pizzol caio-pizzol deleted the caio/fix-behavior-tests-main branch April 12, 2026 15:00
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot bot commented Apr 12, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.2

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot bot commented Apr 12, 2026

🎉 This PR is included in template-builder v1.5.0-next.2

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot bot commented Apr 12, 2026

🎉 This PR is included in @superdoc-dev/react v1.1.1-next.2

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot bot commented Apr 12, 2026

🎉 This PR is included in esign v2.3.0-next.2

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot bot commented Apr 12, 2026

🎉 This PR is included in superdoc v1.26.0-next.2

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot bot commented Apr 12, 2026

🎉 This PR is included in superdoc-cli v0.7.0-next.2

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot bot commented Apr 12, 2026

🎉 This PR is included in superdoc-sdk v1.5.1-next.2

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.

2 participants