feat(coffee): Add auto-caffeinate when Raycast launches - #30113
feat(coffee): Add auto-caffeinate when Raycast launches#30113Official-Krish wants to merge 2 commits into
Conversation
|
Thank you for your contribution! 🎉 🔔 @mooxl @bibixx @GastroGeek @pernielsentikaer @xilopaint @ridemountainpig @zakj @Visual-Studio-Coder @IKatsuba @alexibuild @mbuvarp @frederikobermaier-lab @bsradcliffe 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="feat(coffee)/auto-caffeinate-on-launch"
FORK_URL="https://github.com/Official-Krish/extensions.git"
EXTENSION_NAME="coffee"
REPO_NAME="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 15 business days. |
Greptile SummaryThe PR adds opt-in automatic caffeination when a new Raycast session is detected and makes schedule loading ignore unrelated LocalStorage entries.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the eligible follow-up scope. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "fix(coffee): auto-caffeinate on Raycast ..." | Re-trigger Greptile |
8b95900 to
58dd9c3
Compare
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi @Official-Krish 👋
Thanks for your contribution 💪
I have now tested your extension, and I have some feedback ready for you:
- Sleep/wake ≠ Raycast relaunch —
now - lastRun >= 2 minutesalso becomes true after the Mac has been asleep (background intervals do not tick during sleep). After a user Decaffeinates, closes the lid for a while, then wakes, the next status / menu-bar tick can silently start indefinitecaffeinateagain. That breaks the promise that manual decaf lasts until the next Raycast restart. Please key “new session” off something stable across sleep/wake but new when Raycast actually relaunches (e.g. Raycast app PID / process start time in LocalStorage), and re-test: quit/relaunch with the pref on, manual decaf → sleep/wake without quitting Raycast, schedule interaction, and pref-off as a no-op. - Give the preference its own
title(e.g."Launch") so it does not sit under Menu Bar Icon, and mention in the description/README that Caffeinate Status and/or the menu bar command must stay enabled for the feature to run. - Match existing Coffee checkbox labels with sentence case (
Start caffeination when Raycast starts). A short HUD on the auto-start path would also make the behavior easier to notice while testing.
I'm looking forward to testing this extension again 🔥
Feel free to contact me here or at Slack if you have any questions.
Please convert this PR to a draft while working on the requested changes. Once ready, mark it as ready for review again and we'll take another look. Thanks!
|
@pernielsentikaer I’ve addressed all the points you mentioned. If you find anything else let me know. |
|
@Official-Krish add me to "past-contributors" in the manifest please @copilot do it my username is Visual-Studio-Coder just put it in the package json (check raycast docs to know where to add it or smth idk) |
Fixes #29965
Description
Adds an "instant on" feature to the Coffee extension, addressing the request to automatically keep the Mac awake whenever Raycast launches (like Amphetamine's "start when app opens").
A new "Start caffeination when Raycast starts" preference (checkbox, default off) makes Coffee caffeinate the Mac indefinitely shortly after Raycast starts — no manual action needed.
How it works
Supporting fix
Changes
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool