Let a conversation's menu show the routines that run in it

The header menu had Tasks but nothing for the schedules whose results
land in that conversation. It now has Schedules, right under Tasks,
opened in a modal that lists only what runs there: a bot's own chat holds
the routines that run nowhere, a workspace only that bot's routines in
it (`routineScopeSql`, tested against SQLite).

The list loads when the modal opens, through
`api/admin/bots/list-routines`, which checks the user chats in that
conversation first, so the page props stay small. `grabCronJobs` gained
an optional `workspace_id`: left out it still means everywhere.

The routines page's row, form and edit modal moved to
`src/components/general/`, and its subtitle to `src/utils/`, since both
the page and the modal use them.
This commit is contained in:
2026-10-23 07:23:15 +01:00
parent 796c53716f
commit 5beb5f3de4
17 changed files with 566 additions and 18 deletions
@@ -12,6 +12,7 @@ import isPassThroughUser from "@/src/utils/rbac/is-pass-through-user";
import BotComputersModal from "./bot-computers-modal";
import BotFilesModal from "./bot-files-modal";
import BotTasksModal from "./bot-tasks-modal";
import BotRoutinesModal from "./bot-routines-modal";
import BotModelsModal from "./bot-models-modal";
import HeaderMenuItem from "./header-menu-item";
import NewSessionButton from "./new-session-button";
@@ -108,6 +109,12 @@ export default function ConversationHeaderMenu({
workspace={workspace}
on_open={on_open}
/>
<BotRoutinesModal
menu
bot={bot}
workspace={workspace}
on_open={on_open}
/>
<BotComputersModal
menu
bot={bot}