WordPress/ai

Remove `Enable AI` header toggle, allow feature/experiment toggles (and group toggles) to control plugin functionality

開放

#600 建立於 2026年5月21日

 (6 則留言) (0 個反應) (0 位負責人)PHP (136 個分叉)auto 404
Help Wanted[Type] Bug

倉庫指標

星標
 (246 顆星)
PR 合併指標
 (平均合併 5天 4小時) (30 天內合併 72 個 PR)

描述

Description

The Enable AI toggle in the page header shows a binary on/off state that doesn't accurately represent the underlying configuration. When only some sub-features are enabled, the toggle still renders as fully ON, with no visual distinction from the "all enabled" state.

Actual behavior

The header toggle renders as fully ON (solid blue), identical to the state where every sub-feature is enabled across every section.

Expected behavior

The header toggle should accurately represent the state of the features it governs. Two options worth considering:

Option A — tri-state header toggle

The header toggle reflects aggregate state across all sub-features:

  • Off — nothing enabled anywhere.
  • Partial / indeterminate — at least one but not all sub-features enabled. Distinct visual treatment (partial fill, dashed track, or indeterminate indicator).
  • On — everything enabled.

Option B — move the toggle to each section (preferred)

Drop the global header toggle and give each section (Content Experiments, Admin Experiments, future sections) its own master toggle with the same tri-state behavior scoped to that section. This avoids a single control trying to summarize an ever-growing surface, keeps the aggregate state legible at the section level, and pairs naturally with the existing Enable all / Disable all buttons. As more experiment groups are added, the model scales without the header toggle becoming increasingly meaningless.

Step-by-step reproduction instructions

  1. Go to the AI settings screen.
  2. Under Content Experiments, enable only a subset of features (e.g. Alt Text Generation and Meta Description Generation, leave the rest off).
  3. Observe the Enable AI toggle in the page header.

Screenshots, screen recording, code snippet

Environment info

The latest: WP (7.1), AI plugin (1.0), Safari.

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except the AI plugin.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

貢獻者指南