Skip to content

Iterate on Editorial Updates end flow to Visual Revisions #507

Description

@jeffpaul

What problem does this address?

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.

Activity

  1. added this to the 1.0.0 milestone on May 5, 2026
  2. zeus2611 commented on May 7, 2026

    @zeus2611
    Contributor

    @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.

  3. jeffpaul commented on May 7, 2026

    @jeffpaul
    MemberAuthor

    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.

  4. 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
  5. modified the milestones: 1.0.0, 1.1.0, 1.1.0 on May 19, 2026
  6. modified the milestones: 1.0.2, 1.1.0 on Jun 16, 2026
  7. kiranmagic7 commented on Jun 16, 2026

    @kiranmagic7

    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:

    1. Keep the existing save and latest-revision lookup unchanged.
    2. Move the notice action construction into a small helper, e.g. getRevisionReviewAction( { lastRevisionId, adminUrl, visualRevisionsUrl } ).
    3. 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.
    4. Otherwise keep the existing classic URL fallback.
    5. 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.

  8. zeus2611 commented on Jun 16, 2026

    @zeus2611
    Contributor

    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.

    So the helper would branch:

    • disableVisualRevisions: false → onClick triggering setCurrentRevisionId (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 disableVisualRevisions check does the safety work.

  9. modified the milestones: 1.1.0, 1.2.0 on Jun 30, 2026
  10. moved this from To do to In progress in WordPress AI Roadmapon Jul 13, 2026
  11. moved this from In progress to Needs review in WordPress AI Roadmapon Jul 13, 2026
  12. modified the milestones: 1.2.0, 1.3.0 on Jul 14, 2026
  13. moved this from Needs review to Done in WordPress AI Roadmapon Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions