Repository navigation
feat(guides): global comments on Guided Reviews - #2584
Merged
Merged
Conversation
A comment on the whole review, not a line or a file, in every guide host that takes comments: the Inbox's guide reader and the review app's guided review. - guide-viewer: GuideHostValue.globalComments. GuideView draws the "Global comment" button (the document viewer's words and globe) beside the header actions, and the comments under the header, before the first section. Hosts without it (guides.show, VS Code) draw nothing new. - Inbox: the reader opens ui's CommentPopover (isGlobal, a draft per guide) and saves the review app's general comment (scope general, ''/0/0) through the guide annotation route. The store accepts it (words, no file) with guide.scope general; the panel card reads Global; the thread's list tags it global under the guide's title. They count and ride Send first, under ## Global comments. - Review app: the guide's button commits through the sidebar's handler, so it flips Approve to Send Feedback like a line comment. One name: the sidebar's + General comment becomes + Global comment, and the export's ## General section becomes ## Global comments, written before the files. Tests: guideFeedback (order, count, equality with the review app's export), inbox-guide-comments (store, restart, Send), exportFeedback (order), App.guideGlobalComment (DOM: button, flip, posted body), GuideView (seam).
# Conflicts: # tests/dom-test-list.txt
…dict to Send Feedback and rides it under Global comments
…message drafts, the folded sheet - Store: both guided-review comment paths keep only the fields the export reads (guideCommentFields). A wrong kind is refused (a string decorations once broke every Send on the thread), an unknown field is dropped, and a global comment is type "comment" words with no suggestion, quoted lines, token or images. The export reads a label's decorations defensively. - A refused save puts the words back as the composer's draft (restoreCommentDraft); onSave answers whether the store kept it. - The Inbox draft is keyed by message (GuideReaderComments.draftScope), not by the guide's title and export time. - A global comment chosen in the guide is selected in the panel, and a folded panel's sheet opens on it (GuidePane, ReviewPane); one chosen in the panel scrolls into view in the guide's list. - Dead read-only branch in the reader removed. - Wording: tests/UI-TESTING.md and the review agent instructions say Global comment (agent text checked clean room). Tests: the 10,000-character and bad-field refusals, extras dropped, the export with a stored string decorations, and a DOM test of the reader's button, a refused save keeping the words, drafts per message, and the sheet opening (each mutation-checked).
backnotprop
marked this pull request as ready for review
November 4, 2026 16:11
…(global comments seam)
- Delete the stray tests/dom-test-list.txt-e left by the merge. - PlatformPost: a global comment (scope 'general') is never marked full-stack, so from Whole stack it rides the review body as in the review app. onPosted now reports the ids that went; PostEnding and PullReview clear only those (a whole stack's line comments stay). - PullReview: a new push carries the global comments over to the new push's storage (line comments still drop); the unsaved global comment draft is named per layer and scope, not per push. - PullReview passes onShowGlobalComment: a global comment chosen in the guide opens the folded comments sheet, as ReviewPane does. - New DOM tests (pullReviewGlobalComments.test.tsx, in the DOM list).
Flamintus
added a commit
to Flamintus/plannotator
that referenced
this pull request
Nov 4, 2026
Resolve with backnotprop#2584's global comments on Guided Reviews: guide sections keep the commentIds option, and a global comment, which has no heading, ends its text with its id.
backnotprop
added a commit
that referenced
this pull request
Nov 4, 2026
#2608 merged with main's later hand-off work (#2606 approved message, thread names, tree stacks; #2584 global comments). Kept this branch's review-thread picker and one-thread model, and carried main's behaviour into it: - ReviewPicker sends the thread name (pullHandoffThreadName) and retries unnamed on 409 thread_name_taken with the same idempotency key; Start a new agent passes it to compose. - The picker works on handoffStack (a tree's chain; after an ended agent, the layers that thread had), for keys, ask line and message. - PullReview keeps main's early fold/sheet block plus this branch's drawn measure and rail fold. - GuideView bare keeps the global comment button, in a non-floating row. - Main's hand-off tests ported to the picker; docs merged.
1 task
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.
Draft: a visible change. The owner approves from the pictures before merge. The before and after shots are in
/tmp/guide-global-comments/on the build machine; see REPORT.md there.A user asked for global comments in guided reviews. A global comment is about the whole review, not a line or a file.
What changed
@plannotator/guide-viewer): a new host seam,GuideHostValue.globalComments. With it,GuideViewdraws a "Global comment" button beside the header actions, using the document viewer's own words and globe icon. It also lists the review's global comments under the header, before the first section. A host without the seam draws nothing new (guides.show, the VS Code reader).GuideSectionCardis unchanged.CommentPopover(isGlobal). The typed draft survives a close until Add. The comment is saved as the review app's general comment (scope: "general",filePath"", lines 0) through the existing guide-annotation route.path"" andguide.scope: "general"(an additive field; every old field is kept).## Generalsection becomes## Global comments, and it now comes before the per-file sections.Agent-facing text (DRAFT, for approval)
New heading in both exports:
## Global comments(in the review app it replaces## General, and moves ahead of the files).The Inbox's line under
# Feedback on the guided reviewis unchanged when there are no global comments. When there are, it reads:The following comments are on the guided review "<title>" you sent: first the global comments, on the whole review, then the comments on its diffs, one section per file. Line numbers are the file's own: (new) the changed file, (old) the original.The following comments are on the guided review "<title>" you sent, under "Global comments": they are on the whole review, not on a line or a file.Review agent instructions (
packages/ui/utils/reviewAgentInstructions.ts, the text an agent reads before posting review comments):- **General comment** (\scope: "general"`) — not tied to any file. Sidebar entry only. Use for review-level feedback like "the error handling is inconsistent across these changes."`- **Global comment** (\scope: "general"`) — on the whole review, not tied to any file or line. Listed under "Global comments" in the sidebar and at the top of a guided review. Use for review-level feedback like "the error handling is inconsistent across these changes."`## Posting a general comment. After:## Posting a global comment.scope: "general"and the line remark on the right line.Review fixes (independent review: PASS; P3s fixed)
decorationscannot break a Send.packages/inbox/guideGlobalComment.test.tsx(DOM, each case mutation-checked).Tests
packages/inbox/guideFeedback.test.ts: the order (global comments first, in the order they were made), the count, the intro, the list tag, and equality with the review app's export.packages/server/inbox-guide-comments.test.ts: the store's checks, the sentinels, the id kept separate from line comments, a restart, and a Send that carries the global comment under## Global commentsbefore## src/auth.ts.packages/review-editor/utils/exportFeedback.test.ts: the global comments come before the files.packages/review-editor/App.guideGlobalComment.test.tsx(DOM, new): the guide's button, the comment listed, Approve flipping to Send Feedback, and the posted body. With the App prop removed, this test fails.packages/guide-viewer/GuideView.test.tsx: no button or list without the seam, and no button when read-only.## Generalwere updated.Inbox code review (#2582, merged during this work; main merged in)
The full-window review renders the same
GuideReader, so both modes, Walkthrough and All files, get the button and the list from this change.records, and global comments are among them.guideFeedback, so global comments ride first, under## Global comments.packages/inbox/reviewPane.test.tsx, "a global comment flips the decision to Send feedback and rides the verdict under Global comments".inboxReviewTitleLine.Shots
The before and after shots are in
/tmp/guide-global-comments/on the build machine: