Skip to content

Experiment: Add Suggest Reply experiment#724

Open
Infinite-Null wants to merge 21 commits into
WordPress:developfrom
Infinite-Null:feat/add-reply-suggestion
Open

Experiment: Add Suggest Reply experiment#724
Infinite-Null wants to merge 21 commits into
WordPress:developfrom
Infinite-Null:feat/add-reply-suggestion

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Closes: #508

Suggest Reply Experiment

Description

This PR implements the Suggest Reply experiment, which adds an AI-powered "Suggest reply" action to both the Comments admin screen and the Activity dashboard widget.

This feature allows moderators to generate contextual reply suggestions based on the comment's content, the parent post's context, and optional editorial guidelines.

Key Features

  • WP Ability Integration: Registers the ai/reply-suggestion WP Ability which handles the context building and communication with the AI client.
  • Interactive Modal UI:
    • Allows selecting a reply tone (Friendly, Professional, or Casual).
    • Includes a textarea for optional free-text editorial guidelines (e.g. "always mention our support email").
    • Generates and displays the AI suggestion.
  • Quick Actions:
    • Use this reply: Automatically opens the WordPress inline comment reply form, populates it with the generated suggestion, and focuses the textarea.
    • Copy: Includes a transient "Copied!" button to easily grab the text for manual usage.

Testing Instructions

  1. Ensure you have an AI provider connected and enabled in Settings → AI and also Suggest Reply experiment is enabled under Admin Experiments in /wp-admin/options-general.php?page=ai-wp-admin .
  2. Go to the Comments screen in the WordPress admin.
  3. Hover over a comment and click Suggest reply.
  4. Test changing the tone and adding custom guidelines, then click Generate.
  5. Click Use this reply to verify the inline reply form opens and populates correctly.
  6. Click Copy to verify clipboard functionality.
  7. Go to the Dashboard and repeat the tests from the Activity (Recent Comments) widget.

Screenshot/Screencast

Usage

WhatsApp.Video.2026-06-16.at.7.30.39.PM.mp4
Screen.Recording.2026-06-16.at.7.16.22.PM.mov

Error Examples

Screenshot 2026-06-16 at 7 40 05 PM Screenshot 2026-06-16 at 7 41 11 PM Screenshot 2026-06-18 at 5 04 34 PM Open WordPress Playground Preview

@Infinite-Null Infinite-Null marked this pull request as ready for review June 16, 2026 10:50
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Infinite-Null

Copy link
Copy Markdown
Contributor Author

Hi @jeffpaul and @dkotter,

I've completed the implementation for this experiment and updated the flow based on the feedback shared in the issue discussion.

The PR is ready for review. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Experiment: “Suggest Reply” for Comments and Activity widget

1 participant