Skip to content

fix(cos): warn when pending on-demand tasks can't run because the daemon is stopped - #6220

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtmlm695/agent-19ec9670
Sep 4, 2026
Merged

fix(cos): warn when pending on-demand tasks can't run because the daemon is stopped#6220
atomantic merged 1 commit into
mainfrom
cos/task-mtmlm695/agent-19ec9670

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • The Schedule page's "Pending On-Demand Tasks" banner shows a queued request (e.g. branch-reconcile) with no indication of whether it can actually run — triggerOnDemandTask() writes the request regardless of daemon state, but dequeueNextTask() bails immediately when the CoS daemon is stopped, so the entry can sit there indefinitely.
  • Pass the already-live status.running from ChiefOfStaff down into ScheduleTab: 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.
  • Also show a relative "requested Xm ago" alongside the existing time-of-day stamp, using the existing timeAgo formatter.

Test plan

  • Added a test asserting the warning toast text and the daemon-stopped banner copy when daemonRunning={false}.
  • npx vitest run src/components/cos/tabs/ScheduleTab.test.jsx — 3/3 pass.
  • npx biome lint --error-on-warnings on the three changed files — clean.

…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.
@atomantic
atomantic merged commit acee0d5 into main Sep 4, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtmlm695/agent-19ec9670 branch September 4, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant