Repository navigation
Description
Summary
Add client-side cron expression validation to the schedule create/edit form, and surface a warning icon next to schedules in the list whose stored cron_expression no longer parses. Today the backend rejects invalid cron via croniter (src/backend/routers/schedules.py:232, :287), but the frontend has no preflight check and no visible signal on the schedule list when something is wrong — users only find out by submitting the form or watching schedules silently fail to fire.
Context
The schedule form in src/frontend/src/components/SchedulesPanel.vue exposes a raw cron text field with preset buttons but no validation feedback. A malformed expression round-trips to the backend, surfaces as a 400, and the user has to interpret the error message. Worse, if a previously-valid cron becomes invalid (e.g., manual DB edit, schema change, or a parser-behavior shift), the row in the schedule list looks identical to a healthy one.
Acceptance Criteria
- Schedule form validates
cron_expressionon input/blur using a JS cron parser (e.g.,cron-parserorcronstrue+ a parse attempt), with inline error text matching the backend message style - Submit button is disabled while the expression is invalid
- Each row in the schedules list shows a warning icon (with tooltip "Invalid cron expression") when
cron_expressionfails to parse client-side - Backend response for invalid cron is preserved unchanged (no contract change)
- Presets remain valid and do not trigger the warning state
Technical Notes
- Frontend:
src/frontend/src/components/SchedulesPanel.vue— add validation insideformDatawatcher and per-row computed flag for the list rendering near line 282 - Backend: validation already in place at
src/backend/routers/schedules.py:232,287viacroniter— no changes required - Library choice: align client parser with
cronitersyntax (5-field, no seconds) to avoid client-server disagreement on edge cases (e.g.,*/30 * * * *) - Out of scope: server-side migration of existing invalid rows; warning icon is purely a UI affordance
Activity
feat(schedules): client-side cron validation + invalid-schedule warni…
fix(workspace): the chat card's pre-read title matches the feed's (#2964
fix(workspace): the live chat card keeps one shape across the feed re…