Repository navigation
Suggest mode 6/9: review UI (Apply / Reject sidebar and summary) - #80432
Open
adamsilverstein wants to merge 89 commits into
Open
adamsilverstein wants to merge 89 commits into
adamsilverstein wants to merge 89 commits into
Conversation
Adds the sidebar review surface: SuggestionActions renders the Accept / Reject affordance in a note's header, resolves the marked text for inline suggestions on read, and shows a Docs-style Add / Delete / Format summary (SuggestionSummary + word-diff). The notes list hides the generic Resolve button for suggestion notes so the checkmark isn't duplicated, and the note toolbar's Add-note button stays active while a suggestion is being composed.
This was referenced Jul 17, 2026
|
Size Change: +5.08 kB (+0.06%) Total Size: 7.93 MB 📦 View Changed
|
# Conflicts: # packages/editor/src/components/collab-sidebar/format.js # tools/eslint/suppressions.json
adamsilverstein
marked this pull request as ready for review
August 5, 2026 22:24
Trunk switched @wordpress/dependency-group to 'never' mode, so the import group headers in these files now fail lint.
|
Flaky tests detected in ec52201. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/33117692745 refuses the drop and uploads nothing in
|
# Conflicts: # tools/eslint/suppressions.json
Rename the files this PR adds from .js to .ts/.tsx and add types so the strict type check covers them: the word diff exports a WordDiffSegment interface and the summary/actions components carry typed props. No behavior changes; eslint suppression paths follow the renames.
# Conflicts: # packages/components/CHANGELOG.md
# Conflicts: # packages/editor/CHANGELOG.md
A structural op carries no text of its own, so "Insert block: paragraph"
never showed what was typed into the new block and "Remove block:
paragraph" read differently from deleting the same words as a text
selection. The sidebar now reads the anchored block's rich text (live
block first, op snapshot as fallback, markers stripped) and the summary
quotes it after the block label; blocks without text keep the bare label.
Scalar attribute changes now state both sides ("heading level 3 → 4",
an unset value reads "default"), since the bare attribute name left the
reviewer to guess the proposed value. Object values keep the bare name.
Member
Author
|
Picked up one fix here from Seth's feedback on #73411. Claude's note on what landed in this layer:
|
Phase 1 refuses every post-level edit while suggesting; the excerpt, featured image and slug are fields a suggester should be able to propose, the way the title already is. Generalize the title proposal into post field proposals held in the editor store rather than the session, so `editPost` can divert a proposable edit into a proposal and `getEditedPostAttribute` can show the proposed value while suggesting: every panel that reads the post through the editor store shows the proposal with no change of its own. The title moves onto the same path. Each proposal is saved as its own note with a `post-attribute-set` op; accept applies it past the guard, reject drops it, and undo withdraws the newest one. The note names the field and the summary shows before and after (thumbnails for the featured image). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GLh3wdWJSgU3NLobNDk6x
Design System token fallbacks are injected at build time; a hand-written one fails the stylesheet lint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GLh3wdWJSgU3NLobNDk6x
…e post When a note's proposals are over the size it can store, the save pass leaves them in the post content and sets `_wp_suggestion_extraction_skipped` on the note. Nothing told the reviewer, who would expect the saved post to carry only the baseline. Show a short notice on the pending suggestion while the flag is set, noting that visitors still do not see it. Layer: review-ui (the suggestion card lives there; the flag is only set from inline-wiring, so it stays inert below). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GLh3wdWJSgU3NLobNDk6x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GLh3wdWJSgU3NLobNDk6x
# Conflicts: # packages/editor/src/components/collab-sidebar/note.jsx
… actions Trunk now publishes @wordpress/block-editor's declarations (#85036). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A71zpJzn4c8RnW8ryG9FYe
This branch has not been deployed
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.
Part of #73411
What's in this PR
Adds the sidebar review surface: SuggestionActions renders the Accept /
Reject affordance in a note's header, resolves the marked text for inline
suggestions on read, and shows a Docs-style Add / Delete / Format summary
(SuggestionSummary + word-diff). The notes list hides the generic Resolve
button for suggestion notes so the checkmark isn't duplicated, and the note
toolbar's Add-note button stays active while a suggestion is being composed.
Screenshot
Reviewing as the post author. Each suggestion becomes a note with a plain-language summary and Accept / Reject actions, here an attribute change and an inline addition:
Testing
This is one layer of the stack. To exercise the whole feature, #78994 bundles every layer into one branch and builds it in Playground:
👉 https://playground.wordpress.net/gutenberg.html?pr=78994
Enable Gutenberg > Experiments > Collaboration > Suggestion Mode, then follow the walkthrough in #73411, which also explains how to review the stack layer by layer.
Suggest mode stack
This rebuilds the manually-stacked Suggest mode work (#73411) as a GitHub Stack of 9 small, independently reviewable PRs, each building on the one below it:
Each follow up fix now sits in the layer that owns the code it changes, rather than piling onto the top of the stack. The whole feature can be exercised end-to-end via the combined testing branch #78994 (Playground). Behind the "Suggestion Mode" experiment (Gutenberg > Experiments).
AI Use
Code and description both written with 🤖 Claude Code. I will review and test.