Feature/phase 1 Quick Wins#4
Merged
Merged
Conversation
Hide AI generation form when no configured provider supports text generation; show a more specific status badge in the admin UI. Co-Authored-By: Jasper Frumau <jasper@imagewize.com>
Mark list-patterns as readonly and create-page as idempotent so consumers and the REST endpoint can reason about their side-effects. Co-Authored-By: Jasper Frumau <jasper@imagewize.com>
…ilter Replace the hardcoded elayne/ prefix with a filterable array so the plugin works with any block theme, not just Elayne.
Add bootstrap with WordPress function/class stubs, phpunit.xml, and tests covering PatternLab prefix filtering and AiIntegration feature detection (10 tests, 20 assertions).
Allow filtering the pattern table by category via a GET dropdown; count badge reflects current filter state vs. total.
PHPUnit 10 requires PHP >=8.1 but the plugin supports PHP 8.0+. Setting config.platform.php to 8.0.0 ensures the lock file resolves PHPUnit 9.x which is compatible across the full supported PHP range.
Aligns with WordPress's recommended PHP version (8.3+). Also adds PHPUnit test step to CI workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This release establishes v0.4.0 as a platform maturity milestone, raising minimum requirements to PHP 8.3 and WordPress 7.0 while introducing a PHPUnit 11 test suite with coverage for the two core classes. Beyond dependency alignment, three substantive features were added: a
waygate_pattern_prefixesfilter that decouples the plugin from the Elayne theme and enables any theme to supply patterns, REST API semantic annotations on registered Abilities, and text-generation capability detection inAiIntegration. A category filter dropdown was also added to the admin pattern catalog, improving usability when a site registers a large number of patterns.Platform and Dependency Upgrades:
phpunit.xmlconfiguration andcomposer.locktracked for reproducible installs across environments.Feature Additions:
waygate_pattern_prefixesfilter inPatternLabreplaces the hardcodedelayne/prefix check, allowing any theme or plugin to register its own pattern namespace with Waygate.AbilitiesApinow attachesidempotent,readonly, anddestructiveannotations to registered Abilities, providing REST API clients with explicit semantics for each operation.AiIntegrationgains asupports_text_generation()guard that checks provider capability before attempting generation, preventing silent failures when an incompatible provider is configured.Testing Infrastructure:
tests/Unit/PatternLabTest.phpandtests/Unit/AiIntegrationTest.phpwere introduced alongsidetests/bootstrap.php, covering the Phase 1 changes with isolated unit tests that do not require a running WordPress installation.Documentation and Configuration:
README.mdandCHANGELOG.mdupdated to reflect v0.4.0 generic theme support and the new platform requirements..gitignoreupdated to exclude.phpunit.result.cache;CLAUDE.mdupdated with revised architecture notes and the PHPUnit run command.Files Changed:
.github/workflows/ci.yml(Modified).gitignore(Modified)CHANGELOG.md(Modified)CLAUDE.md(Modified)README.md(Modified)composer.json(Modified)includes/class-abilities-api.php(Modified)includes/class-admin.php(Modified)includes/class-ai-integration.php(Modified)includes/class-pattern-lab.php(Modified)waygate.php(Modified)phpunit.xml(Added)tests/Unit/AiIntegrationTest.php(Added)tests/Unit/PatternLabTest.php(Added)tests/bootstrap.php(Added)Dependency lock files updated: composer.lock,