Skip to content

Update scheduler extension - #22476

Merged
raycastbot merged 9 commits into
raycast:mainfrom
csymons:ext/scheduler
Nov 18, 2025
Merged

raycastbot merged 9 commits into
raycast:mainfrom
csymons:ext/scheduler

Conversation

@csymons

@csymons csymons commented Oct 28, 2025 •

Copy link
Copy Markdown
Contributor

Description - Add Background Refresh Status Alert

Problem

Fixes #22298 - Users were unable to get scheduled commands to execute automatically because background refresh for the "Execute Due Commands" command is disabled by default on installation. There was no UI indication of this requirement, causing confusion.

Solution

Added a warning banner in the command form that:

  • Alerts users when background refresh is not enabled
  • Provides clear instructions on how to enable it
  • Links to official documentation
  • Auto-dismisses once background refresh is detected

Implementation

  • Tracking: execute-due-commands.ts detects and stores background launch events
  • Hook: New useBackgroundRefreshStatus hook checks enabled status
  • UI: Warning banner displays in CommandForm.tsx when not enabled
  • Storage: Added BACKGROUND_REFRESH_STATUS key to track state

Checklist

- Merge branch \'contributions/merge-1761638558070\'
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: scheduler Issues related to the scheduler extension platform: macOS platform: Windows OP is author The OP of the PR is the author of the extension labels Oct 28, 2025
@raycastbot

ghost commented Oct 28, 2025 •

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

Due to our current reduced availability, the initial review may take up to 10 business days.

- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
@csymons
csymons marked this pull request as ready for review October 28, 2025 09:40

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR adds infrastructure for tracking background refresh status but is incomplete. The PR description claims to implement a warning banner in CommandForm.tsx and background launch tracking in execute-due-commands.ts, but neither of these files are modified in the changeset.

What was added:

  • New useBackgroundRefreshStatus hook that reads status from storage
  • Storage key constant BACKGROUND_REFRESH_STATUS
  • Changelog entry claiming the feature is complete

Critical missing pieces:

  • No code in execute-due-commands.ts to detect and store background launch events
  • No code in CommandForm.tsx to use the hook and display the warning banner
  • The feature described in the PR is non-functional as submitted

Confidence Score: 0/5

  • This PR cannot be merged - the implementation is incomplete and non-functional
  • The PR claims to solve issue #22298 by adding a warning banner for background refresh, but the actual implementation is missing critical components. The hook exists but is never used, and the code to track background launches doesn't exist. This would add dead code without solving the stated problem.
  • extensions/scheduler/src/hooks/useBackgroundRefreshStatus.ts (unused), and missing modifications to CommandForm.tsx and execute-due-commands.ts

Important Files Changed

File Analysis

Filename Score Overview
extensions/scheduler/src/hooks/useBackgroundRefreshStatus.ts 2/5 New hook created but not integrated - missing implementation in CommandForm.tsx to display warning banner
extensions/scheduler/src/utils/constants.ts 5/5 Added storage key constant for background refresh status - simple addition, no issues
extensions/scheduler/CHANGELOG.md 3/5 Changelog claims feature is complete, but implementation is missing key components

3 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +1 to +33
import { useState, useEffect } from "react";
import { STORAGE_KEYS } from "../utils/constants";
import { getStoredData } from "../utils/storage";

interface BackgroundRefreshStatus {
enabled: boolean;
lastBackgroundRun?: string;
}

export function useBackgroundRefreshStatus() {
const [isEnabled, setIsEnabled] = useState<boolean | null>(null);
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
async function checkStatus() {
try {
const status = await getStoredData<BackgroundRefreshStatus>(STORAGE_KEYS.BACKGROUND_REFRESH_STATUS, {
enabled: false,
});
setIsEnabled(status.enabled);
} catch (error) {
console.error("Error checking background refresh status:", error);
setIsEnabled(false);
} finally {
setIsLoading(false);
}
}

checkStatus();
}, []);

return { isEnabled, isLoading };
}

ghost Oct 28, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Hook is created but never used in CommandForm.tsx as described in the PR. The implementation is incomplete - no code imports or calls this hook to display the warning banner.

SCHEDULED_COMMANDS: "scheduledCommands",
EXECUTION_LOGS: "executionLogs",
COMMAND_PERMISSIONS: "command_permissions",
BACKGROUND_REFRESH_STATUS: "background_refresh_status",

ghost Oct 28, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Storage key added but no code in execute-due-commands.ts writes to this storage key to track background launch events. The PR description claims tracking is implemented in execute-due-commands.ts, but the file is not modified in this changeset.

@pernielsentikaer

ghost commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Hi @csymons👋

Thanks for your contribution 🔥

Can you look into the feedback from Greptile?

@pernielsentikaer
pernielsentikaer marked this pull request as draft October 28, 2025 10:43
Charles Symons and others added 2 commits October 29, 2025 14:30
- update dependencies
- fix(scheduler): add missing code changes
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
- [Linear] Use API-provided notification presentation (raycast#22285)
- Update CODEOWNERs (1a7209e)
- Update harvest extension (raycast#22256)
- Update CODEOWNERs (13787cd)
- Fix finding button in Tahoe. (raycast#22330)
- Update GitHub Actions workflow for PR approvals (raycast#22487)
- Docs: update for the new API release
- Update CODEOWNERs (77f6477)
- Added support for Asana sections (raycast#21912)
- Update auto-label workflow for PR approvals (raycast#22484)
- Update GitHub Actions workflow to set effective token (raycast#22482)
- Update workflow to use pull_request_review event (raycast#22479)
- Update CODEOWNERs (d5727aa)
- Add action to generate and copy private links (raycast#22273)
- Enhance PR approval labeling workflow (raycast#22477)
- Chatgpt atlas bookmarks improvement (raycast#22371)
- Add windows support  (raycast#22367)
- Update diskutil-mac extension (raycast#22307)
- [Secret Browser Commands] add ChatGPT Atlas, etc (raycast#22348)
- Update deployhq extension (raycast#22319)
- [Serie A] Update extensions (raycast#22427)
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Merge branch \'contributions/merge-1761638558070\'
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
@csymons
csymons marked this pull request as ready for review October 29, 2025 12:04

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR adds a warning banner to alert users when background refresh is not enabled for the "Execute Due Commands" command, addressing issue #22298 where users couldn't understand why scheduled commands weren't executing automatically.

Key Changes:

  • New useBackgroundRefreshStatus hook checks if background refresh has been enabled by reading from local storage
  • execute-due-commands.ts detects and stores background launch events to track enabled status
  • Warning banner displays in CommandForm.tsx when background refresh is not detected
  • Added action panel item linking to background refresh documentation

Issues Found:

  • The UI text claims running 'Execute Due Commands' manually will enable background refresh, but the code only sets the flag when LaunchType.Background is detected. Manual execution won't dismiss the warning, creating a confusing user experience.

Confidence Score: 2/5

  • This PR has a logical flaw that creates misleading user instructions
  • The implementation has a critical logic error where the UI tells users they can dismiss the warning by manually running the command, but the code only detects background launches. This will confuse users who follow the instructions and still see the warning.
  • Pay close attention to CommandForm.tsx and execute-due-commands.ts - the UI instructions don't match the implementation logic

Important Files Changed

File Analysis

Filename Score Overview
extensions/scheduler/src/CommandForm.tsx 2/5 Adds background refresh warning banner with misleading instructions. The UI text suggests manually running the command will enable background refresh, but this contradicts the implementation.
extensions/scheduler/src/execute-due-commands.ts 2/5 Added background refresh tracking that only detects Background launch type. Manual command execution won't set the enabled flag, contradicting UI instructions.
extensions/scheduler/src/hooks/useBackgroundRefreshStatus.ts 5/5 New hook to check background refresh status from storage. Implementation is correct with proper loading states.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

<>
<Form.Description
title="⚠️ Background Refresh Not Enabled"
text="For scheduled commands to run automatically, you must enable background refresh for the 'Execute Due Commands' command. Go to Raycast Settings → Extensions → Command Scheduler → Execute Due Commands → Enable 'Allow Background Refresh'. Alternatively, run 'Execute Due Commands' once to enable it."

ghost Oct 29, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: The instruction "Alternatively, run 'Execute Due Commands' once to enable it" is incorrect. Looking at execute-due-commands.ts:85, the flag is only set when environment.launchType === LaunchType.Background. Manually running the command won't trigger background launch type, so the flag won't be set and the warning will persist.

ghost Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, Let me check this...

@pernielsentikaer
pernielsentikaer marked this pull request as draft October 30, 2025 05:38
@raycastbot

ghost commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Nov 13, 2025
@pernielsentikaer

ghost commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

Is this ready for another review? If so, please mark as ready for review and check new Greptile feedback 😊

@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Nov 13, 2025
Charles Symons and others added 2 commits November 13, 2025 10:58
- set RefreshStatus on all command calls
- update dependencies
- fix(scheduler): add missing code changes
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
- Update CODEOWNERs (b30fad6)
- Add httpperf extension (raycast#22809)
- Update CODEOWNERs (a1b96be)
- Add git extension (raycast#22550)
- Update CODEOWNERs (9c35408)
- Add logos-launcher extension (raycast#22366)
- Update CODEOWNERs (792ccbd)
- Add crypto-portfolio-tracker extension (raycast#22516)
- Update CODEOWNERs (7c738cc)
- chore: update github username (raycast#22634)
- Update CODEOWNERs (2009369)
- feat(screenocr): add option to disable sound and toast message (raycast#22559)
- feat: Vision Support with Pixtral Models and Clipboard Integration (raycast#22724)
- Update CODEOWNERs (76861a7)
- Update deepcast extension (raycast#22830)
- Update CODEOWNERs (4e55cf4)
- [Sink] windows support + shortcuts + modernize (raycast#22850)
- chore(sdk-scw): migrate to new sdk (raycast#22777)
- Improve regex pattern used for Jira issue key detection (raycast#22833)
- Update freeagent extension (raycast#22818)
- Update CODEOWNERs (0fe6eb9)
- [JWT Decoder] Update dependencies (raycast#22411)
- Update CODEOWNERs (05e1779)
- Add grokipedia extension (raycast#22519)
- Update CHANGELOG.md (raycast#22832)
- [VLC] Add commands for speed and history (raycast#22800)
- Update CODEOWNERs (630baf9)
- Update search-router extension (raycast#22823)
- Update CODEOWNERs (660ff27)
- Add excel-formula-beautifier extension (raycast#22578)
- Update CODEOWNERs (f46e7f5)
- Add json-resume extension (raycast#22499)
- Update vps-explorer extension (raycast#22819)
- Update CODEOWNERs (fae2c29)
- Update prism-launcher (raycast#22801)
- Update CODEOWNERs (6c53c0e)
- Update video-downloader extension (raycast#22810)
- Update CODEOWNERs (b4006be)
- Add vps-explorer extension (raycast#22507)
- [Ligue-1] Update extensions (raycast#22806)
- Update `Coolify` extension - delete project (new action) (raycast#22794)
- Update CODEOWNERs (f6d7e48)
- Add `Firefly III` extension (raycast#22795)
- Update CODEOWNERs (cfb46f5)
- Add AI by vercel extension (raycast#22804)
- Update review expectations message in pr-bot (raycast#22734)
- Change fetch URL and parse frontend version (raycast#22751)
- Update CODEOWNERs (61c928e)
- fix(extension): fix zen-browser opening new tab in private window in windows (raycast#22767)
- Update raycast-zoxide extension (raycast#22775)
- Update browser bookmarks extension (raycast#22778)
- Update CODEOWNERs (5898b65)
- Add rule-of-three extension (raycast#22773)
- Update twitch (raycast#22770)
- Update fathom extension (raycast#22760)
- [Postiz] v2 month till EoM + posts in markdown (raycast#22774)
- Update CODEOWNERs (ad1c866)
- Update twitch (raycast#22746)
- Update CODEOWNERs (584953d)
- Add Shelve extension (raycast#22287)
- Update CODEOWNERs (342955a)
- Add ray-code extension (raycast#22755)
- Update qbittorrent (raycast#22756)
- Update CODEOWNERs (c282ff1)
- Update uploadthing (raycast#22763)
- Update cloudflare-warp extension (raycast#22765)
- Update CODEOWNERs (38c5ec8)
- Add `Papra` extension (raycast#22761)
- Update CODEOWNERs (ba06e8c)
- add: Orshot extension (raycast#21715)
- [ivpn] minor fix: error handling in logout command (raycast#22757)
- Update CODEOWNERs (977815a)
- Update steam (raycast#22730)
- Update CODEOWNERs (52b198d)
- feat(imessage-2fa): add support for the 2FA from Epos Card Japan (raycast#22593)
- Update browser history extension (raycast#22749)
- Update `Appwrite` extension - Show Sites, Deployments, Variables (raycast#22754)
- [Multilinks] Add Perplexity Comet browser support (raycast#21476)
- Update anna-s-archive extension (raycast#22739)
- Update CODEOWNERs (fceb40c)
- [ccusage] feat: enhance Node.js path resolution and CLI execution flexibility (raycast#22740)
- Update silent-mode extension (raycast#22738)
- Update CODEOWNERs (8101bc2)
- AppGrid - Smart app launcher with grid view and category grouping (raycast#22709)
- Update CODEOWNERs (c6c796f)
- Add silent-mode extension (raycast#22732)
- feat(ray-so): add nuxt theme preferences (raycast#22733)
- Update CODEOWNERs (6de71ca)
- Add pi-drill extension (raycast#22714)
- Update CODEOWNERs (043ad9b)
- Update bitbucket extension (raycast#22708)
- Update CODEOWNERs (57cbf4b)
- Add ping-menu extension (raycast#22299)
- Docs: Update the utils docs
- Update CODEOWNERs (d3ea74a)
- Add udemy-coupons extension (raycast#22713)
- Update CODEOWNERs (2dfb48e)
- Update qbittorrent (raycast#22728)
- Update CODEOWNERs (7c6269c)
- Add dice-tiles extension (raycast#22021)
- FuelX: Remove vulnerable, but unused, dependencies. (raycast#22727)
- LingoRep: Fix security vulnerabilities. (raycast#22726)
- Update CODEOWNERs (9a3fcb4)
- Add zshrc-manager extension (raycast#22314)
- Update CODEOWNERs (6f5ff61)
- Update parallels-virtual-machines extension (raycast#22676)
- Update CODEOWNERs (a92f1b8)
- Add tex2typst extension (raycast#22667)
- Update CODEOWNERs (dbdf418)
- feat(sound-search): new extension for searching sounds 🎵  (raycast#22590)
- Update skyscanner-flights extension (raycast#22723)
- Update CODEOWNERs (1931677)
- Add rhttp extension (raycast#22359)
- Update `Capacities` extension - Maintenance + Windows Support (raycast#22694)
- Update CODEOWNERs (6f7ed84)
- Add `NetNewsWire` extension (raycast#22717)
- [Chatwoot] search contacts + show unread convo count (raycast#22719)
- Add Ghostty terminal support to Claude Code Launcher (raycast#22706)
- Update knowyourmeme extension (raycast#22705)
- Feature mistral medium (raycast#22633)
- Update CODEOWNERs (10b7497)
- Handle the search favourite space error (raycast#22689)
- Update CODEOWNERs (85f8818)
- Update timezone-buddy extension (raycast#22652)
- Update CODEOWNERs (10af08b)
- Extension: cloudflare (raycast#22660)
- feat(chatgpt-search): Make query parameters configurable, simplify extension (raycast#22677)
- Update CODEOWNERs (33834b7)
- Add prompt-builder extension (raycast#22648)
- Update CODEOWNERs (aa91051)
- Add display-reinitializer extension (raycast#22678)
- Update CODEOWNERs (2780fca)
- Update messages extension (raycast#22687)
- Update CODEOWNERs (cde25cb)
- [gitignore] Windows Support and Favourites (raycast#22623)
- Update CODEOWNERs (6e16a93)
- [Google Search] Release for Windows (raycast#22410)
- Update skyscanner-flights extension (raycast#22686)
- Update jsr extension (raycast#22682)
- Update CODEOWNERs (9b38b34)
- Update spell extension (raycast#22657)
- Update CODEOWNERs (24aabfd)
- [Adhan Time] Add Windows support (raycast#22622)
- Update CODEOWNERs (2a66830)
- Update parcel extension (raycast#22239)
- Update CODEOWNERs (5b5c73f)
- Update idonthavespotify extension (raycast#22695)
- Update CODEOWNERs (f7ae792)
- [Search NPM Packages] Add Bun Support (raycast#22697)
- Update CODEOWNERs (62749d7)
- Add skyscanner-flights extension (raycast#22646)
- [Premier League] API Migration (raycast#22631)
- Update svelte-docs extension (raycast#22666)
- Update CODEOWNERs (d9f76b0)
- Update keyboard-shortcut-sequences extension (raycast#22181)
- Docs: update for the new API release
- Ertembiyik/update punto (raycast#22624)
- Update svelte-docs extension (raycast#22650)
- Update CODEOWNERs (9894359)
- Add `Grist` extension (raycast#22655)
- Update CODEOWNERs (29553c0)
- Update `Pastefy` extension - add win support + 2 new create preference (close 2 issues) (raycast#22656)
- feat(google-chrome): add exclude search functionality (raycast#22614)
- Update CODEOWNERs (cc8a88c)
- Update url parse extension (raycast#22662)
- Update CODEOWNERs (92771db)
- Add Tempo extension (raycast#22643)
- Update svelte-docs extension (raycast#22533)
- Update CODEOWNERs (977eb5e)
- Add Copy Notion Markdown Link extension (raycast#22523)
- Update prism-launcher extension (raycast#22645)
- Update prism-launcher extension (raycast#22526)
- Update CODEOWNERs (c8bea53)
- Add qrcp extension (raycast#22524)
- Keeper Security Updated Readme file (raycast#22642)
- Update currency-exchange extension (raycast#22620)
- [ENS name lookup]: Fix the extension functionality (raycast#22613)
- Update CODEOWNERs (6c3d489)
- Update any-website-search extension (raycast#22574)
- Update plane extension - README (raycast#22636)
- Update CODEOWNERs (257ee84)
- Update delivery-tracker extension (raycast#22577)
- Update roblox-creator-docs extension (raycast#22538)
- Update plane extension - Support for Plane Self Hosted and API Key authentication (raycast#22608)
- Update tembo extension (raycast#22615)
- Update bible extension (raycast#22606)
- Update `Koyeb` extension - paginate activities + app,service events (raycast#22619)
- Update CODEOWNERs (42d77f5)
- Add linkace extension (raycast#22362)
- Update CODEOWNERs (e1f980c)
- Add paperform extension (raycast#22500)
- Update CODEOWNERs (cdfc891)
- Update T3 Chat extension - Added new models (raycast#22127)
- Update `Attio` extension - use official logo + add task (raycast#22609)
- Update claude extension to dynamically retrieve models (raycast#22217)
- Update CODEOWNERs (936310d)
- Agent Client Protocol client implementation (raycast#22140)
- Update some dependencies to fix some security issues (raycast#22610)
- Update harvest extension (raycast#22545)
- Update CODEOWNERs (b8c8fcd)
- Update some deps to fix vunerability issues (raycast#22546)
- Update discord-timestamps extension (raycast#22554)
- Update Eagle extension (raycast#22560)
- Update zed-recent-projects extension (raycast#22562)
- Updated to Filament 4 (raycast#21869)
- [Coolify] add Windows support (raycast#22565)
- Fix: Compatibility with new Luna UI, Windows Support, Version Updates (raycast#22575)
- Update `Resend` extension - use Node SDK  (raycast#22572)
- Update CODEOWNERs (7a56bbe)
- Update raindrop-io extension (raycast#22552)
- Updated backend endpoints (raycast#22568)
- Update swift-command extension (raycast#22592)
- [Brand Icons] Routine maintenance (raycast#22564)
- Update radarr extension (raycast#22580)
- Update exif extension (raycast#22542)
- Convert Media: add `Copy FFmpeg Command`, remove AVI CRF,... (raycast#22549)
- Update `FreeDNS` extension - modernize + add windows support (raycast#22536)
- Update plane extension README (raycast#22548)
- Update kagi-news extension (raycast#22539)
- Fix casing of \'Windows\' to \'windows\' in keyboard.md (raycast#22540)
- Update CODEOWNERs (0a69122)
- Update timezone-buddy extension (raycast#22349)
- Update reclaim-ai extension to include support for platform: Windows & fix bug with search tasks (raycast#22460)
- Update CODEOWNERs (f4aad1f)
- Add knowyourmeme extension (raycast#22305)
- Update CODEOWNERs (53d4b50)
- Update gitlab extension (raycast#22360)
- Update CODEOWNERs (7b1e59c)
- Add kagi-news extension (raycast#22389)
- brew: Change "formula" to "formulae" (raycast#22518)
- Update CODEOWNERs (257af69)
- Add string-formatter extension (raycast#21859)
- Update CODEOWNERs (2a0fab2)
- Add helium extension (raycast#22290)
- feat(markdown-codeblock): add newline prefix (raycast#22369)
- Update CODEOWNERs (b20058a)
- Docker/add windows support (raycast#22455)
- Add Windows platform support (raycast#22453)
- Update CODEOWNERs (aa68611)
- Add xkcd-password-generator extension (raycast#22433)
- Update CODEOWNERs (8bf2a9d)
- Add Stagehand extension (raycast#22179)
- Update CODEOWNERs (59d237b)
- Add micro-snitch-logs extension (raycast#22390)
- Update CODEOWNERs (238052e)
- Update github extension (raycast#22384)
- Docs: Update the utils docs
- Update CODEOWNERs (42e307e)
- Add ivpn extension (raycast#22149)
- Add Pagination to List of Playlist Songs (raycast#22145)
- [Update] [Things] Increase timeout in AppleScript and update Node packages to latest (raycast#22512)
- Update figma-files-raycast-extension extension (raycast#22254)
- Update prism-launcher extension (raycast#22458)
- Update unicode-symbols extension (raycast#22510)
- Update jsr extension (raycast#22503)
- Update CODEOWNERs (0fd5ad0)
- Add keeper-security extension (raycast#22296)
- Update filemaker-snippets extension (raycast#22509)
- Update CODEOWNERs (e858971)
- Add paynow extension (raycast#22380)
- [ipapi.is] fix error when some location field is invalid (raycast#22493)
- Update CODEOWNERs (ccfa993)
- Update zen-browser extension (raycast#22491)
- Update tembo extension (raycast#22471)
- Delete .github/workflows/add-approve-label.yml (raycast#22501)
- Update `Chatwoot` extension - Add "My Inbox" command + Fix "List Messages" command (raycast#22490)
- update dependencies
- fix(scheduler): add missing code changes
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
@csymons
csymons marked this pull request as ready for review November 13, 2025 10:54
@greptile-apps

ghost commented Nov 13, 2025 •

Copy link
Copy Markdown
Contributor

Greptile Summary

  • Adds background refresh status warning banner to alert users when scheduled commands won't execute automatically
  • Implements tracking via new hook and storage key to detect when background refresh is enabled
  • Includes dependency updates to @raycast/api, @raycast/utils, and cronstrue

Confidence Score: 1/5

  • This PR contains a critical bug that breaks the core feature's functionality
  • The storage write in execute-due-commands.ts:84-87 executes unconditionally, marking background refresh as enabled even when the command runs manually. This defeats the entire purpose of the feature, as the warning banner will disappear after any manual execution without actually verifying background refresh is enabled
  • Pay close attention to extensions/scheduler/src/execute-due-commands.ts - the storage write logic must be fixed before merge

Important Files Changed

Filename Overview
extensions/scheduler/src/execute-due-commands.ts Critical bug: storage write on lines 84-87 happens unconditionally, incorrectly marking background refresh as enabled even during manual execution
extensions/scheduler/src/CommandForm.tsx Hook is imported and used correctly, but warning message contains incorrect instruction about manually running the command
extensions/scheduler/src/hooks/useBackgroundRefreshStatus.ts Hook implementation is correct and properly checks background refresh status from storage

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +84 to +87
setStoredData(STORAGE_KEYS.BACKGROUND_REFRESH_STATUS, {
enabled: true,
lastBackgroundRun: new Date().toISOString(),
});

ghost Nov 13, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: This storage write occurs regardless of launch type, incorrectly marking background refresh as enabled even during manual execution. Based on the background refresh documentation, this should only execute when environment.launchType === LaunchType.Background.

Suggested change
setStoredData(STORAGE_KEYS.BACKGROUND_REFRESH_STATUS, {
enabled: true,
lastBackgroundRun: new Date().toISOString(),
});
import { environment, LaunchType } from "@raycast/api";
// Only set background refresh status when actually running in background mode
if (environment.launchType === LaunchType.Background) {
setStoredData(STORAGE_KEYS.BACKGROUND_REFRESH_STATUS, {
enabled: true,
lastBackgroundRun: new Date().toISOString(),
});
}

@pernielsentikaer

ghost commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

Is above something you want to look into @csymons

@pernielsentikaer
pernielsentikaer marked this pull request as draft November 17, 2025 08:43
- update npm dependencies
- set RefreshStatus on all command calls
- update dependencies
- fix(scheduler): add missing code changes
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
- feat(mcp-registry): update nuxt mcp server url (raycast#22865)
- Update CODEOWNERs (8f56211)
- Update google-chrome extension (raycast#22926)
- Update CODEOWNERs (a390ca2)
- Add kalshi extension (raycast#22776)
- Update CODEOWNERs (0ee9695)
- Add port-from-project-name extension (raycast#22312)
- Add AUP link to README.md (raycast#22935)
- Google Calendar: Make compatible for internal build on Windows (raycast#22932)
- Update CODEOWNERs (142e4b7)
- Update kagi search extension (raycast#22921)
- Update CODEOWNERs (0273e95)
- Update type-snob extension (raycast#22925)
- Update CODEOWNERs (7d5913a)
- Add `Featurebase` extension (raycast#22891)
- Update CODEOWNERs (e634a89)
- Update `LLMs Txt` add Windows support (raycast#22900)
- Update `n8n` extension - fix crash when invalid URL (show EmptyView) (raycast#22917)
- Update CODEOWNERs (3b6e10f)
- Update can-i-use extension (raycast#22923)
- Update bitbucket extension (raycast#22836)
- Add AI assistant tooling to Raindrop.io extension (raycast#22908)
- Update excel-formula-beautifier extension (raycast#22871)
- [Groq] Update models (raycast#22902)
- [Chatwoot] fix msg crash when no sender name (one line fix) (raycast#22919)
- Update CODEOWNERs (a4d9e68)
- Forked extensions windows cloning error when user folder has space (raycast#22914)
- Update `Appwrite` extension - fix users + copy id + add sort order (raycast#22890)
- Update CODEOWNERs (d1dd3af)
- Update installed extensions extension (raycast#22895)
- Update vps-explorer extension (raycast#22863)
- Update 1password extension (raycast#22877)
- Add screenshots for WebBlocker extension (raycast#22893)
- Update CODEOWNERs (8ee1662)
- Update type-snob extension (raycast#22876)
- Update CODEOWNERs (8e37381)
- Add `Immich` extension - Explore + Library + API Keys (raycast#22884)
- Update wechat-devtool extension (raycast#22886)
- Update CODEOWNERs (dac38da)
- Add WebBlocker extension for productivity and focus (raycast#22715)
- Update CODEOWNERs (4c92abd)
- Spotify Player - Add Windows support (raycast#22759)
- Update CODEOWNERs (bb38e63)
- Add yasb extension (raycast#22555)
- Update toolbox extension (raycast#22527)
- Update CODEOWNERs (2ce0208)
- Add winscp extension (raycast#22012)
- Update CODEOWNERs (4bb8c1d)
- Add ports extension (raycast#21729)
- [Home Assistant] Replace deprecated attribute and fix related commands (raycast#22870)
- Update CODEOWNERs (e7d3e1f)
- Update cratecast extension (raycast#22720)
- Update CODEOWNERs (967888a)
- Add qalc extension (raycast#21937)
- Update CODEOWNERs (6a294ca)
- Add eurovision-song-contest extension (raycast#22866)
- [NetNewsWire] fix articles not loading (raycast#22864)
- Update CODEOWNERs (7762919)
- Update library-genesis extension (raycast#22869)
- Update CODEOWNERs (82d7e68)
- Add drug-search extension (raycast#22860)
- set RefreshStatus on all command calls
- update dependencies
- fix(scheduler): add missing code changes
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
@csymons
csymons marked this pull request as ready for review November 18, 2025 07:38

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@pernielsentikaer

ghost commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

@greptileai can you do a full fresh review here?

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this PR, I can see it addresses a common usability issue with scheduled commands in Raycast - users not understanding why their scheduled commands aren't running automatically. Let me provide a comprehensive review:

Overall Assessment

This is a well-designed solution that tackles a real user pain point. The implementation is clean, follows React best practices, and provides clear user guidance.

Positive Aspects

1. Problem Identification & Solution

  • Correctly identifies that background refresh is disabled by default on installation
  • Provides proactive user education rather than reactive support

2. Implementation Quality

  • Clean separation of concerns with dedicated hook (useBackgroundRefreshStatus)
  • Proper error handling and loading states
  • Non-intrusive warning that auto-dismisses once resolved

3. User Experience

  • Clear, actionable warning message
  • Direct link to official documentation
  • Contextual help in the action panel

Technical Review

Hook Implementation (useBackgroundRefreshStatus.ts)

// Good: Proper loading state management
const [isLoading, setIsLoading] = useState(true);

// Good: Defensive error handling
try {
  const status = await getStoredData<BackgroundRefreshStatus>(STORAGE_KEYS.BACKGROUND_REFRESH_STATUS, {
    enabled: false,
  });
  setIsEnabled(status.enabled);
} catch (error) {
  console.error("Error checking background refresh status:", error);
  setIsEnabled(false); // Sensible fallback
}

Status Tracking (execute-due-commands.ts)

// Good: Simple, reliable tracking mechanism
setStoredData(STORAGE_KEYS.BACKGROUND_REFRESH_STATUS, {
  enabled: true,
  lastBackgroundRun: new Date().toISOString(),
});

UI Implementation (CommandForm.tsx)
The warning banner implementation is well-structured:

  • Uses proper conditional rendering
  • Includes both visual warning (⚠️) and actionable instructions
  • Provides alternative activation method ("run once to enable")

Minor Suggestions

1. Consider Adding Retry Mechanism
For edge cases where the hook might fail to detect the status:

// In the hook, you could add a refresh mechanism
const refreshStatus = useCallback(async () => {
  setIsLoading(true);
  await checkStatus();
}, []);

return { isEnabled, isLoading, refreshStatus };

2. More Specific Error Messaging
The current generic error handling could be more specific:

} catch (error) {
  console.error("Error checking background refresh status:", error);
  // Could differentiate between storage errors vs other issues
  setIsEnabled(false);
}

3. Consider Accessibility
The warning emoji might not be screen-reader friendly. Consider:

text="⚠️ Background Refresh Not Enabled" 
// Could be:
text="Warning: Background Refresh Not Enabled"

Dependencies & Compatibility

The dependency updates look appropriate:

  • @raycast/api: 1.103.3 → 1.103.6
  • @raycast/utils: 2.2.1 → 2.2.2
  • cronstrue: 3.3.0 → 3.9.0

All are minor/patch updates that shouldn't introduce breaking changes.

Testing Considerations

Manual Testing Scenarios:

  1. Fresh extension installation (should show warning)
  2. After running "Execute Due Commands" once (warning should disappear)
  3. After enabling background refresh in preferences (warning should disappear)
  4. Error handling when storage is corrupted

Security & Performance

  • No security concerns identified
  • Storage operations are lightweight
  • Hook properly cleans up with loading states
  • No memory leaks apparent

Documentation

The changelog entry is clear and describes the fix well. The implementation self-documents through clear variable names and structure.

Final Verdict

Approve ✅

This is a high-quality implementation that solves a real user problem. The code is clean, well-structured, and follows Raycast extension best practices. The solution is user-friendly and provides clear guidance without being obtrusive.

The minor suggestions above are optional improvements but don't block the current implementation, which is solid as-is.

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit cd467e8 into raycast:main Nov 18, 2025
@github-actions

ghost commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 18, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@csymons
csymons deleted the ext/scheduler branch February 16, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: scheduler Issues related to the scheduler extension OP is author The OP of the PR is the author of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command Scheduler cannot schedule commands

3 participants