Skip to content

FORNO-451: Add Redo for inline text edits - #113564

Open
kat3samsin wants to merge 3 commits into
trunkfrom
codex/inline-edit-undo-redo
Open

FORNO-451: Add Redo for inline text edits#113564
kat3samsin wants to merge 3 commits into
trunkfrom
codex/inline-edit-undo-redo

Conversation

@kat3samsin

@kat3samsin kat3samsin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Part of FORNO-451

Partner PR: BigSky 6233
Screenshot 2026-08-13 at 16 40 54
Screenshot 2026-08-13 at 16 40 36

Proposed Changes

  • Show Updated with inline Undo only for successful text-content edits.
  • After Undo, show Reverted with Redo and swap the same provider-owned checkpoint for Big Sky and Jetpack.
  • Hide the action for structural edits, CSS changes, and no-op outcomes.
  • Preserve the action when Agenttic replaces the streamed tool result with final prose.
  • Hide Undo and Redo after Gutenberg's native Undo (ctrl+Z) changes the editor history.
  • Hide stale Undo and Redo controls after a new user message or when conversation history is loaded.
  • Remove the background from Updated while keeping the green text.

Why are these changes being made?

Testing Instructions

  1. On a sandbox with big-sky-plugin#6233, ask the agent to change paragraph text.
  2. Confirm Updated appears as green text with no background and Undo is available.
  3. Click Undo. Confirm the original text returns and the action changes to Reverted with Redo.
  4. Click Redo. Confirm the edited text returns and the action changes to Updated with Undo.
  5. Ask the agent to move, insert, or delete a block, change CSS, or make no change. Confirm NO Updated or Undo action appears.
  6. Confirm the action remains visible when the final assistant response replaces the streamed tool result.
  7. After an AI text edit, press Ctrl+Z or Cmd+Z. Confirm inline Undo and Redo disappear and stay hidden after native Redo.
  8. Send another user message and confirm controls on the prior turn disappear. Start a new chat, reopen the old conversation from History, and confirm its controls stay hidden.

Automated checks:

  • Focused Agents Manager suites for native Undo and history invalidation pass: 54 tests.
  • Four focused Agents Manager and Jetpack AI Sidebar suites pass: 288 tests.
  • The full Jetpack AI Sidebar suite passes: 17 suites, 379 tests.
  • A full Agents Manager run also passed once; a rerun hit the existing order-dependent tracks.test.ts failure, and that file passes alone: 18 tests.
  • Scoped ESLint, Stylelint, Prettier, and git diff --check pass.
  • @automattic/jetpack-ai-sidebar typecheck and build pass.
  • The Agents Manager production widget build passes with local source aliases.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have you tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@kat3samsin kat3samsin added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Aug 13, 2026
@kat3samsin
kat3samsin force-pushed the codex/inline-edit-undo-redo branch from 4dbc628 to 1beb591 Compare August 13, 2026 16:13
@a8ci18n

a8ci18n commented Aug 13, 2026

Copy link
Copy Markdown

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/34863821

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @kat3samsin for including a screenshot in the description! This is really helpful for our translators.

@kat3samsin
kat3samsin force-pushed the codex/inline-edit-undo-redo branch from 1beb591 to 988cc63 Compare August 13, 2026 18:05
@kat3samsin kat3samsin changed the title FORNO-451: Add Redo for reverted block edits FORNO-451: Add Redo for inline text edits Aug 13, 2026
@kat3samsin kat3samsin self-assigned this Aug 13, 2026
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 13, 2026
@kat3samsin
kat3samsin marked this pull request as ready for review August 13, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants