feat(dashboard): expose cron job execution fields - #53551
Merged
Conversation
Collapse the three near-identical optional-text helpers (optionalText/optionalBaseUrl/listToText) into one optionalText with a strip-trailing-slash flag, route listToText + toolsets through the existing splitCronList, and replace the repeated typeof x === 'string' ? x : '' ladders with a single asString helper. Behavior-identical; all 16 vitest cases pass.
Contributor
🔎 Lint report:
|
19 tasks
1 task
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
The dashboard cron create/edit flow can now manage the full set of execution fields the scheduler core already supports — provider/model/base_url overrides,
script,no_agent,context_from,enabled_toolsets, andworkdir— instead of just prompt/schedule/name/deliver/skills.Salvage of #53478 by @versun, cherry-picked onto current
mainwith authorship preserved, plus a small follow-up that tightens the new form-helper module.Changes
web/src/pages/CronPage.tsx: shared create/edit form (removes the prior narrow-form duplication) with an "Advanced fields" section for the execution fields and profile-scoped model/toolset options.web/src/lib/cron-job.ts: form ⇄ mutation-payload helpers. (Follow-up: collapsed three near-identical optional-text helpers into one + reusedsplitCronList/asString; behavior-identical.)web/src/lib/schedule.ts:parseScheduleStringround-trips a stored schedule back into the structured picker on edit (daily/weekly/monthly/once), withcustomas the lossless fallback.web/src/lib/api.ts: widens cron job API types; fetches model options for the selected profile.hermes_cli/web_server.py: normalizes dashboard cron payloads into the existingcron.jobsshape, validates scripts against the profile'sscripts/dir (path-traversal-safe viaresolve()+relative_to()), and validatescontext_fromIDs within the selected profile.cron/jobs.py: factors the provider/model drift-snapshot logic into a helper and — the real fix — re-snapshots on update when an inference-routing axis materially changes (previously snapshot was create-only, so editing a job's provider/model left the [Bug]: Cron can inherit temporary paid provider state and continue billing during pause/stop containment #44585 drift guard comparing against stale data).Validation
tests/hermes_cli/test_web_server_cron_profiles.pyweb/src/lib/cron-job.test.ts+schedule.test.ts(vitest)npm --workspace web run typecheckeslint cron-job.ts CronPage.tsxNo new model tool — capability stays on the existing dashboard/API surface, per the footprint rubric.
Infographic