fix(cos): warn when pending on-demand tasks can't run because the daemon is stopped - #6220
Merged
Merged
Conversation
…mon is stopped triggerOnDemandTask() writes a request to schedule.onDemandRequests regardless of daemon state, but dequeueNextTask() bails immediately when isDaemonRunning() is false — so a stopped daemon leaves the "Pending On-Demand Tasks" banner showing a request that will never be picked up, with no indication why. Pass the already-live status.running down from ChiefOfStaff so the banner switches to a warning and the queue toast tells the user the daemon needs to be started, instead of looking silently stuck.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
triggerOnDemandTask()writes the request regardless of daemon state, butdequeueNextTask()bails immediately when the CoS daemon is stopped, so the entry can sit there indefinitely.status.runningfromChiefOfStaffdown intoScheduleTab: the banner switches to a warning tone with an explanatory message and a pointer to the Start button, and the "Queued..." toast becomes an error toast explaining the daemon needs to be started, instead of the misleading success message.timeAgoformatter.Test plan
daemonRunning={false}.npx vitest run src/components/cos/tabs/ScheduleTab.test.jsx— 3/3 pass.npx biome lint --error-on-warningson the three changed files — clean.