Skip to content

fix(docx-core): preserve merge-source commentsIds entries #471

Description

@stevenobiajulu

Summary

Neither reconstruction mode currently merges the merge-source side's commentsIds.xml entries into the comparison result. Merged-in comments therefore lose durable comment IDs; Word can regenerate them, so this is cosmetic, but the output drops existing durable-ID metadata from the source document.

Found during peer review follow-up for #448 / #465.

Expected behavior

When comments are merged from the source side into the result, their matching commentsIds.xml rows should be carried forward or regenerated consistently so merged comments retain durable IDs.

Reproduction

  1. Create a DOCX with comments and a word/commentsIds.xml part containing w16cid:commentId rows for those comment paragraph paraIds.
  2. Use it as the merge-source side in a comparison path that reconstructs comments into the result.
  3. Inspect the resulting DOCX package.
  4. Observe that commentsIds.xml entries from the merge-source side are absent, so the merged comments no longer have durable IDs until Word regenerates them.

Affected package: packages/docx-core

ECMA-376 / OOXML impact

This concerns the Microsoft Word commentsIds.xml extension part ([MS-DOCX]) rather than ECMA-376 conformance-covered behavior. The impact is loss of Word durable-ID metadata for merged comments.

Logs or artifacts

Ref: #448
Ref: #465

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions