Skip to content

Content Translation: Add user-triggered retry - #941

Merged
dkotter merged 7 commits into
WordPress:developfrom
yogeshbhutkar:content-translation/add-retry-logic
Aug 21, 2026
Merged

dkotter merged 7 commits into
WordPress:developfrom
yogeshbhutkar:content-translation/add-retry-logic

Conversation

@yogeshbhutkar

@yogeshbhutkar yogeshbhutkar commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

What, Why, and How?

This PR adds a “Retry” action to the warning notice shown when a title or block translation fails.

For example, if 2 out of 10 blocks fail, the user can retry only those failed blocks instead of translating the entire post again. The PR tracks the client IDs of failed blocks and uses them to retry only the affected translations.

Use of AI Tools

AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5.6 Sol
Used for: Code reviews and implementation suggestions.

Testing Instructions

  1. Create a post with a title and several paragraphs, then generate a translation.
  2. Simulate one or more block translation failures and verify a "Retry" action appears.
  3. Click "Retry" and confirm only the failed blocks are translated.
  4. Simulate a title translation failure and confirm Retry title translation retries only the title.

Screencast

Retry.Generation.mov

Changelog Entry

Added - User-triggered retry for Content Translation.

Open WordPress Playground Preview

@codecov

codecov Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.42%. Comparing base (f6acb37) to head (ff9b0dd).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #941   +/-   ##
==========================================
  Coverage      74.42%   74.42%           
  Complexity      3116     3116           
==========================================
  Files            132      132           
  Lines          12179    12179           
==========================================
  Hits            9064     9064           
  Misses          3115     3115           
Flag Coverage Δ
unit 74.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yogeshbhutkar
yogeshbhutkar marked this pull request as ready for review August 14, 2026 11:23
@yogeshbhutkar
yogeshbhutkar requested a review from a team August 14, 2026 11:23
@github-actions

github-actions Bot commented Aug 14, 2026 •

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: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

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

Comment thread src/experiments/content-translation/hooks/useContentTranslation.ts
Comment thread src/experiments/content-translation/hooks/useContentTranslation.ts Outdated
@yogeshbhutkar
yogeshbhutkar force-pushed the content-translation/add-retry-logic branch from ddadbf1 to 26531c1 Compare August 20, 2026 09:45
@yogeshbhutkar
yogeshbhutkar requested a review from dkotter August 20, 2026 10:58
…he title. Ensure if title translation fails, we don't update the title with an invalid value, like a blank string. Instead show an error notice
dkotter
dkotter previously approved these changes Aug 20, 2026
@dkotter

dkotter commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The E2E tests keep timing out on this PR. I bumped that timeout up a bit and can continue to bump that up if needed but seems like something else must be going wrong here. I ran these tests locally and they all pass fine so some additional investigation is needed

@yogeshbhutkar

Copy link
Copy Markdown
Contributor Author

I've tried both the previous 30-minute timeout and the new 35-minute timeout, and the tests seem to pass in both cases. I've kept the timeout at 35 minutes since we've come quite close to hitting the 30-minute mark in Actions on a few other PRs.

Regarding the previous 35-minute timeout failure here, the checkout step itself took 6m 14s, whereas it normally completes in under 10 seconds. The run before that also seemed unusually slow overall, so this may have been an issue with the runner.

The newly added test, in particular, passes consistently when run locally.

@yogeshbhutkar
yogeshbhutkar requested a review from dkotter August 21, 2026 13:06
@dkotter
dkotter merged commit a4fda17 into WordPress:develop Aug 21, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Needs review to Done in WordPress AI Roadmap Aug 21, 2026
@yogeshbhutkar
yogeshbhutkar deleted the content-translation/add-retry-logic branch August 21, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants