close
Skip to content

Fix meta description no-provider modal#558

Merged
dkotter merged 1 commit into
WordPress:developfrom
ekamran:shifteq/fix-meta-description-no-provider-modal
May 15, 2026
Merged

Fix meta description no-provider modal#558
dkotter merged 1 commit into
WordPress:developfrom
ekamran:shifteq/fix-meta-description-no-provider-modal

Conversation

@ekamran
Copy link
Copy Markdown
Contributor

@ekamran ekamran commented May 15, 2026

What?

Prevents the Meta Description modal from opening when no AI provider is configured.

Why?

When clicking Generate Meta Description without a configured AI Connector, the plugin correctly shows the provider warning. However, the Meta Description modal also opened even though generation could not proceed.

This made the UI feel inconsistent with the other no-provider flows, where the user only sees the provider notice and is directed to configure a connector.

How?

  • Checks provider availability before opening the Meta Description modal for generation.
  • Keeps the existing provider warning and Manage Connectors action.
  • Keeps manual editing unchanged when a meta description already exists.
  • Updates the existing no-provider E2E test to confirm the modal does not open.

Use of AI Tools

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

Testing Instructions

  1. Ensure no AI Connector API key is configured.
  2. Enable AI features and the Meta Description Generation experiment.
  3. Open a new post in the block editor.
  4. Expand the Meta Description panel.
  5. Click Generate Meta Description.
  6. Confirm the provider warning appears with a Manage Connectors link.
  7. Confirm the Meta Description modal does not open.

Automated checks run locally:

  • npm run lint:js -- src/experiments/meta-description/components/useMetaDescription.ts src/experiments/meta-description/components/MetaDescriptionPanel.tsx tests/e2e/specs/experiments/no-provider-degradation.spec.js
  • npm run typecheck
  • npm run test:e2e -- tests/e2e/specs/experiments/no-provider-degradation.spec.js

Screenshots or screencast

Before

No provider is configured. The warning appears, but the Meta Description modal also opens even though generation cannot proceed.

wp-ai-meta-description-before

After

No provider is configured. The same warning appears, but the Meta Description modal stays closed.

wp-ai-meta-description-after 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 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.21%. Comparing base (7888332) to head (9a3aa0c).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #558   +/-   ##
==========================================
  Coverage      71.21%   71.21%           
  Complexity      1151     1151           
==========================================
  Files             67       67           
  Lines           5565     5565           
==========================================
  Hits            3963     3963           
  Misses          1602     1602           
Flag Coverage Δ
unit 71.21% <ø> (ø)

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 added this to the 1.0.0 milestone May 15, 2026
@dkotter dkotter merged commit 3edb266 into WordPress:develop May 15, 2026
18 checks passed
@ekamran ekamran deleted the shifteq/fix-meta-description-no-provider-modal branch May 17, 2026 16:21
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