Skip to content

(schedules): list schedule files and their next run in the main process (#792) - #1021

Merged
devsuitup merged 5 commits into
mainfrom
wt/792
Nov 7, 2026
Merged

devsuitup merged 5 commits into
mainfrom
wt/792

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Slice A1 of #792 (Schedules tab), per the verified spec rev 4.3 (.work-files/spec-792.md, two verifier rounds, amendments applied). Backend only, no UI change, so no changelog entry (docs/changelog.md:81-82).

  • src/main/schedules/schedule-list.js: Electron-free buildScheduleList(deps) (getCachedByFolder, isScheduleRunLive, scheduleProjects, catchUpActive injected), registered as list-schedules in main.js and exposed as listSchedules in preload; result: null until slice D.
  • schedule-runner: listScheduleFiles, isRunnerScheduleFileName, nextCronMatch (minute walk; skips the rest of an hour only to the next local minute 0, so half-hour zones and DST fall-back are exact), describeCron.
  • scheduleLaunchRefusal is the one rule shared by runScheduleCommand and the listing's problems (sandbox off Linux, refused add-dirs); scheduleBindRefusals( no longer appears in main.js.
  • Runs query with replied (assistant check, not isCountedMessage) and running.

Tests: schedule-list (13), schedule-next-run (5, incl. Europe/Paris DST and Asia/Kolkata), schedule-file-name; each spec mutation shown red first (Codex report). Green under Node 22 with both TMP spellings and under Node 20; module-layout, schedule-live-resume and run-schedule-now-result green. Lint clean.

Harness-Claim: true
Agent: switchboard-dev
Host: ANCHOR
Base-Ref: origin/main
Base-SHA: e0f144b
Claimed-At: 2026-11-03T21:19:00.6638185Z
Nonce: 63ab9b47b04f28d8
…ss (#792)

Slice A1 of the Schedules tab: list every runner schedule file with its
cron description, next run (local-minute walk, DST and half-hour zones),
problems the runner would refuse on (shared scheduleLaunchRefusal), and
recent runs with replied/running, behind a list-schedules IPC. No UI yet.
@devsuitup devsuitup added the no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived label Nov 4, 2026
Unsandboxed launches have nothing to refuse, and the harnesses that extract the
launch code do not define the helper. Anchor the off-Linux test on the helper
call, since the platform check now lives in the helper.
…efuse it

A malformed cron no longer fails the whole listing, a schedule whose command the
runner cannot build is reported instead of promised a run, and known projects are
computed once per listing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant