Skip to content

AI Workspace: show cards for proposal kinds another plugin registers - #1382

Draft
whyisjake wants to merge 1 commit into
feat/ai-workspacefrom
fix/ai-workspace-third-party-proposal-kinds
Draft

whyisjake wants to merge 1 commit into
feat/ai-workspacefrom
fix/ai-workspace-third-party-proposal-kinds

Conversation

@whyisjake

@whyisjake whyisjake commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Stacked on #1004.

What

A proposal kind another plugin registers through wpai_workspace_proposal_kinds now gets its card in the AI Workspace.

Before this, such a kind was offered to the model and its proposal was stored, but the transcript only looked for proposals in results from a hard-coded copy of the built-in kinds' propose abilities (PROPOSAL_ABILITIES in utils/proposal.ts). The turn ended waiting on the person, and no card appeared. Found while integrating VIP Workflow's workflow kind (Automattic/vip-workflows#196).

How

  • Admin_Page passes Proposal_Store::proposal_abilities() to the client as proposalAbilities. It's built from the kinds, so it includes filter-registered ones.
  • Transcript reads proposals from that list. PROPOSAL_ABILITIES stays as the fallback when the page data has none, and proposalAbilitiesFrom() keeps only non-empty strings.
  • Proposal_StoreTest::test_client_proposal_abilities_match_the_server still guards the fallback against the built-in kinds.

Testing

  • PHPUnit, full suite: 3447 tests, 0 failures (WordPress latest, local wp-env). New: Admin_PageTest::test_page_data_lists_the_proposal_abilities, Admin_PageTest::test_page_data_lists_a_kind_another_plugin_registers.
  • Playwright unit specs: ai-workspace-proposal-abilities.spec.ts (new, 3 tests) and ai-workspace-proposal-card.spec.ts, 38 passed.
  • PHPStan: no errors. phpcs clean on the changed PHP. tsc and eslint clean.
  • Manually: with VIP Workflow's workflow kind on a local site, asking for an editorial workflow now shows the "Create 1 draft" card with the stages, and approving creates the sequence as a draft. Before this change the same turn showed no card.

AI assistance: Yes. Tool(s): Claude Code (Claude Opus 5.5). Used for: diagnosing the missing card, writing the fix and tests, and drafting this description.

I've reviewed the changes, understand them and can explain them under review. They have all been tested locally.

🤖 Generated with Claude Code

Open WordPress Playground Preview

…ters

A kind added through `wpai_workspace_proposal_kinds` was offered to the model
and stored, but the transcript only drew cards for results from a hard-coded
copy of the built-in kinds' propose abilities. The turn ended waiting on a card
that never appeared.

The page now passes Proposal_Store::proposal_abilities() to the client, and the
transcript reads proposals from that list. The client copy stays as the
fallback for page data without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.81%. Comparing base (5832360) to head (73f26a2).

Additional details and impacted files
@@                 Coverage Diff                  @@
##             feat/ai-workspace    #1382   +/-   ##
====================================================
  Coverage                86.81%   86.81%           
  Complexity                6330     6330           
====================================================
  Files                      226      226           
  Lines                    22901    22902    +1     
====================================================
+ Hits                     19882    19883    +1     
  Misses                    3019     3019           
Flag Coverage Δ
unit 86.81% <100.00%> (+<0.01%) ⬆️

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

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

@jeffpaul jeffpaul added this to the 1.7.0 milestone Nov 14, 2026
@jeffpaul jeffpaul moved this from Triage to In progress in WordPress AI Roadmap Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants