fix(command-palette): add missing wp-data dep and fix wp-icons handle#722
fix(command-palette): add missing wp-data dep and fix wp-icons handle#722superdav42 merged 1 commit intomainfrom
Conversation
The wu-command-palette script uses wp.data.dispatch() to register commands but wp-data was not declared as a dependency, causing silent failures when wp-data loaded after the script. Also replace invalid 'wp-icons' handle with 'wp-primitives' — the correct registered script handle for @wordpress/icons in WordPress core.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the WordPress script dependencies for the command palette in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for e0efbba are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
|
DISPATCH_CLAIM nonce=ee7c8795a554a01aff7ae9f33e065a27 runner=superdav42 ts=2026-03-31T16:34:02Z max_age_s=120 |
|
Merged to main. All 10 CI checks passed (PHP 8.2–8.5, Cypress, Code Quality, PHP Lint, Build, WP Performance Metrics). aidevops.sh v3.5.528 plugin for OpenCode v1.3.0 with claude-sonnet-4-6 spent 23m and 11,414 tokens on this as a headless worker. Overall, 11m since this issue was created. |
Summary
wp-datato thewu-command-palettescript dependency array — the JS useswp.data.dispatch()to register commands/loaders butwp-datawas not declared, causing silent failures whenwp-dataloaded after the scriptwp-iconswithwp-primitives—wp-iconsis not a registered WordPress script handle; the correct handle for@wordpress/iconsiswp-primitivesWhat changed
inc/ui/class-command-palette-manager.php:140— dependency array inwp_enqueue_script():Testing
aidevops.sh v3.5.528 plugin for OpenCode v1.3.4 with claude-opus-4-6 spent 42m and 8,879 tokens on this with the user in an interactive session.
Summary by CodeRabbit