Skip to main content

Module inline_comment

Module inline_comment 

Source
Expand description

Inline-comment drift auditing and re-anchoring for Confluence pages.

Confluence inline comments are anchored to a run of characters in the page ADF via an annotation mark carrying an id. When the underlying text is edited, Confluence keeps the mark on whatever original characters survive — it does not follow the meaning of the annotated text. Substantive rewrites therefore leave inline comments “torn” across disjoint fragments, slid onto unrelated text, or dropped entirely.

This module provides:

  • audit_inline_comments — read-only: for every inline comment on a page, compare the text currently bearing its annotation mark against the reviewer’s original highlight (inlineOriginalSelection, stored durably on the comment) and classify the drift (DriftStatus).
  • reanchor_inline_comment — write: move a comment’s annotation mark to a new run in the current-version ADF and PUT the page back in one update.

Both operate directly on the typed ADF (atlas_doc_format) — never via JFM, which would lose the mark structure the anchor depends on.

Structs§

CommentDrift
Per-comment drift report produced by audit_inline_comments.
ReanchorOutcome
Result of a successful reanchor_inline_comment call.

Enums§

DriftStatus
How an inline comment’s anchor relates to the reviewer’s original highlight.

Functions§

audit_inline_comments
Audits every inline comment on page_id for anchor drift.
reanchor_inline_comment
Moves the annotation mark of inline comment comment_id to a new run of text (anchor_text) in the current-version ADF and writes the page back.