Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.

fix(abilities): drop empty properties maps so core's JS client can compile input schemas - #474

Merged
chubes4 merged 1 commit into
mainfrom
fix/empty-properties-schema
Oct 23, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/empty-properties-schema

Conversation

@chubes4

@chubes4 chubes4 commented Oct 22, 2026

Copy link
Copy Markdown
Member

Problem

Once extrachill-community v1.27.6 (#326) ships, the community Settings block runs extrachill/get-user-settings and extrachill/get-notification-preferences through core's @wordpress/abilities client. Both currently declare:

'input_schema' => array( 'type' => 'object', 'default' => array(), 'properties' => array() ),

Core's wp_prepare_json_schema_for_client() casts the empty default to {}, but publishes the empty properties map as JSON []. Gutenberg's executeAbility() compiles the schema with ajv first, gets schema is invalid: data/properties must be object, and throws Invalid schema provided for validation. before any request goes out. The Settings page stays on "Loading settings...".

The extrachill-network journey community-member-blocks caught it: on a fresh network boot with community v1.27.6, Edit Profile, the leaderboard and the heatmap all pass, and Settings never gets past "Loading settings...".

Fix

Drop the six empty properties keys in this plugin. An empty map adds no constraints, so server-side validation is unchanged, and {type: object, default: {}} compiles and validates {} under ajv.

Test

OptionalAbilityInputTest::test_published_input_schemas_have_object_property_maps checks that no published users input schema contains "properties":[], and pins both Settings abilities.

Follow-ups

  • The same bug in core: trunk json-schema.php still recurses into properties without turning an empty map into {}. Report it upstream.
  • Twenty other extrachill/* and datamachine/* abilities still declare 'properties' => array(); tracked separately.

AI assistance: Claude (Extra Chill Bot) wrote this change.

@homeboy-ci

homeboy-ci Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Homeboy Results — extrachill-users

Review lint

✅ review lint — passed

ℹ️ Auto-fix: homeboy review lint extrachill-users --path /home/runner/work/extrachill-users/extrachill-users --changed-since 12e25b1 --fix
ℹ️ Some issues may require manual fixes
ℹ️ Full options: homeboy self docs commands/lint
Deep dive: homeboy review lint extrachill-users --changed-since 12e25b1

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-extrachill-users-review-lint-homeboy-__Extra-Chill_homeboy-action-Linux-php8.4-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-extrachill-users-review-lint-homeboy-__Extra-Chill_homeboy-action-Linux-php8.4-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/extrachill-users/actions/runs/39848680533

Review test

✅ review test — passed

  • 172 passed
  • 1 skipped

ℹ️ Auto-fix lint issues: homeboy review lint extrachill-users --fix
ℹ️ Collect coverage: homeboy review test extrachill-users --coverage
ℹ️ Save test baseline: homeboy review test extrachill-users --baseline
ℹ️ Pass args to test runner: homeboy review test -- [args]
ℹ️ Full options: homeboy self docs commands/test
Deep dive: homeboy review test extrachill-users --changed-since 12e25b1

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-extrachill-users-review-test-homeboy-__Extra-Chill_homeboy-action-Linux-php8.4-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-extrachill-users-review-test-homeboy-__Extra-Chill_homeboy-action-Linux-php8.4-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/extrachill-users/actions/runs/39848680533
Tooling versions
  • Homeboy CLI: homeboy 0.432.0+2fbccf844a81f4bffe39d6c432e56ac14d1d9d30
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 087214c8
  • Action: Extra-Chill/homeboy-action@v2

@chubes4
chubes4 merged commit bfa57f9 into main Oct 23, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant