Skip to content

Make Content commenting responsive and preserve review context - #4376

Draft
3mdistal wants to merge 1 commit into
mainfrom
codex/content-comments-polish
Draft

Make Content commenting responsive and preserve review context#4376
3mdistal wants to merge 1 commit into
mainfrom
codex/content-comments-polish

Conversation

@3mdistal

@3mdistal 3mdistal commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

Content reviewers could lose an unfinished reply by dismissing or switching a thread, and common comment actions waited for a refresh before looking complete. Resolving a thread also made its conversation difficult to inspect, while author editing was hard to discover. Together these interruptions made the review loop feel unreliable.

Approach

Keep drafts for the mounted document session and show each comment action immediately with a visible pending state. SQL and the existing shared Actions remain authoritative: successful writes reconcile to their saved rows, failures retain usable input, and a lost create response requires reconciliation before another submission.

Changes

  • Preserve reply, anchored-comment, edit and mention drafts across panel dismissal, thread selection and responsive presentation changes. A completed submission clears only the submitted revision; explicit discard remains available.
  • Add document-scoped optimistic create/edit/resolve/reopen updates. Rollback belongs to the failing operation, so an older failure cannot overwrite a later success. A uniquely matched saved create displays once while retaining its pending or ambiguous status.
  • Expose own-comment Edit/Save/Cancel through the existing permission-checked action, including mention metadata updates. Author matching follows the same case-insensitive identity rule in the UI and action.
  • Keep desktop history and selected context together. Narrow views provide Back navigation; resolved conversations remain readable with a visible Reopen control. Reply counts and true empty-list guidance distinguish an empty document from filtered results.
  • Resize multiline titles when their available width changes. Update all configured Content locales and narrowly document the covered product behavior.

Verification

133 focused behavioral tests pass and cover draft lifetime and revision safety, raw-query reconciliation, delayed and failed mutations, overlapping edits/resolution, anchor ownership and commenter/editor/viewer access. Content typecheck, repository guards (including localization), and product-impact checks pass.

Real-browser checks used a synthetic page in an isolated local database. The lifecycle included creating an anchored comment, two replies, root/reply editing, cancel/save, resolve, full history, reopen and reload. Resized desktop-browser checks cover 1280×800, 768×1024, 390×844 and the 767/769 breakpoint. Independent Action read-back checked the saved IDs, text and resolution state. Authenticated shared Action changes reached two untouched tabs while a dirty edit remained intact.

Failure injection exercised five-second delays, rejected edits and resolution changes, and a response lost after persistence. Technical review found and repaired superseded-operation and author-identity issues; later live QA also repaired temporary-row duplication and stale reconciliation status.

Thirty warm local samples (10 per operation) showed median pending feedback of 35.6ms for replies, 31.4ms for resolve, and 48.5ms for reopen; all were below 100ms. The complete trace contained 10 comment creates, 20 updates and 30 comment-list reads, with no unrelated Action reads. The synthetic fixture was trashed and its URL and Action read-back both became unavailable. All 69 repository guards and 30 product-impact tests pass. These measurements do not establish production latency or explain the previously observed slow server response. There are no schema or shared-core changes, and drafts intentionally end on document-session teardown. Physical touch devices, notification delivery, deleted-anchor history and embeds remain outside this change. The Content changelog command was attempted but is disabled by the app's current configuration.

Review focus

Review operation ownership during overlapping writes, ambiguous-create reconciliation, and draft clearing when newer text exists. Also check that own-edit controls preserve the existing server permission boundary and narrow history navigation retains context.

@netlify

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant