Fix featured image no-provider notice#576
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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:
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:
Screenshots/Screencast
Before:
Shows the lower-level prompt generation error.

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

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.