- {goal.status !== "completed" ? (
- <>
- -
-
-
-
-
- Active
-
- {goal.status === "active"
- ? `Its ${starters} start it.`
- : `Paused. Its ${starters} won't start it.`}
-
-
-
-
- action.mutate({
- id: goal.id,
- action: active ? "resume" : "pause",
- })
- }
- />
-
-
-
- >
- ) : null}
{goal.status === "active" ? (
<>
-
- {
- remove.reset();
- setConfirmingDelete(true);
- }}
- title="Delete goal"
- />
{action.error ? (
@@ -555,6 +547,21 @@ export function GoalPage({
+ {/* Away from the everyday controls, at the bottom. */}
+
+
+ {
+ remove.reset();
+ setConfirmingDelete(true);
+ }}
+ title="Delete goal"
+ />
+
+
+
@@ -603,7 +610,7 @@ export function GoalPage({
const RUN_LABEL: Record = {
queued: "Queued",
- running: "Running",
+ running: "Running now",
waiting: "Waiting for you",
succeeded: "Succeeded",
failed: "Failed",
diff --git a/app/src/components/routines/bot-group.tsx b/app/src/components/routines/bot-group.tsx
index 78e6e80a20..d75de32942 100644
--- a/app/src/components/routines/bot-group.tsx
+++ b/app/src/components/routines/bot-group.tsx
@@ -1,175 +1,73 @@
+import { useQuery } from "@tanstack/react-query";
import { Link } from "@tanstack/react-router";
import { AnimatePresence } from "motion/react";
import { BotOrb } from "@/components/agents/bot-orb";
-import {
- IconClock,
- IconEye,
- IconLoader2,
- IconPlayerPause,
- IconTarget,
-} from "@/components/icons";
-import { KIND_LABEL } from "@/components/responsibilities/triggers";
-import { useGoalTriggers } from "@/components/responsibilities/use-goal-reads";
+import { PageRows } from "@/components/layout/page-shell";
+import { RoutineRow, routineCount } from "@/components/routines/routine-row";
import { Unfold } from "@/components/routines/unfold";
-import {
- type BotGroup,
- isOff,
- isRunning,
- type RowTone,
- rowFact,
- rowName,
-} from "@/lib/routines/by-bot";
-import { describeEvent } from "@/lib/routines/events";
-import { goalStarts, type MergedRoutine } from "@/lib/routines/merged";
-import { cn } from "@/lib/utils";
+import { Separator } from "@/components/ui/separator";
+import { agentQueryOptions } from "@/lib/agents/queries";
+import type { BotGroup } from "@/lib/routines/by-bot";
+import type { MergedRoutine } from "@/lib/routines/merged";
-const ROW_CLASS =
- "flex flex-col gap-0.5 rounded-lg px-2 py-2 text-sm hover:bg-muted sm:flex-row sm:items-center sm:gap-3";
-
-const FACT_CLASS: Record = {
- running: "text-foreground",
- warning: "text-warning",
- muted: "text-muted-foreground",
- normal: "text-muted-foreground",
-};
-
-function RowIcon({ row }: { row: MergedRoutine }) {
- const className = "size-4 shrink-0 text-muted-foreground";
- if (isRunning(row))
- return (
-
- );
- if (isOff(row)) return ;
- switch (row.kind) {
- case "routine":
- return ;
- case "goal":
- return ;
- case "check-in":
- return ;
- }
-}
-
-/** A row's one line: its icon, its name, and the one fact about it. */
-function RowLine({
- row,
- starts,
-}: {
- row: MergedRoutine;
- /** A goal's starts in words; the others have none. */
- starts: string | null;
-}) {
- const fact = rowFact(row, starts);
- return (
- <>
-
-
- {rowName(row)}
-
-
- {fact.text}
-
- >
- );
-}
-
-/** Dimmed when its fact is the muted one: paused, or a goal that is completed. */
-function rowClass(row: MergedRoutine, starts: string | null) {
- return cn(ROW_CLASS, rowFact(row, starts).tone === "muted" && "opacity-60");
+/**
+ * One row as the Routines page draws it. The shared row (`RoutineRow`), kept under this name for the
+ * Bot's page, which draws it too.
+ */
+export function GroupRow({ row }: { row: MergedRoutine }) {
+ return ;
}
/**
- * A goal's row. Its own component, so only an active goal reads its triggers (`useGoalTriggers`),
- * which its starts are made of.
+ * The name a group heads with. A Bot no list has (one shared with you, or not listed for this
+ * person) is read on its own, so its group says its real name; "A Bot" only while that read is on
+ * its way or when it fails, as for a Bot that was deleted.
*/
-function GoalRow({ row }: { row: Extract }) {
- const triggers = useGoalTriggers(row.goal.id, {
- enabled: row.goal.status === "active",
+function useGroupName(group: BotGroup): string {
+ const bot = useQuery({
+ ...agentQueryOptions(group.botId),
+ enabled: !group.known,
+ retry: false,
});
- const starts = goalStarts(
- row.goal,
- triggers.data
- ?.filter((trigger) => trigger.enabled)
- .map((trigger) => `${KIND_LABEL[trigger.kind]} trigger`),
- row.routines,
- describeEvent,
- );
- return (
-
-
-
- );
-}
-
-/** One row as the Routines page draws it, opening the routine, goal or check-in it is. */
-export function GroupRow({ row }: { row: MergedRoutine }) {
- switch (row.kind) {
- case "routine":
- return (
-
-
-
- );
- case "goal":
- return ;
- case "check-in":
- return (
-
-
-
- );
- }
+ return group.known ? group.name : (bot.data?.name ?? group.name);
}
/**
- * One Bot's routines on the Routines page: the Bot's orb, name and how many it has, then one line
- * per row. The name opens the Bot's own Routines page, except for "A Bot", a Bot no list knows,
- * which has none.
+ * One Bot's routines on the Routines page: the Bot's orb, name and how many it has, then its rows in
+ * one card. The name opens the Bot's own Routines page, except for a Bot no list knows, which has none.
*/
export function BotGroupSection({ group }: { group: BotGroup }) {
+ const name = useGroupName(group);
return (
// Spaced with padding, not margin: the group's height opens and folds, and a margin outside it
// would jump.
-
-
-
+
+
+
{group.known ? (
- {group.name}
+ {name}
) : (
- {group.name}
+ {name}
)}
- {group.rows.length}
+ {routineCount(group.rows.length)}
- {/* A routine made or removed while the page is open opens or folds; the rest just appear. */}
-
- {group.rows.map((row) => (
-
-
-
- ))}
-
+
+ {/* A routine made or removed while the page is open opens or folds; the rest just appear. */}
+
+ {group.rows.map((row, index) => (
+
+ {index > 0 ? : null}
+
+
+ ))}
+
+
);
}
diff --git a/app/src/components/routines/delete-row.tsx b/app/src/components/routines/delete-row.tsx
index 3cea2ccdb9..c35569d356 100644
--- a/app/src/components/routines/delete-row.tsx
+++ b/app/src/components/routines/delete-row.tsx
@@ -8,9 +8,9 @@ import {
} from "@/components/ui/item";
/**
- * The last row of a goal's, a schedule's or a check-in's actions card: delete it, after a
- * confirmation the page opens. A row in the card with the page's other actions, never a button left
- * on its own under the page, which reads as something that fell out of the layout.
+ * Delete a goal, a schedule or a check-in, after a confirmation the page opens. A row in a card of
+ * its own, in the last section of the page: away from the everyday controls, so it is never pressed
+ * on the way to Run now, and still a row, never a button left on its own under the page.
*/
export function DeleteRow({
title,
diff --git a/app/src/components/routines/new-routine-page.tsx b/app/src/components/routines/new-routine-page.tsx
index db7b45088a..b406175cb6 100644
--- a/app/src/components/routines/new-routine-page.tsx
+++ b/app/src/components/routines/new-routine-page.tsx
@@ -1,18 +1,20 @@
import { useSelector } from "@tanstack/react-form";
import { useInfiniteQuery, useMutation, useQuery } from "@tanstack/react-query";
import { Link, linkOptions, useNavigate } from "@tanstack/react-router";
-import { useEffect, useRef } from "react";
+import { useEffect, useRef, useState } from "react";
import { AbstractAvatar } from "@/components/agents/abstract-avatar";
-import {
- PageCard,
- PageSection,
- PageShell,
-} from "@/components/layout/page-shell";
+import { IconChevronRight } from "@/components/icons";
+import { PageCard, PageShell } from "@/components/layout/page-shell";
import {
ScheduleWhen,
useRoutineForm,
} from "@/components/routines/schedule-when";
import { Button } from "@/components/ui/button";
+import {
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleTrigger,
+} from "@/components/ui/collapsible";
import {
Field,
FieldDescription,
@@ -67,6 +69,7 @@ import {
import { openingOf } from "@/lib/voice/cut";
import { queryClient } from "@/query-client";
import { failureSaid } from "@/lib/load-failure";
+import { cn } from "@/lib/utils";
/** The conversations a routine for this Bot may post in: live ones the Bot is in. */
function conversationsWith(
@@ -266,10 +269,106 @@ export function NewRoutinePage({
if (saved) goToRoutines.current?.focus();
}, [saved]);
+ /*
+ * Advanced settings: open from the start when what fills the form already set one of them (a
+ * sentence that named it, or the clock beside a conversation), and held open while one of them has
+ * a message, so Create can move focus to it.
+ */
+ const [advanced, setAdvanced] = useState(
+ Boolean(
+ defaultValues.doneWhen ||
+ defaultValues.title ||
+ defaultValues.channelId !== NEW_CONVERSATION,
+ ),
+ );
+ const advancedOpen =
+ advanced || "doneWhen" in shown || "title" in shown || "channelId" in shown;
+
const botItems = Object.fromEntries(
(agents.data ?? []).map((agent) => [agent.id, agent.name]),
) as Record
;
+ const startsSelect = (
+
+ {(field) => (
+ field.handleChange(value as Starts)}
+ value={field.state.value}
+ >
+
+
+
+
+
+ {STARTS.map((choice) => (
+
+ {STARTS_LABEL[choice]}
+
+ ))}
+
+
+
+ )}
+
+ );
+
+ const buttons = saved ? (
+ // Cancel says nothing was kept. After a partial or uncertain save the work is kept, and Go to
+ // Routines goes to the same list.
+ {
+ goToRoutines.current = element;
+ }}
+ render={(props) => (
+
+ )}
+ variant="outline"
+ >
+ Go to Routines
+
+ ) : (
+ <>
+ {createFromPlan.isPending ? (
+ // Not a link while the writes are on their way: leaving now would hide what they answer.
+
+ Cancel
+
+ ) : (
+ }
+ variant="outline"
+ >
+ Cancel
+
+ )}
+ {/* Enabled while a message shows: pressing it takes the person to the first one. A
+ disabled button says nothing about why, and a keyboard can't reach it. */}
+ state.isSubmitting}>
+ {(isSubmitting) => (
+
+ {isSubmitting || createFromPlan.isPending
+ ? "Creating…"
+ : "Create routine"}
+
+ )}
+
+ >
+ );
+
return (
);
diff --git a/app/src/components/routines/routine-page.tsx b/app/src/components/routines/routine-page.tsx
index 7a7723db35..d89a28a6b1 100644
--- a/app/src/components/routines/routine-page.tsx
+++ b/app/src/components/routines/routine-page.tsx
@@ -15,6 +15,7 @@ import { Link, type LinkProps, useNavigate } from "@tanstack/react-router";
import { Fragment, useState } from "react";
import { LoadingRows } from "@/components/layout/loading-rows";
import {
+ PageCard,
PageRows,
PageSection,
PageShell,
@@ -47,7 +48,7 @@ import {
} from "@/components/ui/item";
import { Separator } from "@/components/ui/separator";
import { Switch } from "@/components/ui/switch";
-import { agentListQueryOptions } from "@/lib/agents/queries";
+import { agentListQueryOptions, agentQueryOptions } from "@/lib/agents/queries";
import { deleteQuestion } from "@/lib/delete-question";
import { loadFailure, failureSaid } from "@/lib/load-failure";
import { stopIfNeedsCard } from "@/lib/plan/queries";
@@ -66,7 +67,11 @@ import {
} from "@/lib/routines/queries";
import { runSourceLabel } from "@/lib/routines/run-source";
import { cn } from "@/lib/utils";
-import { lastRunLabel } from "@/lib/routines/words";
+import {
+ lastRunLabel,
+ scheduleWords,
+ viewerTimeZone,
+} from "@/lib/routines/words";
import { queryClient } from "@/query-client";
export {
@@ -94,7 +99,7 @@ const RUN_STATUS: Record<
RoutineRunRecord["status"],
{ text: string; className: string }
> = {
- running: { text: "Running", className: "" },
+ running: { text: "Running now", className: "" },
succeeded: {
text: "Succeeded",
className: "text-success",
@@ -210,6 +215,21 @@ export function RoutineRoutePage({
);
const back = routinesOf(agentId);
const routine = routines.data?.routines.find((row) => row.id === routineId);
+ // A routine outlives hiding its Bot, so a hidden Bot still names it.
+ const listed = [...(bots.data ?? []), ...(hidden.data ?? [])].find(
+ (bot) => bot.id === routine?.botId,
+ )?.name;
+ // A Bot neither list has is read on its own, so the page still says its real name.
+ const alone = useQuery({
+ ...agentQueryOptions(routine?.botId ?? ""),
+ enabled:
+ routine !== undefined &&
+ agentId === undefined &&
+ bots.isSuccess &&
+ hidden.isSuccess &&
+ listed === undefined,
+ retry: false,
+ });
if (!routine)
return (
);
- // A routine outlives hiding its Bot, so a hidden Bot still names it.
- const botName = [...(bots.data ?? []), ...(hidden.data ?? [])].find(
- (bot) => bot.id === routine.botId,
- )?.name;
+ const botName = listed ?? alone.data?.name;
return (
fact !== null);
return (
+ {/* Binary and immediate: it takes effect when switched, there is no save. */}
+
+ setEnabled.mutate({ id: routine.id, enabled })
+ }
+ />
+
+ {routine.enabled ? "On" : "Paused"}
+
+ {/* More than one value, so a dialog: the same fields New routine asks for. */}
+ setEditing(true)}
+ size="sm"
+ type="button"
+ variant="outline"
+ >
+
+ Edit
+
+
+ }
backButton={{ label: "Routines", linkProps: back }}
description={
routine.enabled
- ? `${routine.schedule} · ${routine.timezone} · Acts`
+ ? scheduleWords(routine)
: "Paused. Nothing starts it until you turn it on."
}
title={named}
>
- {/* What can be done to it now. The page title names it, so this section has no heading. */}
+ {/* What it does, word for word: New routine's What to do. */}
+
+
+ {does}
+
+
+
+ {/* What can be done with it besides switching and editing. The page title names it, so this
+ section has no heading. */}
- -
-
-
-
-
- On
-
- {routine.enabled
- ? "It runs on its schedule."
- : "Paused. It won't run on its schedule."}
-
-
-
- {/* Binary and immediate: it takes effect when switched, there is no save. */}
-
- setEnabled.mutate({ id: routine.id, enabled })
- }
- />
-
-
-
-
- {/* More than one value, so a dialog: the same fields New routine asks for. */}
- - setEditing(true)} type="button" />}
- size="sm"
- >
-
-
-
-
- Edit routine
-
- Change its name, what it does, or when it runs.
-
-
-
-
-
-
-
{routine.conversation.gone ? (
-
@@ -446,26 +463,14 @@ export function RoutinePage({
>
) : null}
-
- {
- remove.reset();
- setConfirming(true);
- }}
- title="Delete routine"
- />
{setEnabled.error || runNow.error ? (
{failureSaid(setEnabled.error ?? runNow.error)}
) : null}
- {/*
- * The press is answered here, as the check-in page answers its own Run now: it started, and
- * where to watch it. The link sits outside the Run now row, which is a button.
- */}
+ {/* The press is answered here, as the check-in page answers its own Run now: it started, and
+ where to watch it. */}
{runNow.isSuccess ? (
{routine.conversation.gone ? (
@@ -504,25 +509,26 @@ export function RoutinePage({
))}
- {routine.title && routine.title !== does ? (
- <>
-
- -
-
- {/* New routine's word for it. */}
- What to do
-
- {does}
-
-
-
- >
- ) : null}
+ {/* Away from the everyday controls, at the bottom, as Delete is on every other settings page. */}
+
+
+ {
+ remove.reset();
+ setConfirming(true);
+ }}
+ title="Delete routine"
+ />
+
+
+
{
+ routine.reset();
+ goal.reset();
+ checkIn.reset();
+ setWanted(on);
+ switch (row.kind) {
+ case "routine":
+ routine.mutate({ id: row.routine.id, enabled: on });
+ return;
+ case "goal":
+ goal.mutate({ id: row.goal.id, action: on ? "resume" : "pause" });
+ return;
+ case "check-in":
+ if (on !== row.checkIn.enabled)
+ checkIn.mutate({
+ setting: row.checkIn,
+ change: { kind: "toggle" },
+ });
+ return;
+ }
+ };
+ return {
+ on: switchedOn(row),
+ pending: routine.isPending || goal.isPending || checkIn.isPending,
+ failure: error
+ ? loadFailure(
+ error,
+ `Couldn't turn it ${wanted ? "on" : "off"}. Try again.`,
+ )
+ : null,
+ toggle,
+ };
+}
+
+/**
+ * A row's on/off switch. A completed goal has none: nothing turns it back on. Pass the hook's result
+ * when the row also says the failure; otherwise the switch keeps its own.
+ */
+export function RoutineSwitch({
+ row,
+ control,
+}: {
+ row: MergedRoutine;
+ control?: ReturnType;
+}) {
+ const own = useRoutineSwitch(row);
+ const { on, pending, toggle } = control ?? own;
+ if (row.kind === "goal" && row.goal.status === "completed") return null;
+ return (
+
+ );
+}
+
+function RowIcon({ row }: { row: MergedRoutine }) {
+ if (isRunning(row))
+ return ;
+ if (isOff(row)) return ;
+ switch (row.kind) {
+ case "routine":
+ return ;
+ case "goal":
+ return ;
+ case "check-in":
+ return ;
+ }
+}
+
+/** The address a row opens: its routine's, goal's or check-in's page. */
+function RowLink({
+ row,
+ className,
+ children,
+}: {
+ row: MergedRoutine;
+ className: string;
+ children: React.ReactNode;
+}) {
+ switch (row.kind) {
+ case "routine":
+ return (
+
+ {children}
+
+ );
+ case "goal":
+ return (
+
+ {children}
+
+ );
+ case "check-in":
+ return (
+
+ {children}
+
+ );
+ }
+}
+
+/** What a paused row still says after "Paused": when it would run, so turning it on is no guess. */
+function pausedWhen(row: MergedRoutine): string | null {
+ switch (row.kind) {
+ case "routine":
+ return scheduleWords(row.routine);
+ case "check-in":
+ return `Checks ${intervalLabel(row.checkIn.intervalMinutes).toLowerCase()}`;
+ case "goal":
+ return null;
+ }
+}
+
+/**
+ * The line under a row's name, the first of these that applies: running, a warning, paused (with
+ * when it would run), and otherwise when it starts and when it runs next.
+ */
+export function routineLine(
+ row: MergedRoutine,
+ starts: string | null,
+): { text: string; tone: RowTone } {
+ const fact = rowFact(row, starts);
+ if (fact.tone === "muted" && fact.text === "Paused") {
+ const when = pausedWhen(row);
+ return { text: when ? `Paused · ${when}` : "Paused", tone: "muted" };
+ }
+ if (fact.tone !== "normal") return fact;
+ const next = nextRunWords(row);
+ return {
+ text: [fact.text, next].filter(Boolean).join(" · "),
+ tone: "normal",
+ };
+}
+
+const LINE_CLASS: Record = {
+ running: "text-foreground",
+ warning: "text-warning",
+ muted: "",
+ normal: "",
+};
+
+function RowBody({
+ row,
+ starts,
+}: {
+ row: MergedRoutine;
+ starts: string | null;
+}) {
+ const control = useRoutineSwitch(row);
+ const name = rowName(row);
+ const line = routineLine(row, starts);
+ return (
+ -
+
+
+
+
+
+
+ {name}
+
+
+
+ {control.failure ?? line.text}
+
+
+
+
+
+
+ );
+}
+
+/** A goal's row: its own component, so only an active goal reads its triggers, its starts. */
+function GoalBody({ row }: { row: Extract }) {
+ const triggers = useGoalTriggers(row.goal.id, {
+ enabled: row.goal.status === "active",
+ });
+ const starts = goalStarts(
+ row.goal,
+ triggers.data
+ ?.filter((trigger) => trigger.enabled)
+ .map((trigger) => `${KIND_LABEL[trigger.kind]} trigger`),
+ row.routines,
+ describeEvent,
+ );
+ return ;
+}
+
+/** One routine, goal or check-in, as every list of routines draws it. */
+export function RoutineRow({ row }: { row: MergedRoutine }) {
+ return row.kind === "goal" ? (
+
+ ) : (
+
+ );
+}
diff --git a/app/src/components/routines/routine-runs.tsx b/app/src/components/routines/routine-runs.tsx
index 6bf2a04396..0b6a1daf45 100644
--- a/app/src/components/routines/routine-runs.tsx
+++ b/app/src/components/routines/routine-runs.tsx
@@ -35,7 +35,7 @@ function lastRunLabel(lastRun: RoutineRecord["lastRun"]): {
}
if (lastRun.status === null) {
return {
- text: "Running…",
+ text: "Running now",
className: "text-muted-foreground",
dot: "animate-pulse bg-muted-foreground",
};
@@ -115,7 +115,7 @@ const RUN_STATUS: Record<
{ text: string; dot: string; className: string }
> = {
running: {
- text: "Running",
+ text: "Running now",
dot: "animate-pulse bg-muted-foreground",
className: "",
},
diff --git a/app/src/components/routines/routines-home.tsx b/app/src/components/routines/routines-home.tsx
index 3be0c941c3..6a129f76ce 100644
--- a/app/src/components/routines/routines-home.tsx
+++ b/app/src/components/routines/routines-home.tsx
@@ -1,11 +1,7 @@
import { useQuery } from "@tanstack/react-query";
import { AnimatePresence } from "motion/react";
import { LoadingRows } from "@/components/layout/loading-rows";
-import { PageColumn } from "@/components/layout/page-parts";
-import {
- SidebarToggle,
- useSidebarToggleVisible,
-} from "@/components/layout/sidebar-toggle";
+import { PageShell } from "@/components/layout/page-shell";
import { BotGroupSection } from "@/components/routines/bot-group";
import { RoutineBox } from "@/components/routines/routine-box";
import { Unfold } from "@/components/routines/unfold";
@@ -29,12 +25,11 @@ const EXAMPLES = [
* has grouped by Bot. The switch for every Bot's check-ins is in Settings → Notifications.
*
* Reads what `RoutinesList` reads (routines, goals, check-ins, and the shown and hidden Bots for
- * the groups), so each row opens and changes its own record the way it always did. It draws its
- * own bar and column rather than `PageShell`: the page has no title row and no New routine button,
- * its heading is part of what it says.
+ * the groups), so each row opens and changes its own record the way it always did. The standard
+ * `PageShell` header, as every other page has, with the box as its first content and no New routine
+ * button: the box is how a routine starts.
*/
export function RoutinesHome() {
- const showToggle = useSidebarToggleVisible();
const routines = useQuery(routinesQueryOptions());
const goals = useQuery(responsibilitiesQueryOptions());
const checkIns = useQuery(proactiveSettingsQueryOptions());
@@ -67,60 +62,45 @@ export function RoutinesHome() {
const empty = !pending && failed.length === 0 && rows.length === 0;
return (
- <>
- {showToggle ? (
-
-
-
- ) : null}
-
-
-
- Give your Bots some work
-
-
- Routines run on a schedule, towards a goal or wake up the Bot if
- they expect something from the outside.
-
-
-
-
+
+
- {/* Inset from the box's edges, so the list reads as under it rather than as wide as it. */}
-
- {/* One read failing leaves the others listed, and says which part is missing. */}
- {failed.length > 0 ? (
-
- {loadFailure(
- [
- routines.error,
- goals.error,
- checkIns.error,
- shownBots.error,
- hiddenBots.error,
- ],
- `Couldn't load your ${failed.join(" and ")}. Try again in a moment.`,
- )}
-
- ) : null}
- {/* Pending draws the list's shape; rows already read stay while they refetch. */}
- {pending ? (
-
- ) : (
- // A Bot's first routine opens its group; its last one removed folds it away.
-
- {groups.map((group) => (
-
-
-
- ))}
-
- )}
-
-
- >
+
+ {/* One read failing leaves the others listed, and says which part is missing. */}
+ {failed.length > 0 ? (
+
+ {loadFailure(
+ [
+ routines.error,
+ goals.error,
+ checkIns.error,
+ shownBots.error,
+ hiddenBots.error,
+ ],
+ `Couldn't load your ${failed.join(" and ")}. Try again in a moment.`,
+ )}
+
+ ) : null}
+ {/* Pending draws the list's shape; rows already read stay while they refetch. */}
+ {pending ? (
+
+ ) : (
+ // A Bot's first routine opens its group; its last one removed folds it away.
+
+ {groups.map((group) => (
+
+
+
+ ))}
+
+ )}
+
+