Repository navigation
klack: rebuild with stats and standalone support - #28135
Conversation
|
Thank you for your contribution! 🎉 🔔 @henrikruscon you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="klack/rebuild"
FORK_URL="https://github.com/henrikruscon/raycast-extensions.git"
EXTENSION_NAME="klack"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
|
Looks good! |
Greptile SummaryThis PR substantially rebuilds the Klack Raycast extension on top of the Klack 2.1.x scripting dictionary, adding a live stats view, a volume scrubber, explicit on/off/wake commands, AI tools, per-switch icons, redundancy-aware feedback, and standalone build support.
Confidence Score: 4/5Safe to merge after swapping the hardcoded date in CHANGELOG.md for the {PR_MERGE_DATE} placeholder. The only actionable finding is the CHANGELOG entry using the literal date 2026-05-20 rather than the required template placeholder. All new logic — install-check memoization, optimistic mutations, inflight polling guard, AppleScript batching, and AI tool input validation — is well-structured and tested against Klack 2.1.3. extensions/klack/CHANGELOG.md — date placeholder needs to be updated before merging. 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/klack/CHANGELOG.md:3
The new entry uses a hardcoded date instead of the required `{PR_MERGE_DATE}` placeholder. The placeholder is automatically replaced with the actual merge date when the PR is merged; hardcoding a date bypasses that mechanism and will appear incorrect in the store changelog if the merge happens on a different day.
```suggestion
## [Stats and Standalone Support] - {PR_MERGE_DATE}
```
Reviews (3): Last reviewed commit: "Update CHANGELOG.md and optimise images" | Re-trigger Greptile |
- tools/set-volume: pass clamped target to klack.setVolume for explicit intent - stats: coalesce polling so a slow current-stats call doesn't queue concurrent spawns
|
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. |
| @@ -1,5 +1,24 @@ | |||
| # Klack Changelog | |||
|
|
|||
| ## [Stats and Standalone Support] - 2026-05-20 | |||
There was a problem hiding this comment.
The new entry uses a hardcoded date instead of the required
{PR_MERGE_DATE} placeholder. The placeholder is automatically replaced with the actual merge date when the PR is merged; hardcoding a date bypasses that mechanism and will appear incorrect in the store changelog if the merge happens on a different day.
| ## [Stats and Standalone Support] - 2026-05-20 | |
| ## [Stats and Standalone Support] - {PR_MERGE_DATE} |
Rule Used: What: Changelog entries must use {PR_MERGE_DATE}... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/klack/CHANGELOG.md
Line: 3
Comment:
The new entry uses a hardcoded date instead of the required `{PR_MERGE_DATE}` placeholder. The placeholder is automatically replaced with the actual merge date when the PR is merged; hardcoding a date bypasses that mechanism and will appear incorrect in the store changelog if the merge happens on a different day.
```suggestion
## [Stats and Standalone Support] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
How can I resolve this? If you propose a fix, please make it concise.* klack: rebuild with stats and standalone support * klack: address greptile review feedback - tools/set-volume: pass clamped target to klack.setVolume for explicit intent - stats: coalesce polling so a slow current-stats call doesn't queue concurrent spawns * Update CHANGELOG.md and optimise images --------- Co-authored-by: raycastbot <[email protected]>
Summary
Klack 2.1.x added a new
current statsAppleScript command. This PR rebuilds the extension on top of the modern Klack scripting dictionary, expands its surface, and ships a live stats view. Done with Henrik's blessing — he invited me as a collaborator on his fork to land this update.The store identity (
name: klack,author: henrikruscon) is preserved so stars, install count, and the existing listing URL carry over.What's new
firstTrackedAt.toggle,turn-on,turn-off,wake-up,set-switch,set-volume,get-status. All include runtime guards against unknown inputs.What's fixed
Selectaction no longer requires the initialcurrent switchfetch to have resolved.volume presetenum no longer exists in the sdef — these now call the integervolumecommand directly).getApplications()failure.Performance
shouldRevalidateAfter: false— no post-action refetch.useCachedPromiseseeded from a persistentCachefor instant cold-start paint across all commands.closeMainWindow()no longer blocked-on for no-view commands.CustomVolumeFormlazy-loaded.Tooling
@raycast/api→^1.104.17run-applescriptdependency in favour of@raycast/utilsrunAppleScript.Test plan
npx ray build -e distnpx ray lintstatsEnabled: false) and permission required (hasStatsPermission: false).