close
Skip to content

Fix featured image no-provider notice#576

Merged
dkotter merged 1 commit into
WordPress:developfrom
ekamran:shifteq/fix-featured-image-no-provider-notice
May 19, 2026
Merged

Fix featured image no-provider notice#576
dkotter merged 1 commit into
WordPress:developfrom
ekamran:shifteq/fix-featured-image-no-provider-notice

Conversation

@ekamran
Copy link
Copy Markdown
Contributor

@ekamran ekamran commented May 19, 2026

What?

Fix the Featured Image Generation no-provider behavior.

When no AI connector is configured, clicking Generate featured image now shows the shared connector-required notice with the Manage Connectors link.

Why?

Before this change, the featured image flow skipped the shared provider guard and continued into prompt generation. That caused a lower-level error such as:

Failed to generate prompt: Image prompt generation failed. Please ensure you have a connected provider that supports text generation.

This was inconsistent with other AI features.

How?

Use the existing ensureProvider() helper before starting featured image generation.

Testing Instructions

Automated checks run locally:

npm run lint:js -- src/features/image-generation/components/GenerateFeaturedImage.tsx tests/e2e/specs/experiments/no-provider-degradation.spec.js
npm run build
npm run typecheck
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 WP_BASE_URL=http://localhost:8889 npm run test:e2e -- tests/e2e/specs/experiments/no-provider-degradation.spec.js --grep "Featured Image Generation"

Manual verification:

  1. Disable/remove AI connector credentials.
  2. Enable Image Generation and Editing.
  3. Open the post editor.
  4. In the Featured Image panel, click Generate featured image.
  5. Confirm the notice says: “This feature requires an AI Connector to function properly.”
  6. Confirm the notice includes the Manage Connectors link.

Screenshots/Screencast

Before:

Shows the lower-level prompt generation error.
before

After:

Shows the shared connector-required notice with the Manage Connectors link.
after

Use of AI Tools

AI assistance: Yes
Tool(s): ChatGPT / Codex
Used for: Repository review, reproduction planning, implementation guidance, test updates, and local verification. I reviewed the changes, tested the behavior locally, and take responsibility for the final submission.

Open WordPress Playground Preview

@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: ekamran <ekamran@git.wordpress.org>

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.41%. Comparing base (396fcc3) to head (8a2c01c).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #576   +/-   ##
==========================================
  Coverage      71.41%   71.41%           
  Complexity      1158     1158           
==========================================
  Files             67       67           
  Lines           5584     5584           
==========================================
  Hits            3988     3988           
  Misses          1596     1596           
Flag Coverage Δ
unit 71.41% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@dkotter dkotter mentioned this pull request May 19, 2026
42 tasks
@dkotter dkotter added this to the 1.0.0 milestone May 19, 2026
@dkotter dkotter merged commit a3d7944 into WordPress:develop May 19, 2026
18 checks passed
@ekamran ekamran deleted the shifteq/fix-featured-image-no-provider-notice branch May 19, 2026 15:36
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.

2 participants