Skip to content

Fix AI undo redo editor test#25630

Merged
mokagio merged 2 commits into
trunkfrom
iangmaia/fix-ai-e2e-undo-redo
Jun 10, 2026
Merged

Fix AI undo redo editor test#25630
mokagio merged 2 commits into
trunkfrom
iangmaia/fix-ai-e2e-undo-redo

Conversation

@iangmaia

@iangmaia iangmaia commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Update the AI undo/redo test to match granular editor history behavior.
  • Expose disabled undo/redo button state via isEnabled for accessibility.
  • Preserve undo/redo history availability when GutenbergKit modals close.

Copilot AI review requested due to automatic review settings June 9, 2026 14:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the editor Undo/Redo behavior and related UI test documentation to align with Gutenberg’s granular history, while also improving accessibility and preserving history availability when editor modals are shown/hidden.

Changes:

  • Switch Undo/Redo disabled handling from isUserInteractionEnabled to isEnabled so disabled state is exposed to accessibility (VoiceOver).
  • In NewGutenbergViewController, preserve undo/redo availability across modal open/close by tracking history-disabled state separately from general navigation-item enabled state.
  • Update the AI agent UI test steps to account for granular undo/redo history (multiple taps may be required).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
WordPress/Classes/ViewRelated/Post/PostEditorNavigationBarManager.swift Initializes undo/redo buttons as disabled via isEnabled (accessibility-visible state).
WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift Tracks nav enabled vs history availability separately and updates undo/redo state consistently when modals close.
WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift Uses isEnabled (not isUserInteractionEnabled) when toggling undo/redo availability.
Tests/AgentTests/ui-tests/undo-redo-in-editor.md Updates agent test procedure to match granular undo/redo behavior and button disabled states.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iangmaia iangmaia self-assigned this Jun 9, 2026
@iangmaia iangmaia added the Tooling Build, Release, and Validation Tools label Jun 9, 2026
@iangmaia iangmaia added this to the 27.0 milestone Jun 9, 2026
@iangmaia iangmaia requested review from crazytonyli and mokagio June 9, 2026 14:41
@wpmobilebot

wpmobilebot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number32476
VersionPR #25630
Bundle IDorg.wordpress.alpha
Commit842de46
Installation URL513rl0uv42d30
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number32476
VersionPR #25630
Bundle IDcom.jetpack.alpha
Commit842de46
Installation URL001v494cr5vmo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@iangmaia iangmaia added the Gutenberg Editing and display of Gutenberg blocks. label Jun 9, 2026
@iangmaia iangmaia force-pushed the iangmaia/fix-ai-e2e-undo-redo branch from 38b9ba4 to be08131 Compare June 9, 2026 14:44
@iangmaia iangmaia force-pushed the iangmaia/fix-ai-e2e-undo-redo branch from be08131 to a701044 Compare June 9, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

@mokagio mokagio added this pull request to the merge queue Jun 10, 2026
Merged via the queue into trunk with commit d6039c1 Jun 10, 2026
25 checks passed
@mokagio mokagio deleted the iangmaia/fix-ai-e2e-undo-redo branch June 10, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Editing and display of Gutenberg blocks. Tooling Build, Release, and Validation Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants