Skip to main content

Module comment

Module comment 

Source
Expand description

Inline comments on the page editor.

Editors can leave a per-field comment thread on any page they’re editing — TODO: confirm date with marketing on the body field, a reviewer reply, a resolve action when the concern is addressed.

Each comment is anchored to a field (field_path) and surfaces in the editor’s side panel, with a reply-thread API.

§Shape

  • One Comment row per thread root (pinned to a field_path)
  • N CommentReply rows per thread (chronological)
  • Threads resolve at the root via Comment.resolved_at

§Field-path shape

Same shape cms_translation.field_path uses — dotted path into a page’s scalar columns or its StreamField blocks. Examples: title, body.<block-uuid>.heading, seo_description. Resilient to field renames at the StreamField level (block UUIDs survive); scalar renames invalidate the thread until manually moved.

Structs§

Comment
CommentReply

Functions§

replies_for_threads
Fetch every reply for a list of thread ids in one query, then bucket per thread. Returns comment_id → Vec<replies>.
threads_for_page
Fetch every open + resolved thread for a page, in newest-first order. The side panel filters resolved threads to a separate “Resolved” bucket client-side.