diff --git a/web/src/components/Cron/CronSidebar.tsx b/web/src/components/Cron/CronSidebar.tsx index c61bb3c3..061eaca8 100644 --- a/web/src/components/Cron/CronSidebar.tsx +++ b/web/src/components/Cron/CronSidebar.tsx @@ -3,13 +3,27 @@ import { useCronStore } from '../../stores/cronStore'; import { chatPath, jobLabel } from './utils'; import { ChatLink, TriggerButton, JobTypeIcon } from './controls'; -export function CronSidebar() { +export function CronSidebar({ inDrawer = false, onSelect }: { + inDrawer?: boolean; + /** + * Fired after every plain selection, including one that re-picks the job + * already selected. Drawer mode closes on it — watching `selectedJobId` + * instead misses that case and leaves the list parked over the table. + * Modified and middle clicks open a new tab and select nothing, so they + * are exempt. + */ + onSelect?: () => void; +}) { const { jobs, selectedJobId, selectJob } = useCronStore(); return ( -