Skip to content

Abilities Explorer: trim the comments to the ones that explain why - #1196

Merged
dkotter merged 8 commits into
claude/abilities-explorer-dataviews-develop-2as8vrfrom
feat/abilities-explorer-docblock-trim
Oct 15, 2026
Merged

dkotter merged 8 commits into
claude/abilities-explorer-dataviews-develop-2as8vrfrom
feat/abilities-explorer-docblock-trim

Conversation

@whyisjake

@whyisjake whyisjake commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Stacked on #1193, since it touches the same files (App.tsx, fields.tsx, ListView.tsx, Statistics.tsx). When #1193 merges, this retargets to #1181's branch. It leaves test files alone, so it doesn't overlap #1194.

This is the comment trim @dkotter asked for on Abilities_Controller.php in his #1181 review. It touches comments only: 403 lines removed and 107 added, across 23 files. A diff of the non-comment lines is empty.

Kept:

  • each docblock's summary and the tags WordPress and wp-scripts lint expect (@since, @param, @return, @var);
  • translator comments;
  • the one-line why notes a reader couldn't get from the code and that guard a fix:
    • the routes must never be registered as abilities;
    • ability names stay out of the URL path, because Apache 404s on an encoded /;
    • the nonce is checked again, because core can skip its own check;
    • the Name field's render is the component itself, so focus survives;
    • descriptions are never trimmed (Abilities Explorer: Descriptions are excessively trimmed depending on the language #588);
    • the runner aborts an invoke when it leaves its ability;
    • large integers aren't reformatted;
    • the provider filter is taken out of the view before DataViews' own is filter runs.

Cut: prose that restated the code, narration of the next line, background, and multi-paragraph explanations, which now get one sentence. In PHP, only comments #1181 added are changed. Older comments in Ability_Handler.php are left as they were.

Testing

All of this was run locally with wp-env.

  • npm run build: OK.
  • wp-scripts lint-js src/experiments/abilities-explorer: clean.
  • tsc --noEmit: no Explorer errors.
  • PHPCS on includes/Experiments/Abilities_Explorer: clean.
  • PHPUnit, --filter Abilities_Explorer: 78 tests, OK.
  • Abilities Explorer e2e specs: 17 passed.

AI assistance: Yes. Tool(s): Claude Code. Used for: the comment trim, running the checks above, 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

whyisjake and others added 7 commits October 15, 2026 13:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The description field existed only so search covered it. It is now a
default column that can be hidden, and its text wraps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Abilities rarely change while the page is open, and reloading the page
does the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d in the next commit)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps each docblock's summary and tags, and only the comments that
explain a non-obvious reason: why the routes are never abilities, why
names stay out of the path, why the nonce is checked again, and why
the DataViews style and strings are loaded here. Comments that
predate #1181 are left as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps each docblock's summary and @PARAM and @return tags, the
translator comments, and one-line notes where the reason is not in
the code: the Name field's render stays the component so focus
survives, descriptions are never trimmed (#588), the runner aborts an
invoke when it leaves its ability, and large integers are not
reformatted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whyisjake
whyisjake marked this pull request as ready for review October 15, 2026 21:55
@whyisjake
whyisjake requested a review from a team as a code owner October 15, 2026 21:55
@github-actions

github-actions Bot commented Oct 15, 2026 •

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: whyisjake <whyisjake@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@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 Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.74%. Comparing base (108899c) to head (fc48a6c).

Additional details and impacted files
@@                                  Coverage Diff                                  @@
##             claude/abilities-explorer-dataviews-develop-2as8vr    #1196   +/-   ##
=====================================================================================
  Coverage                                                 83.74%   83.74%           
  Complexity                                                 3388     3388           
=====================================================================================
  Files                                                       136      136           
  Lines                                                     13062    13062           
=====================================================================================
  Hits                                                      10939    10939           
  Misses                                                     2123     2123           
Flag Coverage Δ
unit 83.74% <ø> (ø)

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.

Base automatically changed from feat/abilities-explorer-ui-review to claude/abilities-explorer-dataviews-develop-2as8vr October 15, 2026 22:15
@dkotter
dkotter merged commit 4ee5785 into claude/abilities-explorer-dataviews-develop-2as8vr Oct 15, 2026
36 checks passed
@dkotter
dkotter deleted the feat/abilities-explorer-docblock-trim branch October 15, 2026 22:33
whyisjake added a commit that referenced this pull request Oct 29, 2026
The Abilities Explorer reached develop through #1181, which took the
#1074 rewrite off this branch and removed its AI Workspace dependency
(b6c78b5). The Explorer files take develop's version, including the
review changes from #1193, #1194 and #1196, with the workspace's surface
integration put back on top: the "Exposed in" field and filter, the row
and policy surface actions, the response sequencer, the surface route,
the list fields Ability_Handler adds from Tool_Policy, and their tests.

Develop removed the Refresh button, so the list loads once and the
sequencer no longer has a refresh to order against. The e2e test for a
refresh answered after a remove is dropped with it. The list, navigation
and runner specs this branch split out are dropped in favour of
develop's single abilities-explorer.spec.js, and the field-extension
plugin is replaced by develop's e2e_fields switch. The surface spec and
its helpers stay.

The e2e fixtures keep develop's always-on Explorer abilities and add the
workspace's switched assistant fixtures and sequenced mock scenarios.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffpaul jeffpaul added this to the 1.5.0 milestone Nov 18, 2026
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.

3 participants