fix(web): CronPage crash when rendering schedule object

The cron API returns schedule as {kind, expr, display} object but
CronPage.tsx rendered it directly as a React child, crashing with
'Objects are not valid as a React child'.

- Update CronJob interface in api.ts to match actual API response
- Use schedule_display (string) instead of schedule (object)
- Use state instead of status for job state
- Use last_error instead of error for error display
This commit is contained in:
jonny 2026-04-13 12:01:12 +02:00 committed by Teknium
parent 8dfee98d06
commit 70f490a12a
2 changed files with 19 additions and 12 deletions

View file

@ -222,12 +222,14 @@ export interface CronJob {
id: string;
name?: string;
prompt: string;
schedule: string;
status: "enabled" | "paused" | "error";
schedule: { kind: string; expr: string; display: string };
schedule_display: string;
enabled: boolean;
state: string;
deliver?: string;
last_run_at?: string | null;
next_run_at?: string | null;
error?: string | null;
last_error?: string | null;
}
export interface SkillInfo {