Skip to content

feat: parts system UI mutations and tracked changes#2889

Open
harbournick wants to merge 12 commits intomainfrom
nick/parts-system-ui-mutations
Open

feat: parts system UI mutations and tracked changes#2889
harbournick wants to merge 12 commits intomainfrom
nick/parts-system-ui-mutations

Conversation

@harbournick
Copy link
Copy Markdown
Collaborator

No description provided.

@harbournick harbournick self-assigned this Apr 22, 2026
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 22, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
SuperDoc 🟢 Ready View Preview Apr 22, 2026, 12:15 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@github-actions
Copy link
Copy Markdown
Contributor

Status: PASS

The seven files handle w:del and w:ins correctly against the OOXML spec.


w:id (required attribute) — correctly handled

Both w:del (§17.13.5.14) and w:ins (§17.13.5.18) require w:id. The translators read it as encodedAttrs.id before the remap, use it as the lookup key, and store it in sourceId for round-trip fidelity. The attribute is never silently dropped — if the remap map doesn't have it, the original value passes through unchanged. Good.

w:author and w:date — correctly treated as optional

Both are optional per spec. The translators don't fabricate them or enforce their presence, which is correct behavior.

Per-part w:id isolation — spec-compatible

The spec says IDs should be "unique within a WordprocessingML document," but doesn't explicitly define whether the package's header, footer, footnote, and endnote parts share a single ID namespace or each maintain their own. Real-world DOCX files routinely reuse the same numeric IDs across parts (Word itself does this), so per-part maps in buildTrackedChangeIdMapsByPart are both practically correct and spec-compatible. The fallback chain (trackedChangeIdMapsByPart[partPath]trackedChangeIdMap → null) degrades safely for any part not explicitly listed.

No invented attributes

Neither translator introduces attributes outside the spec. The sourceId field is an internal ProseMirror node attribute, not written back to OOXML on export — so it's not a spec concern.

One thing to watch

The partPath construction in both translators does word/${filename} — so filename is expected to be the bare part name (e.g., header1.xml), not the full path. This works as long as callers consistently pass the bare name. If any call site ever passes a full word/header1.xml path as filename, you'd get word/word/header1.xml and the map lookup would silently miss. Worth a comment or an assertion at the construction site.

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: 75f7999850

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.10298% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...doc/src/components/CommentsLayer/CommentDialog.vue 92.30% 4 Missing ⚠️
packages/superdoc/src/stores/comments-store.js 99.28% 2 Missing ⚠️
packages/superdoc/src/SuperDoc.vue 90.90% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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