Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Agent/Schedules from ./agent-schedules.
import { AgentSchedulesScreen } from "@/components/ui/agent-schedules";
export default function Page() {
const [schedules, setSchedules] = useState(initialSchedules);
return (
<AgentSchedulesScreen
schedules={schedules} // runs: past and coming times; duration: how long a run takes
onPause={(id, paused) => api.pause(id, paused)}
onRunNow={(id) => api.runNow(id)}
onSkip={(id, at, skipped) => api.skip(id, at, skipped)}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| schedules | { id; name; project?; tone?; prompt?; cadence; runs: number[]; duration?; paused?; history?: { at; outcome: "done" \| "needs" \| "failed"; summary; cost? }[]; cost? }[] | Every schedule. cadence is its rhythm in words; runs are its past and coming times in ms – the line shows the ones around now, the panel the next five; duration is how long a run takes, and the ring fills over it; history is how the last runs ended, newest first; cost is what a run costs on average. Pass a stable array (state) | |
| defaultSelected | string \| null | "scan" | The schedule open on the right when the screen starts |
| onPause | (id, paused) => void | Called when a schedule is paused or resumed – from its switch or the panel | |
| onRunNow | (id) => void | Called with Run now – the run shows up on the line at once and fills over the schedule's duration | |
| onSkip | (id, at, skipped) => void | Called when one coming run is skipped or restored | |
| onSelect | (id) => void | Called when a schedule is opened | |
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| labels | { schedules?; aroundNow?; runningNow?; next?; pause?; resume?; runNow?; skip?; … } | Labels, e.g. for a translation | |
| loading | boolean | While your schedules load: a gray chart, gray rows and a gray Schedule panel, in the shape of the real ones (the shared Skeleton) | |
| empty | boolean | No schedules at all: the page shows No schedules yet with a sentence on how to make one and an Ask in Thread button (calls onNavigate with "Thread"); the Schedule panel shows nothing open | |
| className | string | Extra class on the root |
Fills its container; the page keeps a readable 760px column and the line takes its full width
Rows are one line like a board's list – name, rhythm, next run, last outcome, cost and switch; below 640px outcome and cost move to the panel
Below 440px a row takes three short lines – name, rhythm, next run – with its mark beside the first
Long names and rhythms end in '…' with the whole in a tooltip and the panel; a long brief shows six lines with Show all; a big cost shortens to €1.3K in its column
Touch targets grow to 36px and the switch to 40 × 24 on touch screens
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"