Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1c56401
Routines: on/off and next run on every row, compact routine page, New…
samjulien Dec 2, 2026
8ef9aa1
Bot pages: a mark for each Bot, routines with switches, Setup in plac…
samjulien Dec 2, 2026
ba4111a
Tests for Bot marks, the Computer state, Activity's schedule words an…
samjulien Dec 2, 2026
dfa5210
Follow-ups say when they're due; marks in docs and comments; changelog
samjulien Dec 2, 2026
7316341
Test the follow-up's due wording
samjulien Dec 2, 2026
9ce90da
Format the long-instructions test
samjulien Dec 2, 2026
6a8b805
Keep the Bots' orbs: drop the shape marks
samjulien Dec 2, 2026
8525191
Settings cards test: read what Setup's fields hold, now that its text…
samjulien Dec 2, 2026
432975a
Setup's fields follow changes made elsewhere; routine switches send n…
samjulien Dec 2, 2026
5288927
Routines: one shared routine row and switch, On/Paused everywhere, Ru…
samjulien Dec 2, 2026
f26a24a
Merge #2704's routine row; the Bot's routines use it, five then All r…
samjulien Dec 2, 2026
73c588b
Setup's sharing and computer in a section of their own; Activity grou…
samjulien Dec 2, 2026
01ab631
A running goal says Running now in its Activity row
samjulien Dec 2, 2026
e5211d7
Changelog: what Activity says now
samjulien Dec 2, 2026
f92353c
Changelog: reflow the Bot pages line
samjulien Dec 2, 2026
82b0732
Merge branch 'main' of https://github.com/CopilotKit/OpenBot into cla…
samjulien Dec 2, 2026
5170eb5
Workbench status test: no unsafe optional chaining
samjulien Dec 2, 2026
1149cf3
Merge branch 'main' of https://github.com/CopilotKit/OpenBot into cla…
samjulien Dec 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .claude/skills/openbot-screen-layout/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,14 @@ button.
3. `ItemActions` holds the control, or the value when the row is read-only.
4. `ItemHeader` and `ItemFooter` are `basis-full`, so they wrap onto a line of their own inside the
row. That is where a **set** goes — chips, toggles, anything that would otherwise fight the label
for horizontal space. A set does not belong in `ItemActions`.
5. `ItemDescription` is `line-clamp-2`. Where the text is the point rather than a hint, pass
for horizontal space. A set of chips or toggles does not belong in `ItemActions`.
5. A row's **buttons** go in `ItemActions`, on the right, as on every other row, even when there are
several (a task's Open, Stop and Mark done). Give it `className="flex-wrap justify-end"` so they
wrap under each other on a narrow window. Never under the row's text on the left: that is where
a task's Open sat on a Bot's Activity, the one row whose action was not on the right.
6. `ItemDescription` is `line-clamp-2`. Where the text is the point rather than a hint, pass
`className="line-clamp-none"`.
6. To make the whole row navigate or open something, pass `render`:
7. To make the whole row navigate or open something, pass `render`:
`render={<button type="button" onClick={…} />}` or `render={<Link to=… />}`. A real element, so
the keyboard reaches it and a link can be opened in a new tab.

Expand All @@ -154,6 +158,15 @@ starts to feel wrong.
`ItemDescription` plus `<IconChevronRight className="size-4 text-muted-foreground" />` in
`ItemActions`, and the row is a `Link` to a screen of its own (Screens, Not Dialogs). Editing
more than one value in place turns a settings screen back into a form.
**The one exception: a few short text fields that are edited together.** A Bot's Name, Title,
What it does and Instructions are fields on its Setup itself, in one `PageCard` inside a
`<form>`, with one Save that sends only what changed (`IdentityForm` in
`bot-profile/setup-fields.tsx`). Opening a screen per field made renaming a Bot and giving it a
title two trips. Each field keeps its own screen for any link to it. The form is only for
whoever can change the fields; anybody else reads them as rows. A field nobody typed in follows
a change made elsewhere, so Save never sends an old value back. The rows that write at once
(Visibility, Isolated) go in a section of their own under it, not a second card in the same
section. Anything else larger stays a summary, a chevron and a screen.
3. **Read-only** — the value in `ItemActions`, no chevron, nothing to click. A chevron on a row that
goes nowhere is a promise the row cannot keep.

Expand Down Expand Up @@ -217,7 +230,7 @@ is actually on screen. The root was once 15px, and every constant taken from the
- Adding a row to an existing screen → Procedure 2, then Procedure 3 to pick its kind.
- The row toggles one thing → Procedure 3, kind 1: a `Switch`, no save.
- The row edits text, or a set of grants, or more than one value → Procedure 3, kind 2: a summary, a
chevron, and a screen of its own.
chevron, and a screen of its own. A few short text fields edited together are its one exception.
- Tempted to open a dialog → only if the request says so (Screens, Not Dialogs); then Procedure 6.
- Adding a new thing that takes several fields → Procedure 5: its own screen with a back button.
- The row only states something → Procedure 3, kind 3: a value and no chevron.
Expand Down
2 changes: 2 additions & 0 deletions app/src/components/bot-profile/access.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ function YourSkills({ agentId }: { agentId: string }) {
if (held.data === undefined && isHeld(held.error)) return null;
return (
<PageSection
count={page.data && held.data ? skills.length : undefined}
description="Turn on a skill to use it with this Bot. Type / in a conversation to run it."
title="Your skills"
>
Expand Down Expand Up @@ -486,6 +487,7 @@ function Granted({
`${withAdmins(SHARED_BOT_APPS, admins)} Add apps to your own Bot instead.`
: "Review the apps this Bot can use, and check which are ready for you. It can't use apps outside this list."
}
count={count}
title={kind === "apps" ? "Apps it can use" : "Skills it has"}
>
{kind === "apps" && apps.error ? (
Expand Down
81 changes: 74 additions & 7 deletions app/src/components/bot-profile/activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import { loadFailure } from "@/lib/load-failure";
import { proactiveSettingsQueryOptions } from "@/lib/proactive";
import { relativeTime } from "@/lib/relative-time";
import { routinesQueryOptions } from "@/lib/routines/queries";
import { scheduleWords } from "@/lib/routines/words";
import { orderTasks } from "@/lib/tasks/groups";
import { taskListQueryOptions } from "@/lib/tasks/queries";
import { cn } from "@/lib/utils";
Expand Down Expand Up @@ -106,17 +107,50 @@ export function ActivityRow({
agentId,
item,
live = false,
schedule,
}: {
agentId: string;
item: ActivityItem;
/** Under way now: a pulsing dot on its icon, the warning colour when it is waiting on the person. */
live?: boolean;
/**
* When a lined-up routine or goal runs, in words ("Every weekday at 9:00"). Said in place of its
* status and due time: a routine read "due · 2 weeks ago", which said neither when it runs nor
* that it runs again.
*/
schedule?: string | null;
}) {
const stop = useMutation(stopHandoffMutationOptions(queryClient));
const cancel = useMutation(cancelFollowUpMutationOptions(queryClient));
const Icon = ICONS[item.kind];
const link = linkFor(item, agentId);
const when = relativeTime(item.at);
const upcoming = Date.parse(item.at) > Date.now();
// A routine or goal in the Routines page's words (`routine-row.tsx`): Running now, or On and when.
const recurring = item.kind === "routine" || item.kind === "responsibility";
const line =
recurring && item.status === "running" && !item.needsYou
? [KIND_LABEL[item.kind], "Running now", item.detail]
: schedule
? [
KIND_LABEL[item.kind],
"On",
schedule,
upcoming ? `next ${when}` : null,
]
: item.status === "due" && when && !item.needsYou
? // A one-off lined up for a time: when it is due, or that it was, in one phrase.
[
KIND_LABEL[item.kind],
upcoming ? `due ${when}` : `was due ${when}`,
item.detail,
]
: [
KIND_LABEL[item.kind],
item.needsYou ? "needs you" : item.status,
when || null,
item.detail,
];
const control = item.stoppable ? (
<Button
disabled={stop.isPending}
Expand Down Expand Up @@ -155,11 +189,7 @@ export function ActivityRow({
<ItemTitle className="block w-auto truncate" title={item.title}>
{item.title}
</ItemTitle>
<ItemDescription>
{KIND_LABEL[item.kind]} · {item.needsYou ? "needs you" : item.status}
{when ? ` · ${when}` : ""}
{item.detail ? ` · ${item.detail}` : ""}
</ItemDescription>
<ItemDescription>{line.filter(Boolean).join(" · ")}</ItemDescription>
</ItemContent>
</>
);
Expand All @@ -173,7 +203,7 @@ export function ActivityRow({
{content}
<ItemActions>
{link ? (
<Button render={link} size="sm" variant="ghost">
<Button render={link} size="sm" variant="outline">
Open
</Button>
) : null}
Expand Down Expand Up @@ -209,6 +239,30 @@ function useActivityGroups(agentId: string, boardAbove = false) {
.filter((routine) => routine.goalId)
.map((routine) => routine.id),
);
/*
* When each lined-up routine runs, in words, by the activity's id for it: a routine by its own
* schedule, a goal by the schedules of the routines that run it that are on.
*/
const scheduleOf = (item: ActivityItem): string | null => {
const all = routines.data?.routines ?? [];
const [prefix, id] = [
item.id.slice(0, item.id.indexOf(":")),
item.id.slice(item.id.indexOf(":") + 1),
];
if (item.kind === "routine" && prefix === "routine") {
const routine = all.find((candidate) => candidate.id === id);
return routine ? scheduleWords(routine) : null;
}
if (item.kind === "responsibility" && prefix === "responsibility") {
const runs = all.filter(
(routine) => routine.goalId === id && routine.enabled,
);
return runs.length
? runs.map((routine) => scheduleWords(routine)).join(", ")
: null;
}
return null;
};
const ownCheckIns = (checkIns.data ?? []).filter(
(checkIn) => checkIn.botId === agentId && checkIn.enabled,
);
Expand All @@ -232,6 +286,7 @@ function useActivityGroups(agentId: string, boardAbove = false) {
goalRoutineIds,
ownCheckIns,
groups,
scheduleOf,
pending: activity.isPending || taskList.isPending,
};
}
Expand Down Expand Up @@ -374,13 +429,16 @@ function EntryRow({
blocked,
botName,
entry,
scheduleOf,
settled,
titleOf,
}: {
agentId: string;
blocked: string | null;
botName: string;
entry: ActivityEntry;
/** When a lined-up routine or goal runs, in words, or null. */
scheduleOf: (item: ActivityItem) => string | null;
/** Under Done: a task there asks for nothing. */
settled: boolean;
/** What a conversation is called, or null when the list has not reached it. */
Expand Down Expand Up @@ -409,7 +467,14 @@ function EntryRow({
showBot={false}
/>
);
return <ActivityRow agentId={agentId} item={entry.item} live={entry.live} />;
return (
<ActivityRow
agentId={agentId}
item={entry.item}
live={entry.live}
schedule={scheduleOf(entry.item)}
/>
);
}

/**
Expand Down Expand Up @@ -438,6 +503,7 @@ export function BotActivitySections({
ownCheckIns,
groups,
pending,
scheduleOf,
} = useActivityGroups(agentId, boardAbove);
const bots = useQuery(agentListQueryOptions());
const blocked = useCheckInsBlocked();
Expand Down Expand Up @@ -487,6 +553,7 @@ export function BotActivitySections({
"This Bot"
}
entry={entry}
scheduleOf={scheduleOf}
settled={group.id === "done"}
titleOf={titleOf}
/>
Expand Down
93 changes: 93 additions & 0 deletions app/src/components/bot-profile/computer-state.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import { useQuery } from "@tanstack/react-query";
import { IconDeviceDesktop } from "@/components/icons";
import { PageRows } from "@/components/layout/page-shell";
import {
Item,
ItemContent,
ItemDescription,
ItemMedia,
ItemTitle,
} from "@/components/ui/item";
import {
type ComputerState,
computerStatusQueryOptions,
} from "@/lib/computers/queries";
import { useNoBotComputers } from "@/lib/deployment/queries";
import { cn } from "@/lib/utils";

/** How often a computer on its way up is read again, until it is up. */
const STARTING_POLL_MS = 5_000;

/** What the card says for each state, and the dot on its icon. */
const SAID: Record<
ComputerState,
{ title: string; description: string; dot: string }
> = {
absent: {
title: "Asleep",
description: "It starts when this Bot next needs it.",
dot: "bg-muted-foreground",
},
starting: {
title: "Starting",
description: "It's on its way up. A first start takes about a minute.",
dot: "animate-pulse bg-success motion-reduce:animate-none",
},
ready: {
title: "Awake",
description: "It's ready for this Bot's work.",
dot: "bg-success",
},
unreachable: {
title: "Not answering",
description: "OpenBot can't reach this computer right now.",
dot: "bg-destructive",
},
};

function said(state: string | undefined) {
return state !== undefined && Object.hasOwn(SAID, state)
? SAID[state as ComputerState]
: null;
}

/**
* The top of a Bot's Computer page: whether its computer is on, as one card. Before, the page began
* with settings and never said whether the computer was asleep or awake.
*
* Read from the status route, which never wakes a computer, so opening this page doesn't start one.
* Nothing is drawn where there are no computers for Bots, while the state is unread, when it can't be
* read, or for a state a newer server sends that this app doesn't know.
*/
export function BotComputerState({ agentId }: { agentId: string }) {
const noComputers = useNoBotComputers();
const status = useQuery({
...computerStatusQueryOptions(agentId),
enabled: noComputers === false,
retry: false,
refetchInterval: (query) =>
query.state.data?.state === "starting" ? STARTING_POLL_MS : false,
});
const shown = said(status.data?.state);
if (noComputers !== false || !shown) return null;
return (
<PageRows>
<Item data-computer-state={status.data?.state} size="sm">
<ItemMedia className="relative" variant="icon">
<IconDeviceDesktop />
<span
aria-hidden="true"
className={cn(
"absolute -top-0.5 -right-0.5 size-2 rounded-full ring-2 ring-card",
shown.dot,
)}
/>
</ItemMedia>
<ItemContent>
<ItemTitle>{shown.title}</ItemTitle>
<ItemDescription>{shown.description}</ItemDescription>
</ItemContent>
</Item>
</PageRows>
);
}
Loading
Loading