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

贡献者指南