Update wp-bones extension#28316
Conversation
- * 🖼️ chore(metadata): update and add extension screenshot assets - 🚀 Add Ask WP Bones AI and Release Notes commands, enhance search and preview - Merge branch \'contributions/merge-1775740194203\' - Pull contributions - Pull contributions
- fix(use-version): 🐛 harden storage reads/writes against filesystem failures - Pull contributions
|
Thank you for the update! 🎉 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the WP Bones Raycast extension with new commands and UX improvements, plus bug fixes around version checking, documentation search, and menu bar behavior.
Changes:
- Added new commands: “Ask WP Bones AI” and “WP Bones Release Notes”
- Improved boilerplate/template flow with README preview and extra actions (e.g., Copy URL)
- Refactored version storage + comparison logic and hardened LocalStorage access against filesystem failures
Reviewed changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/wp-bones/src/use-wp-bones-template.tsx | Removed legacy templates search grid command (dead code cleanup). |
| extensions/wp-bones/src/templates.ts | Removed hardcoded templates list (dead code cleanup). |
| extensions/wp-bones/src/search-documentation.tsx | Switched to useFetch, added empty/error/no-results states, and “Copy URL” action. |
| extensions/wp-bones/src/release-notes.tsx | New command to fetch and render latest GitHub release notes. |
| extensions/wp-bones/src/menu-bar.tsx | Fixed state priority chain by using else if to avoid overwrites. |
| extensions/wp-bones/src/hooks/use-version.ts | Hardened LocalStorage reads/writes; updated version parsing/comparison. |
| extensions/wp-bones/src/create-wp-bones-template.tsx | Added README preview (⌘P) via GitHub repo + README fetch. |
| extensions/wp-bones/src/ask-ai.tsx | New “Ask WP Bones AI” command that builds context from docs search + AI streaming. |
| extensions/wp-bones/package.json | Registered new commands and added platforms metadata. |
| extensions/wp-bones/README.md | Updated feature list to reflect new commands and preview actions. |
| extensions/wp-bones/CHANGELOG.md | Added entries for the new features and fixes. |
Greptile SummaryThis PR hardens several error-prone paths in the WP Bones extension: filesystem failures during
Confidence Score: 5/5Safe to merge — all changes are defensive hardening around I/O failures and API response validation, with no new logic paths that could introduce regressions. The core fixes are straightforward and well-scoped: error boundaries wrap LocalStorage calls, migration logic is simplified to a safe no-op for stale values, and the only structural change (dropping useLocalStorage in favour of direct API calls) is self-contained to use-version.ts. The one open item is the hardcoded date in the changelog, which has no runtime impact. No files require special attention beyond the minor {PR_MERGE_DATE} placeholder fix in CHANGELOG.md. Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
extensions/wp-bones/CHANGELOG.md:3
The new entry uses a hardcoded date instead of the required `{PR_MERGE_DATE}` placeholder. The placeholder is the standard Raycast convention and is automatically replaced with the actual merge date on publish.
```suggestion
## [Fixes] - {PR_MERGE_DATE}
```
Reviews (5): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile |
Resolve conflicts in CHANGELOG.md, src/hooks/use-version.ts, src/search-documentation.tsx, src/ask-ai.tsx, src/create-wp-bones-template.tsx by keeping the PR head's content (which is the April release + today's review fixes).
Mirror the Array.isArray(items) guard already applied to search-documentation.tsx so a non-object/null/missing-items entry from the docs API does not crash the AI prompt builder inside useEffect.
0xdhrv
left a comment
There was a problem hiding this comment.
Looks good to me, approved ✅
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Hardens the WP Bones menu-bar command against filesystem failures when reading from / writing to
LocalStorage.The crash was reported via Raycast's Extension Issues dashboard — an
ENOSPC: no space left on deviceerror fired by Node'swriteFileSyncwhile Raycast was flushing its internalcom.raycast.api.cache/.../journalduring aLocalStorage.getItemcall:Fix
useLocalStorage(from@raycast/utils) with directLocalStorage.getItem/setItemcalls (from@raycast/api), each wrapped intry/catch. On read failure the hook falls back to the initial version; on write failure the call is best-effort (a missed persistence won't crash the menu-bar).Other minor robustness improvements applied in the same iteration (defensive guards on documentation API responses, explicit error state in Ask WP Bones AI when the docs lookup fails,
encodeURIComponentfor the embedded blueprint URL in the Playground action) — full list in the CHANGELOG.Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder