You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Iterate on Editorial Updates end flow to Visual Revisions #507
When you get to the end of the Refine from Notes flow, a toast message provides a link to the classic revisions screen to see the changes.
What is your proposed solution?
Let's update that to link to the new Visual Revisions screen coming with WP 7.0 (as the AI plugin requires 7.0 as a minimum version) so that folks can benefit from that improve revisions review experience.
@jeffpaul I had this planned, but I'm waiting for the WordPress 7 release to finalize the integration. In the current beta, the new revision screen endpoint is a private function, so we can't reliably link to it yet.
changed the title [-]Iterate on Refine from Notes end flow to Visual Revisions[/-][+]Iterate on Editorial Updates end flow to Visual Revisions[/+]on May 19, 2026
I took a source-path pass on current develop and the current Gutenberg revisions code. The narrow implementation path seems to be:
The AI plugin already does the hard part in src/experiments/editorial-updates/hooks/useEditorialUpdates.ts: after refinement it saves the post, fetches the latest revision via /wp/v2/${ restBase }/${ postId }/revisions?per_page=1, and builds the snackbar action only when it has both lastRevisionId and adminUrl.
The classic-specific part is just the action URL: ${ adminUrl }revision.php?revision=${ lastRevisionId }.
In Gutenberg, the visual revisions UI is entered from the editor UI by setting the current revision ID in the editor store; when disableVisualRevisions is true, Core falls back to revision.php?revision=....
Current Gutenberg also explicitly disables visual revisions when classic metaboxes are active, because the in-editor restore path does not restore those metabox values. So the plugin should probably preserve the classic fallback instead of always forcing the visual path.
Suggested patch shape:
Keep the existing save and latest-revision lookup unchanged.
Move the notice action construction into a small helper, e.g. getRevisionReviewAction( { lastRevisionId, adminUrl, visualRevisionsUrl } ).
Use the visual revisions path only when Core exposes a stable public URL/capability for it, or when that URL is localized into aiEditorialUpdatesData by PHP.
Otherwise keep the existing classic URL fallback.
Add/extend an Editorial Updates e2e test around the success notice action: mocked revisions response returns an ID; without a visual-revisions URL it links to revision.php?revision=<id>; with the stable visual URL present it uses the visual revisions target.
I would avoid calling Gutenberg's private unlock( dispatch( editorStore ) ).setCurrentRevisionId() from this plugin unless maintainers are comfortable taking that private API dependency. The lowest-risk first patch is to isolate action creation now, then wire the visual route through a public Core API or localized URL once it is stable.
Great analysis. Agree on keeping the existing revision lookup and the getRevisionReviewAction() helper shape.
One addition to step 3: since WP 7.0 is the plugin minimum and disableVisualRevisions already signals when visual revisions are safe to use, we could wire the visual path right now via dispatch(editorStore).setCurrentRevisionId(lastRevisionId) (private action, but stable at 7.0) instead of waiting for a public URL — using disableVisualRevisions: false as the gate.
This lands the feature now without blocking on a public Core API, while still preserving the classic fallback exactly as you described. The disableVisualRevisions check does the safety work.
Activity
zeus2611 commentedon May 7, 2026
@jeffpaul I had this planned, but I'm waiting for the WordPress 7 release to finalize the integration. In the current beta, the new revision screen endpoint is a private function, so we can't reliably link to it yet.
jeffpaul commentedon May 7, 2026
Ok, will be good to check after Friday's "new beta 1" and then next Thursday's "new rc1" whether that updates and unblocks you here.
[-]Iterate on Refine from Notes end flow to Visual Revisions[/-][+]Iterate on Editorial Updates end flow to Visual Revisions[/+]kiranmagic7 commentedon Jun 16, 2026
I took a source-path pass on current
developand the current Gutenberg revisions code. The narrow implementation path seems to be:src/experiments/editorial-updates/hooks/useEditorialUpdates.ts: after refinement it saves the post, fetches the latest revision via/wp/v2/${ restBase }/${ postId }/revisions?per_page=1, and builds the snackbar action only when it has bothlastRevisionIdandadminUrl.${ adminUrl }revision.php?revision=${ lastRevisionId }.disableVisualRevisionsis true, Core falls back torevision.php?revision=....Suggested patch shape:
getRevisionReviewAction( { lastRevisionId, adminUrl, visualRevisionsUrl } ).aiEditorialUpdatesDataby PHP.revision.php?revision=<id>; with the stable visual URL present it uses the visual revisions target.I would avoid calling Gutenberg's private
unlock( dispatch( editorStore ) ).setCurrentRevisionId()from this plugin unless maintainers are comfortable taking that private API dependency. The lowest-risk first patch is to isolate action creation now, then wire the visual route through a public Core API or localized URL once it is stable.zeus2611 commentedon Jun 16, 2026
Great analysis. Agree on keeping the existing revision lookup and the
getRevisionReviewAction()helper shape.One addition to step 3: since WP 7.0 is the plugin minimum and
disableVisualRevisionsalready signals when visual revisions are safe to use, we could wire the visual path right now viadispatch(editorStore).setCurrentRevisionId(lastRevisionId)(private action, but stable at 7.0) instead of waiting for a public URL — usingdisableVisualRevisions: falseas the gate.So the helper would branch:
disableVisualRevisions: false→onClicktriggeringsetCurrentRevisionId(visual path)disableVisualRevisions: true→url: adminUrl + revision.php?revision=<id>(classic fallback you outlined)This lands the feature now without blocking on a public Core API, while still preserving the classic fallback exactly as you described. The
disableVisualRevisionscheck does the safety work.