Make Content commenting responsive and preserve review context - #4376
Draft
3mdistal wants to merge 1 commit into
Draft
Make Content commenting responsive and preserve review context#43763mdistal wants to merge 1 commit into
3mdistal wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.