+ {/* The one-liner and the overview: two blocks of one group, 12px apart (the Rhythm table). */}
+
{skill.summary ?
{skill.summary}
: null}
diff --git a/app/src/components/memory/memories.tsx b/app/src/components/memory/memories.tsx
index 121ceca4a6..3eaf769f14 100644
--- a/app/src/components/memory/memories.tsx
+++ b/app/src/components/memory/memories.tsx
@@ -8,6 +8,7 @@ import {
PageRows,
PageSection,
} from "@/components/layout/page-shell";
+import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -201,9 +202,9 @@ function dayOf(iso: string, now: Date = new Date()): string | null {
/** "Needs review", as a label: the fact waits on the person, so it is drawn in `warning`. */
function NeedsReview() {
return (
-
+
Needs review
-
+
);
}
diff --git a/app/src/components/organizations/organization-settings-page.tsx b/app/src/components/organizations/organization-settings-page.tsx
index 5f47e28cd9..76947b97af 100644
--- a/app/src/components/organizations/organization-settings-page.tsx
+++ b/app/src/components/organizations/organization-settings-page.tsx
@@ -234,42 +234,34 @@ function PlanRow() {
) : null}
{/*
- * An employee admin can pay for the members who aren't employees. Under the bar, not
- * beside it, so the bar keeps its width in a narrow window.
+ * An employee admin can pay for the members who aren't employees. Whole on a phone
+ * too: a row's description stops at two lines.
*/}
{employeePaysForOthers(plan) && plan.addCardUrl ? (
- <>
- {/* Whole on a phone too: a row's description stops at two lines. */}
-
- {OTHERS_NEED_A_CARD}
-
-
- {cardAction(plan)}
-
- >
+
+ {OTHERS_NEED_A_CARD}
+
) : null}
- {/*
- * Once most of it is used, where the server sent the way to add a card. Under the bar,
- * as the employee's button is, so the bar keeps its width in a narrow window.
- */}
- {trialRunningLow(plan) && plan.addCardUrl ? (
+
+ {/*
+ * The way to add a card, where the server sent one: once most of the trial is used, or
+ * for an employee admin, who can pay for the members who aren't employees. In the row's
+ * actions, on the right, on a line of their own under the bar, so the bar keeps its width
+ * in a narrow window.
+ */}
+ {(employeePaysForOthers(plan) || trialRunningLow(plan)) &&
+ plan.addCardUrl ? (
+
{cardAction(plan)}
- ) : null}
-
+
+ ) : null}
>
);
diff --git a/app/src/components/plan/card-needed-dialog.tsx b/app/src/components/plan/card-needed-dialog.tsx
index ffe1ddeba4..475412173f 100644
--- a/app/src/components/plan/card-needed-dialog.tsx
+++ b/app/src/components/plan/card-needed-dialog.tsx
@@ -4,6 +4,7 @@ import sentry from "@/assets/sentry.webp";
import { AbstractAvatar } from "@/components/agents/abstract-avatar";
import { IconCheck, IconPlayerPause } from "@/components/icons";
import { PersonAvatar } from "@/components/organizations/person-avatar";
+import { Badge } from "@/components/ui/badge";
import { Button, buttonVariants } from "@/components/ui/button";
import {
Dialog,
@@ -74,7 +75,7 @@ import { queryClient } from "@/query-client";
/**
* Bots can't run until a card is added: the free trial is used up, or the last payment failed.
- * Top to bottom: the person's Bots, faded, marked Paused; the title, and a line with the size of
+ * Top to bottom: the person's Bots, marked Paused; the title, and a line with the size of
* the trial the server sent, how many Bots that paused and that nothing is lost; the trial's bar,
* full. An admin then gets a plan card (the price and what adding the card does) and the one way
* on (`addCardUrl`, the server's verdict on who may add a card) with Not now beside it. A member gets the owners and admins to ask, as rows
@@ -217,8 +218,9 @@ export function CardNeededDialog() {
const BOTS_SHOWN = 4;
/**
- * The person's Bots, faded and overlapping, with a Paused pill: what the stop means, shown. Up to
- * four, and the rest counted.
+ * The person's Bots, overlapping, with a Paused badge: what the stop means, shown. Up to four, and
+ * the rest counted on a circle the size of an avatar. The badge says they are paused, so the
+ * avatars keep their own colors rather than a faded shade of their own.
*/
function PausedBots({ bots }: { bots: readonly AgentProfile[] }) {
const shown = bots.slice(0, BOTS_SHOWN);
@@ -229,7 +231,7 @@ function PausedBots({ bots }: { bots: readonly AgentProfile[] }) {
{shown.map((bot, index) => (
0 && "-ml-2.5",
)}
key={bot.id}
@@ -243,10 +245,10 @@ function PausedBots({ bots }: { bots: readonly AgentProfile[] }) {
) : null}
-
-
+
+
Paused
-
+
);
}
@@ -265,7 +267,7 @@ function PlanCard() {
-
+
{PRICE_AMOUNT}
{" "}
{PRICE_PER}
@@ -316,6 +318,11 @@ function AdminsToAsk({
{shown.map((admin, index) => (
{index > 0 ? : null}
+ {/*
+ * Flush with the label above and the dialog's title: every `Item` size pads 10px or more
+ * in from the sides, and none has no inset. These rows are read, not pressed, so there is
+ * no hover fill for the padding to make room for.
+ */}
diff --git a/app/src/components/plugins/broker-directory.tsx b/app/src/components/plugins/broker-directory.tsx
index f677ab7129..715e4c0e45 100644
--- a/app/src/components/plugins/broker-directory.tsx
+++ b/app/src/components/plugins/broker-directory.tsx
@@ -102,6 +102,9 @@ import { connectionsQueryOptions } from "@/lib/plugins/queries";
/** Placeholder rows while the directory loads: enough to fill the view, not to suggest a count. */
const LOADING_ROWS = ["a", "b", "c", "d", "e", "f"];
+/** The results' section on Browse apps, which a category or "Browse all apps" scrolls back to. */
+const RESULTS_ID = "directory-results";
+
/** Where the directory was opened from: a person's Connections, or Admin's Apps. */
export type DirectoryPlace = "connections" | "admin";
@@ -207,17 +210,18 @@ export function BrokerDirectory({
enabled: !showFeatured,
});
const toolbar = React.useRef(null);
- const results = React.useRef(null);
function choose(next: DiscoveryCategory | null, showAll = false) {
setCategory(next);
setAll(showAll);
setSearch("");
setQuery("");
- if (results.current && toolbar.current) {
+ // Back to the results' title when it has scrolled up under the stuck toolbar.
+ const results = document.getElementById(RESULTS_ID);
+ if (results && toolbar.current) {
const bottom = toolbar.current.getBoundingClientRect().bottom;
- if (results.current.getBoundingClientRect().top < bottom) {
- results.current.style.scrollMarginTop = `${toolbar.current.offsetHeight}px`;
- results.current.scrollIntoView({ block: "start" });
+ if (results.getBoundingClientRect().top < bottom) {
+ results.style.scrollMarginTop = `${toolbar.current.offsetHeight}px`;
+ results.scrollIntoView({ block: "start" });
}
}
}
@@ -272,6 +276,11 @@ export function BrokerDirectory({
...entries.filter((entry) => entry.appId !== null),
]
: entries;
+ /*
+ * Browse apps lays the directory out as a grid of separate cards, not one `PageRows` list: the
+ * layout skill's accepted Connections tiles precedent, because apps are picked out by their mark
+ * rather than read down a list. Admin's directory stays a list of rows.
+ */
const Rows = discover ? "div" : PageRows;
/*
* WHERE AN ADDED KEY VERSION'S PAGE IS, beside the sign-in it was offered under. Its key form opens
@@ -314,7 +323,6 @@ export function BrokerDirectory({
return (
header+nav+*]:mt-0" : undefined}
backButton={
discover
? undefined
@@ -326,76 +334,84 @@ export function BrokerDirectory({
{discover && (
<>
-
-
+ {/*
+ * The chosen category is `secondary`, pressed: the filled main variant stays the
+ * toolbar's Add, the page's one filled button.
+ */}
+
-
@@ -481,7 +497,7 @@ export function BrokerDirectory({
{listed.map((entry, index) => {
@@ -508,17 +524,8 @@ export function BrokerDirectory({
>
-
- {entry.title}
-
-
+ {entry.title}
+
{entry.summary}
diff --git a/app/src/components/plugins/plugin-logo.tsx b/app/src/components/plugins/plugin-logo.tsx
index 8c86a3f882..87c3249b06 100644
--- a/app/src/components/plugins/plugin-logo.tsx
+++ b/app/src/components/plugins/plugin-logo.tsx
@@ -1,16 +1,16 @@
import { appKey } from "@openbot/shared/audit-filters";
import type * as React from "react";
import { useState } from "react";
-import githubLogo from "@/assets/brands/github.svg";
import notionLogo from "@/assets/brands/notion.svg";
import { IconBrandGoogleDrive, IconPlug } from "@/components/icons";
import { cn } from "@/lib/utils";
/**
- * ON A WHITE TILE IN DARK MODE, BECAUSE SOME MARKS DISAPPEAR WITHOUT ONE. GitHub's mark is black,
- * and on the dark page it all but vanished. A vendor's artwork is never recoloured, so dark mode
- * gives every mark a white tile instead: the same rule the framework marks follow
- * (`agents/harness-mark.tsx`). Every mark reads on white.
+ * ON A WHITE TILE IN DARK MODE, BECAUSE SOME MARKS DISAPPEAR WITHOUT ONE. A logo loaded from an
+ * address is a picture with its colors baked in, and a black one all but vanished on the dark page.
+ * A vendor's artwork is never recoloured, so dark mode gives every loaded mark a white tile instead:
+ * the same rule the framework marks follow (`agents/harness-mark.tsx`). Every mark reads on white.
+ * A mark bundled in the code (`BundledMark`) takes `currentColor` and needs no tile.
*/
export const LOGO_TILE = "rounded-sm dark:bg-white dark:p-0.5";
@@ -25,18 +25,45 @@ export function appVendorLogo(id: string): string | undefined {
}
/**
- * GitHub's mark for its account tile and page, bundled like Notion's, so it is the same in every
- * organization and loads nothing from outside. Slack has none bundled yet: its tile keeps its own
- * icon, which a logo address loaded from the directory left blank in WebKit.
+ * A mark drawn in the code rather than loaded as a picture: an SVG that takes `currentColor`, so it
+ * follows light and dark, a skin and a customer's theme, and needs no white tile.
+ */
+export type BundledMark = (props: { className?: string }) => React.ReactNode;
+
+/**
+ * GitHub's Invertocat, from GitHub_Logos.zip at https://brand.github.com/foundations/logo, drawn
+ * in `currentColor`. It was a black picture on a white tile in dark mode; as a shape it takes the
+ * tile's own text color in either theme, as every other glyph on these tiles does.
+ */
+export function GithubMark({ className }: { className?: string }) {
+ return (
+
+ );
+}
+
+/**
+ * GitHub's mark for its account tile and page, bundled, so it is the same in every organization and
+ * loads nothing from outside. Slack has none bundled yet: its tile keeps its own icon, which a logo
+ * address loaded from the directory left blank in WebKit.
*/
export function identityVendorLogo(
provider: "github" | "slack",
-): string | undefined {
- return provider === "github" ? githubLogo : undefined;
+): BundledMark | undefined {
+ return provider === "github" ? GithubMark : undefined;
}
/**
- * An app's logo, or its initial where it has none.
+ * An app's logo, or its initial where it has none. The logo is an address to load, or a mark
+ * bundled in the code (`BundledMark`), which draws in the text color with no tile.
*
* The initial rather than a generic plug because a list of apps that all show the same plug is a
* column of identical tiles, which tells nobody anything; "T" and "G" at least tell Todoist from
@@ -47,12 +74,16 @@ export function PluginLogo({
name,
fallback,
}: {
- logo?: string | null;
+ logo?: string | BundledMark | null;
name?: string;
/** Drawn instead of the initial when there is no logo or it fails: a vendor's own icon. */
fallback?: React.ReactNode;
}) {
const [failedUrl, setFailedUrl] = useState(null);
+ if (typeof logo === "function") {
+ const Mark = logo;
+ return ;
+ }
if (!logo || failedUrl === logo) {
if (fallback) return fallback;
return name ? : ;
diff --git a/app/src/components/responsibilities/goal-page.tsx b/app/src/components/responsibilities/goal-page.tsx
index 90640ff4ef..195855a58b 100644
--- a/app/src/components/responsibilities/goal-page.tsx
+++ b/app/src/components/responsibilities/goal-page.tsx
@@ -262,45 +262,41 @@ export function GoalPage({
return (
-
- action.mutate({
- id: goal.id,
- action: active ? "resume" : "pause",
- })
- }
- />
-
- {goal.status === "active" ? "On" : "Paused"}
-
-
- )
- }
- description={
- <>
-
- {summaryFor(goal, triggers.data, routines)}
-
- {/* What starts it. A paused goal's summary already says nothing does. */}
- {goal.status === "active" ? (
- {`Its ${starters} start it.`}
- ) : null}
- >
- }
+ description={summaryFor(goal, triggers.data, routines)}
title={goal.title}
>
- {/* What else can be done to it. The page title names it, so this first section has no heading. */}
+ {/* What can be done to it now. The page title names it, so this first section has no heading. */}
+ {goal.status !== "completed" ? (
+ <>
+
+
+ On
+
+ {goal.status === "active"
+ ? `Its ${starters} start it.`
+ : `Paused. Its ${starters} won't start it.`}
+
+
+
+ {/* Binary and immediate: it takes effect when switched, there is no save. */}
+
+ action.mutate({
+ id: goal.id,
+ action: active ? "resume" : "pause",
+ })
+ }
+ />
+
+
+
+ >
+ ) : null}
{goal.status === "active" ? (
<>
+
+ {
+ remove.reset();
+ setConfirmingDelete(true);
+ }}
+ title="Delete goal"
+ />
{action.error ? (
@@ -528,21 +534,6 @@ export function GoalPage({
- {/* Away from the everyday controls, at the bottom. */}
-
-
- {
- remove.reset();
- setConfirmingDelete(true);
- }}
- title="Delete goal"
- />
-
-
-
+ // More than one value, so a screen of its own: the same fields New routine asks for.
+
+ }
+ size="lg"
+ variant="outline"
+ >
+
+ Edit
+
}
backButton={{ label: "Routines", linkProps: back }}
description={
@@ -354,15 +343,42 @@ export function RoutinePage({
>
{/* What it does, word for word: New routine's What to do. */}
-
-
{does}
-
+
+
+
+
+ {does}
+
+
+
+
- {/* What can be done with it besides switching and editing. The page title names it, so this
- section has no heading. */}
+ {/* What can be done to it now. 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 })
+ }
+ />
+
+
+
>
) : null}
+
+ {
+ remove.reset();
+ setConfirming(true);
+ }}
+ title="Delete routine"
+ />
{setEnabled.error || runNow.error ? (
@@ -494,27 +520,6 @@ export function RoutinePage({
- {/* Away from the everyday controls, at the bottom, as Delete is on every other settings page. */}
-
-
- {
- remove.reset();
- setConfirming(true);
- }}
- title="Delete routine"
- />
-
-
-
-
-
{/* It names the routine as its heading and its row do, never its schedule, which two can share. */}
diff --git a/app/src/components/skills/skills-settings-page.tsx b/app/src/components/skills/skills-settings-page.tsx
index e7c9bdbf4f..014c68bd6d 100644
--- a/app/src/components/skills/skills-settings-page.tsx
+++ b/app/src/components/skills/skills-settings-page.tsx
@@ -102,9 +102,13 @@ export function SkillsSettingsPage({ creating }: { creating: boolean }) {
const writtenRow = (skill: Skill) => (
- {/* The row opens the skill's screen; the menu sits beside that link, not inside it. */}
+ {/*
+ * The name and summary open the skill's screen. The menu sits beside that link, not inside
+ * it, so the row can't be one link through `render`, and has no chevron: a chevron outside
+ * the link would open nothing.
+ */}
@@ -158,7 +162,6 @@ export function SkillsSettingsPage({ creating }: { creating: boolean }) {
-
);
diff --git a/app/src/components/suggestions/check-in-page.tsx b/app/src/components/suggestions/check-in-page.tsx
index 12870186fc..6c0542f369 100644
--- a/app/src/components/suggestions/check-in-page.tsx
+++ b/app/src/components/suggestions/check-in-page.tsx
@@ -123,9 +123,8 @@ export function CheckInRoutePage({
}
/**
- * Everything about one check-in: whether it is on (on the title's line), running it now, how often
- * it looks, and removing it. Each takes effect at once; Remove, in its own section at the bottom,
- * asks first, then returns to the list.
+ * Everything about one check-in: whether it is on, running it now, how often it looks, and removing
+ * it. Each takes effect at once; Remove, the last row, asks first, then returns to the list.
*/
export function CheckInPage({
setting,
@@ -162,33 +161,13 @@ export function CheckInPage({
return (
- {/* Binary and immediate: it takes effect when switched, there is no save. */}
- {
- if (next !== setting.enabled)
- change.mutate({ setting, change: { kind: "toggle" } });
- }}
- />
-
- {setting.enabled ? "On" : "Paused"}
-
-
- }
backButton={{ label: "Routines", linkProps: back }}
description={[setting.subject ? botName : null, setting.focus]
.filter(Boolean)
.join(" · ")}
title={setting.subject || `${botName}'s check-ins`}
>
- {/* Where it stands and how often it looks. The page title names it, so this section has no heading. */}
+ {/* What can be done to it now. The page title names it, so this section has no heading. */}
@@ -211,6 +190,29 @@ export function CheckInPage({
+
+
+ On
+
+ {setting.enabled
+ ? "It looks on its own, and tells you when something needs you."
+ : "Paused. It won't look until you turn it on."}
+
+
+
+ {/* Binary and immediate: it takes effect when switched, there is no save. */}
+ {
+ if (next !== setting.enabled)
+ change.mutate({ setting, change: { kind: "toggle" } });
+ }}
+ />
+
+
+
-
- {change.error && !confirming ? (
-
- {failureSaid(change.error)}
-
- ) : null}
-
-
- {/* Away from the everyday controls, at the bottom. */}
-
-
+ {
@@ -292,6 +284,11 @@ export function CheckInPage({
title="Remove check-in"
/>
+ {change.error && !confirming ? (
+
+ {failureSaid(change.error)}
+
+ ) : null}
diff --git a/app/src/components/ui/badge.tsx b/app/src/components/ui/badge.tsx
new file mode 100644
index 0000000000..ec6f5fa28d
--- /dev/null
+++ b/app/src/components/ui/badge.tsx
@@ -0,0 +1,61 @@
+import { mergeProps } from "@base-ui/react/merge-props";
+import { useRender } from "@base-ui/react/use-render";
+import { cva, type VariantProps } from "class-variance-authority";
+
+import { cn } from "@/lib/utils";
+
+/*
+ * shadcn's Badge, in its Base UI flavor. Two edits, both to the look (docs/app-guidelines.md):
+ * the corner is `rounded-full`, the step for round things, where shadcn writes `rounded-4xl`; and
+ * the `dark:` overrides are gone, since every token already carries its dark value.
+ *
+ * `muted` and `warning` are ours, beside shadcn's variants and never in place of one: `muted` for a
+ * quiet state ("Paused"), `warning` for one that wants a look ("needs review").
+ */
+const badgeVariants = cva(
+ "inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&>svg]:pointer-events-none [&>svg]:size-3!",
+ {
+ variants: {
+ variant: {
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
+ secondary:
+ "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
+ destructive:
+ "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 [a]:hover:bg-destructive/20",
+ outline:
+ "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
+ ghost: "hover:bg-muted hover:text-muted-foreground",
+ link: "text-primary underline-offset-4 hover:underline",
+ muted: "bg-muted text-muted-foreground",
+ warning: "bg-warning/10 text-warning",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ },
+);
+
+function Badge({
+ className,
+ variant = "default",
+ render,
+ ...props
+}: useRender.ComponentProps<"span"> & VariantProps) {
+ return useRender({
+ defaultTagName: "span",
+ props: mergeProps<"span">(
+ {
+ className: cn(badgeVariants({ className, variant })),
+ },
+ props,
+ ),
+ render,
+ state: {
+ slot: "badge",
+ variant,
+ },
+ });
+}
+
+export { Badge, badgeVariants };
diff --git a/app/src/components/what-if/what-if-result.tsx b/app/src/components/what-if/what-if-result.tsx
index 204eb23739..5bea706e29 100644
--- a/app/src/components/what-if/what-if-result.tsx
+++ b/app/src/components/what-if/what-if-result.tsx
@@ -213,10 +213,9 @@ export function WhatIfResultView({
}) {
const outcome = OUTCOMES[result.outcome];
const decider = result.layers.find((layer) => layer.decides);
- const rows = cn(inDialog && "bg-muted dark:bg-muted");
return (
- {matching.length > 0 ? (
-
- ) : query ? (
-
- Nothing matches “{search.trim()}”.
-
- ) : (
-
- }
- variant="outline"
- >
- Browse apps
-
- ) : !canBrowse && personal ? (
- }
- variant="outline"
- >
- Open Setup
-
- ) : undefined
- }
- >
- {browsing
- ? "Apps you can connect will appear here."
- : canBrowse
- ? "Browse apps to connect your first account."
- : personal
- ? "Open Setup to configure apps for this OpenBot."
- : "Apps show up here once an admin turns them on."}
-
- )}
- >
+
+ }
+ variant="outline"
+ >
+ Browse apps
+
+ ) : !canBrowse && personal ? (
+ }
+ variant="outline"
+ >
+ Open Setup
+
+ ) : undefined
+ }
+ >
+ {browsing
+ ? "Apps you can connect will appear here."
+ : canBrowse
+ ? "Browse apps to connect your first account."
+ : personal
+ ? "Open Setup to configure apps for this OpenBot."
+ : "Apps show up here once an admin turns them on."}
+
)}
{/*
* OpenBot holding off (a move, a brief outage) is said once: when the list above already
@@ -778,7 +769,7 @@ function ConnectionGrid({
}
/**
- * The page's shape before the apps and your accounts have both answered: the search box and a grid
+ * The page's shape before the apps and your accounts have both answered: a grid
* of tiles as tall as real ones. No tile says Connect or Connected until both reads are in, so an
* account you have is never shown as one you don't.
*/
@@ -786,8 +777,7 @@ function ConnectionsLoading() {
return (
-
-
+
{["a", "b", "c", "d"].map((key) => (
-
- {row.title}
-
+ {row.title}
{row.summary ? (
{row.summary}
diff --git a/app/src/routes/_authed/_app/routines_.schedules.$routineId_.edit.tsx b/app/src/routes/_authed/_app/routines_.schedules.$routineId_.edit.tsx
new file mode 100644
index 0000000000..9b544480a1
--- /dev/null
+++ b/app/src/routes/_authed/_app/routines_.schedules.$routineId_.edit.tsx
@@ -0,0 +1,23 @@
+import { createFileRoute } from "@tanstack/react-router";
+import { EditRoutineRoutePage } from "@/components/routines/edit-routine-page";
+import { searchTextEntry } from "@/lib/search-text";
+
+/**
+ * Edit routine: a scheduled routine's name, what it does, its schedule and its time zone, on a
+ * screen of its own, opened from Edit on the routine's page. `?agentId=` is the Bot whose Routines
+ * page the routine was opened from, kept on the way back so the routine's back link still returns
+ * there.
+ */
+export const Route = createFileRoute(
+ "/_authed/_app/routines_/schedules/$routineId_/edit",
+)({
+ validateSearch: (search: Record): { agentId?: string } =>
+ searchTextEntry("agentId", search.agentId),
+ component: EditRoutineRoute,
+});
+
+function EditRoutineRoute() {
+ const { routineId } = Route.useParams();
+ const { agentId } = Route.useSearch();
+ return ;
+}
diff --git a/app/tests/bot-routines-summary.test.tsx b/app/tests/bot-routines-summary.test.tsx
index 0afc2c864e..5045616f1e 100644
--- a/app/tests/bot-routines-summary.test.tsx
+++ b/app/tests/bot-routines-summary.test.tsx
@@ -84,7 +84,7 @@ const rowNames = (view: ReturnType) =>
);
const heading = (view: ReturnType) =>
- view.findByRole("heading", { name: "Routines" });
+ view.findByRole("heading", { name: "Routines", exact: true });
test("running first, then what starts soonest, then what is paused, counted, with All routines to the Bot's Routines", async () => {
const view = draw([
@@ -99,12 +99,13 @@ test("running first, then what starts soonest, then what is paused, counted, wit
routine({ id: "paused", title: "Paused", enabled: false }),
routine({ id: "other", title: "Someone else's", botId: "scout" }),
]);
- await heading(view);
- expect(view.getByText("4 routines")).toBeTruthy();
+ const title = await heading(view);
expect(rowNames(view)).toEqual(["Running", "Soon", "Late", "Paused"]);
expect(view.getByText("Running now")).toBeTruthy();
const seeAll = view.getByRole("button", { name: "All routines (4)" });
expect(seeAll.getAttribute("href")).toBe("/bots/atlas/routines");
+ // On the section's title line, on the right: never a button left on its own under the rows.
+ expect(seeAll.parentElement).toBe(title.parentElement);
});
test("at most five, then All routines with the total", async () => {
@@ -155,11 +156,11 @@ test("a routine that is on has its switch on, and switching it off pauses it", a
test("a Bot with no routines has no Routines section", async () => {
const view = draw([routine({ botId: "scout" })]);
await settleReactWork();
- expect(view.queryByRole("heading", { name: "Routines" })).toBeNull();
+ expect(view.queryByRole("heading", { name: /^Routines/ })).toBeNull();
});
test("a read that fails is said, and All routines still goes to the Bot's Routines", async () => {
const view = draw([], { fail: true });
expect(await view.findByRole("alert")).toBeTruthy();
- expect(view.getByRole("button", { name: "All routines (0)" })).toBeTruthy();
+ expect(view.getByRole("button", { name: "All routines" })).toBeTruthy();
});
diff --git a/app/tests/check-in-row.test.tsx b/app/tests/check-in-row.test.tsx
index 1584e95532..cdd07bd077 100644
--- a/app/tests/check-in-row.test.tsx
+++ b/app/tests/check-in-row.test.tsx
@@ -298,3 +298,15 @@ test("Remove asks first, and only then removes the check-in", async () => {
await user.click(within(confirm).getByRole("button", { name: "Remove" }));
await waitFor(() => expect(writes).toEqual([`DELETE ${CHECK_INS_PATH}/p1`]));
});
+
+test("the check-in's switch and Remove are rows of its actions, not in the header", async () => {
+ const view = page();
+ const remove = await view.findByRole("button", { name: /^Remove check-in/ });
+ const header = view.getByRole("heading", { level: 1 }).closest("header");
+ expect(header?.querySelector('[role="switch"]')).toBeNull();
+ const actions = view
+ .getByRole("switch", { name: "Check-ins on" })
+ .closest('[data-slot="page-rows"]');
+ expect(remove.closest('[data-slot="page-rows"]')).toBe(actions);
+ expect(actions?.lastElementChild).toBe(remove);
+});
diff --git a/app/tests/goal-page-starts.test.tsx b/app/tests/goal-page-starts.test.tsx
index 7c71ff9d9b..75c8d757d2 100644
--- a/app/tests/goal-page-starts.test.tsx
+++ b/app/tests/goal-page-starts.test.tsx
@@ -184,7 +184,7 @@ test("a goal whose routines couldn't be read doesn't claim it runs when asked",
expect(
view
.getByRole("heading", { level: 1 })
- .parentElement?.parentElement?.querySelector("p > span")?.textContent,
+ .parentElement?.parentElement?.querySelector("p")?.textContent,
).toBe("Active"),
);
fireEvent.click(
@@ -202,19 +202,19 @@ test("a goal whose only schedule is off says the schedule is off", async () => {
expect(await header(view)).toBe("Active · Schedule off");
});
-test("the description says schedules start it when the goal has them", async () => {
+test("the On row says schedules start it when the goal has them", async () => {
const view = open([routine()]);
await triggersLoaded();
await view.findByText("Its schedules, events and triggers start it.");
});
-test("the description says events and triggers start it when the goal has no schedules", async () => {
+test("the On row says events and triggers start it when the goal has no schedules", async () => {
const view = open([]);
await triggersLoaded();
await view.findByText("Its events and triggers start it.");
});
-test("the description leaves schedules out when the only schedule is off", async () => {
+test("the On row leaves schedules out when the only schedule is off", async () => {
const view = open([routine({ enabled: false })]);
expect(await header(view)).toBe("Active · Schedule off");
await view.findByText("Its events and triggers start it.");
@@ -225,6 +225,9 @@ test("a paused goal's schedule rows do not say they start it", async () => {
const view = open([routine()], "paused");
await triggersLoaded();
await view.findByText("Paused · Nothing starts it until you resume it");
+ await view.findByText(
+ "Paused. Its schedules, events and triggers won't start it.",
+ );
await view.findByText("Starts it again when you resume it · UTC");
expect(view.queryByText(/Starts it on a schedule/)).toBeNull();
});
@@ -415,7 +418,7 @@ test("a refused delete is said in the confirmation, and the confirmation stays",
});
test("a goal whose routines couldn't be read says its schedules couldn't be loaded", async () => {
- // A failed read is not "no schedules": the section says so, and the Active row leaves none out.
+ // A failed read is not "no schedules": the section says so, and the On row leaves none out.
const view = open(undefined);
await triggersLoaded();
await view.findByText(
@@ -442,3 +445,18 @@ test("a completed goal's schedules have no switch, and say why", async () => {
view.getByRole("button", { name: "Delete the schedule Weekdays at 09:00" }),
).toBeTruthy();
});
+
+test("the goal's switch and Delete are rows of its actions, not in the header", async () => {
+ const view = open([routine()]);
+ await triggersLoaded();
+ const header = view.getByRole("heading", { level: 1 }).closest("header");
+ expect(header?.querySelector('[role="switch"]')).toBeNull();
+ const actions = view
+ .getByRole("switch", { name: "On" })
+ .closest('[data-slot="page-rows"]');
+ const remove = view.getByRole("button", {
+ name: "Delete the goal Watch the queue",
+ });
+ expect(remove.closest('[data-slot="page-rows"]')).toBe(actions);
+ expect(actions?.lastElementChild).toBe(remove);
+});
diff --git a/app/tests/identity-vendor-logo.test.ts b/app/tests/identity-vendor-logo.test.ts
index 2e4e173e2c..d2139bb07c 100644
--- a/app/tests/identity-vendor-logo.test.ts
+++ b/app/tests/identity-vendor-logo.test.ts
@@ -1,15 +1,17 @@
import { expect, test } from "bun:test";
-import githubLogo from "@/assets/brands/github.svg";
-import { identityVendorLogo } from "@/components/plugins/plugin-logo";
+import {
+ GithubMark,
+ identityVendorLogo,
+} from "@/components/plugins/plugin-logo";
/*
* FROM DAVE'S REVIEW OF THE APPS POLISH: GitHub's and Slack's tiles took a logo from the directory
* app's address, so the same row looked different from one organization to the next, and Slack's
- * never loaded in WebKit. GitHub's mark is bundled, like Notion's; Slack keeps its own icon.
+ * never loaded in WebKit. GitHub's mark is bundled; Slack keeps its own icon.
*/
-test("GitHub's account tile uses the bundled GitHub mark, the same everywhere", () => {
- expect(identityVendorLogo("github")).toBe(githubLogo);
- expect(String(identityVendorLogo("github"))).not.toMatch(/^https?:/);
+test("GitHub's account tile uses the bundled GitHub mark, the same everywhere, loading nothing", () => {
+ expect(identityVendorLogo("github")).toBe(GithubMark);
+ expect(typeof identityVendorLogo("github")).toBe("function");
});
test("Slack's account tile has no logo to load, so it keeps its own icon", () => {
diff --git a/app/tests/personal-connections.test.tsx b/app/tests/personal-connections.test.tsx
index 83d7f1dd32..c91afbb2de 100644
--- a/app/tests/personal-connections.test.tsx
+++ b/app/tests/personal-connections.test.tsx
@@ -268,7 +268,7 @@ describe("Connections in the personal edition", () => {
const { view, user } = draw(edition);
await view.findByText("No connections yet");
expect(view.queryByTestId("account-notion")).toBeNull();
- await user.click(view.getByRole("link", { name: "Browse apps" }));
+ await user.click(view.getByRole("tab", { name: "Browse apps" }));
await view.findByTestId("account-notion");
});
@@ -295,12 +295,7 @@ describe("Connections in the personal edition", () => {
pageSize = 2;
servers = [server("notion"), server("google-drive"), server("exa")];
const { view } = draw("personal", "/connections", { fetchApps: true });
- const yours = (
- await view.findByRole("heading", { name: "Your connections" })
- ).parentElement?.parentElement as HTMLElement;
- await waitFor(() =>
- expect(within(yours).getByTestId("account-exa")).toBeTruthy(),
- );
+ expect(await view.findByTestId("account-exa")).toBeTruthy();
expect(within(tile(view, "exa")).getByText("On")).toBeTruthy();
expect(view.queryByTestId("account-exa-authenticated")).toBeNull();
});
@@ -404,16 +399,10 @@ test("with a broker set up, the navigation opens its directory of more apps", as
expect(browse.getAttribute("href")).toBe("/connections/browse/composio");
});
-/** The section a heading titles. */
-const sectionOf = (heading: HTMLElement) =>
- heading.closest("section") as HTMLElement;
-
test("the shared toolbar stays above the connections grid", async () => {
connected = ["notion"];
const { view } = draw("personal");
- const yours = sectionOf(
- await view.findByRole("heading", { name: "Your connections" }),
- );
+ const yours = await view.findByTestId("account-notion");
const search = view.getByRole("textbox", { name: "Search apps" });
expect(search.closest(".sticky")).toBeTruthy();
expect(
diff --git a/app/tests/plugin-logo.test.tsx b/app/tests/plugin-logo.test.tsx
index 83def38d10..a786b37ffd 100644
--- a/app/tests/plugin-logo.test.tsx
+++ b/app/tests/plugin-logo.test.tsx
@@ -1,7 +1,7 @@
import { afterAll, afterEach, beforeAll, expect, test } from "bun:test";
import { GlobalRegistrator } from "@happy-dom/global-registrator";
import { cleanup, fireEvent, render } from "@testing-library/react";
-import { PluginLogo } from "@/components/plugins/plugin-logo";
+import { GithubMark, PluginLogo } from "@/components/plugins/plugin-logo";
beforeAll(() => GlobalRegistrator.register({ url: "http://localhost/" }));
afterEach(cleanup);
@@ -23,7 +23,7 @@ test("a missing or broken logo uses the plug, and a new URL can load", () => {
);
});
-test("an app's logo sits on a white tile in dark mode, so a black mark like GitHub's still shows", () => {
+test("a loaded logo sits on a white tile in dark mode, so a black mark still shows", () => {
const view = render();
expect(view.container.querySelector("img")?.className).toContain(
"dark:bg-white",
@@ -40,3 +40,23 @@ test("a logo loads at once, never lazily", () => {
"eager",
);
});
+
+/*
+ * "Draw with tokens, not with pictures": GitHub's bundled mark is a shape in the text color, so it
+ * follows light and dark without the white tile a black picture needed.
+ */
+test("GitHub's bundled mark draws in the text color, with no picture and no white tile", () => {
+ const view = render(
+ fallback}
+ logo={GithubMark}
+ name="GitHub"
+ />,
+ );
+ expect(view.container.querySelector("img")).toBeNull();
+ const mark = view.container.querySelector("[data-slot=github-mark]");
+ expect(mark?.getAttribute("fill")).toBe("currentColor");
+ expect(mark?.querySelector("[fill]:not([fill=currentColor])")).toBeNull();
+ expect(view.container.innerHTML).not.toContain("dark:bg-white");
+ expect(view.queryByText("fallback")).toBeNull();
+});
diff --git a/app/tests/routine-edit.test.tsx b/app/tests/routine-edit.test.tsx
index 200b41c43a..e6348796b2 100644
--- a/app/tests/routine-edit.test.tsx
+++ b/app/tests/routine-edit.test.tsx
@@ -10,6 +10,7 @@ import {
} from "@tanstack/react-router";
import { cleanup, render, waitFor, within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
+import { EditRoutineRoutePage } from "@/components/routines/edit-routine-page";
import { RoutineRoutePage } from "@/components/routines/routine-page";
import { cronFrom, scheduleFrom } from "@/lib/routines/form";
import type { RoutineRecord } from "@/lib/routines/queries";
@@ -19,9 +20,9 @@ import { pathOf, ROUTINES_PATH, routineRunsPath } from "./schedules-api";
import { settleReactWork } from "./settle-react-work";
/*
- * Edit routine, on a routine's page. A routine could only be deleted and made again, which lost its
- * runs. Now its name, what it does, its schedule and its time zone change in place, through the
- * API's updateRoutine, and the page shows what was saved.
+ * Edit routine, a screen opened from Edit on a routine's page. A routine could only be deleted and
+ * made again, which lost its runs. Now its name, what it does, its schedule and its time zone change
+ * in place, through the API's updateRoutine, and the routine's page shows what was saved.
*/
beforeAll(() => GlobalRegistrator.register());
@@ -132,6 +133,11 @@ function draw(routine: RoutineRecord = ROUTINE) {
path: "/routines/schedules/$routineId",
component: () => ,
}),
+ createRoute({
+ getParentRoute: () => root,
+ path: "/routines/schedules/$routineId/edit",
+ component: () => ,
+ }),
]),
});
return render(
@@ -152,11 +158,23 @@ async function replaceText(
if (text) await user.type(field, text);
}
+/** Edit, on the routine's page, opens Edit routine: a screen of its own, not a dialog. */
async function openEdit(view: ReturnType) {
const user = userEvent.setup({ document });
await user.click(await view.findByRole("button", { name: /^Edit routine/ }));
- const dialog = await view.findByRole("dialog", { name: "Edit routine" });
- return { user, dialog: within(dialog) };
+ await view.findByRole("heading", { level: 1, name: "Edit routine" });
+ expect(view.queryByRole("dialog")).toBeNull();
+ return { user, page: within(view.container) };
+}
+
+/** Back on the routine's page, which Save returns to. */
+async function backOnRoutine(view: ReturnType) {
+ await waitFor(() =>
+ expect(
+ view.queryByRole("heading", { level: 1, name: "Edit routine" }),
+ ).toBeNull(),
+ );
+ await view.findByRole("button", { name: /^Edit routine/ });
}
test("the picker reads back exactly the schedules it writes, and no others", () => {
@@ -184,20 +202,18 @@ test("the picker reads back exactly the schedules it writes, and no others", ()
test("Edit routine opens with what the routine is now", async () => {
serving();
const view = draw();
- const { dialog } = await openEdit(view);
- expect((dialog.getByLabelText("Name") as HTMLInputElement).value).toBe(
+ const { page } = await openEdit(view);
+ expect((page.getByLabelText("Name") as HTMLInputElement).value).toBe(
"Morning leads",
);
- expect(
- (dialog.getByLabelText("What to do") as HTMLTextAreaElement).value,
- ).toBe(ROUTINE.instruction);
- expect(dialog.getByLabelText("Schedule").textContent).toContain(
- "Every weekday",
+ expect((page.getByLabelText("What to do") as HTMLTextAreaElement).value).toBe(
+ ROUTINE.instruction,
);
- expect((dialog.getByLabelText("Time") as HTMLInputElement).value).toBe(
- "09:00",
+ expect(page.getByLabelText("Schedule").textContent).toContain(
+ "Every weekday",
);
- expect((dialog.getByLabelText("Time zone") as HTMLInputElement).value).toBe(
+ expect((page.getByLabelText("Time") as HTMLInputElement).value).toBe("09:00");
+ expect((page.getByLabelText("Time zone") as HTMLInputElement).value).toBe(
"Europe/Madrid",
);
});
@@ -205,25 +221,23 @@ test("Edit routine opens with what the routine is now", async () => {
test("saving changes what to do and when it runs, and the page shows it", async () => {
const changes = serving();
const view = draw();
- const { user, dialog } = await openEdit(view);
+ const { user, page } = await openEdit(view);
await replaceText(
user,
- dialog.getByLabelText("What to do"),
+ page.getByLabelText("What to do"),
"Send me this week's new leads",
);
- await user.click(dialog.getByLabelText("Schedule"));
+ await user.click(page.getByLabelText("Schedule"));
await user.click(await view.findByRole("option", { name: "Every week" }));
await user.click(await view.findByLabelText("Day of the week"));
await user.click(await view.findByRole("option", { name: "Wednesday" }));
- await replaceText(user, dialog.getByLabelText("Time"), "07:30");
+ await replaceText(user, page.getByLabelText("Time"), "07:30");
expect(
- dialog.getByText("Every Wednesday at 7:30 AM", { exact: false }),
+ page.getByText("Every Wednesday at 7:30 AM", { exact: false }),
).toBeTruthy();
- await user.click(dialog.getByRole("button", { name: "Save changes" }));
+ await user.click(page.getByRole("button", { name: "Save" }));
- await waitFor(() =>
- expect(view.queryByRole("dialog", { name: "Edit routine" })).toBeNull(),
- );
+ await backOnRoutine(view);
// Only what changed was sent: the name and the time zone were left alone.
expect(changes).toEqual([
{ instruction: "Send me this week's new leads", cron: "30 7 * * 3" },
@@ -242,43 +256,75 @@ test("a schedule the picker can't say is kept unless another is picked", async (
};
const changes = serving(custom);
const view = draw(custom);
- const { user, dialog } = await openEdit(view);
- expect(dialog.getByLabelText("Schedule").textContent).toContain(
- "0 9,17 * * *",
- );
+ const { user, page } = await openEdit(view);
+ expect(page.getByLabelText("Schedule").textContent).toContain("0 9,17 * * *");
// No time to pick while it is kept: the schedule is the one it has.
- expect(dialog.queryByLabelText("Time")).toBeNull();
- await replaceText(user, dialog.getByLabelText("Name"), "Twice-daily leads");
- await user.click(dialog.getByRole("button", { name: "Save changes" }));
- await waitFor(() =>
- expect(view.queryByRole("dialog", { name: "Edit routine" })).toBeNull(),
- );
+ expect(page.queryByLabelText("Time")).toBeNull();
+ await replaceText(user, page.getByLabelText("Name"), "Twice-daily leads");
+ await user.click(page.getByRole("button", { name: "Save" }));
+ await backOnRoutine(view);
expect(changes).toEqual([{ title: "Twice-daily leads" }]);
});
-test("a refusal is said in the dialog, which stays open", async () => {
+test("a refusal is said on the page, which stays open", async () => {
const changes = serving(ROUTINE, {
status: 400,
detail: "Routines may run at most every 15 minutes.",
});
const view = draw();
- const { user, dialog } = await openEdit(view);
- await user.click(dialog.getByLabelText("Schedule"));
+ const { user, page } = await openEdit(view);
+ await user.click(page.getByLabelText("Schedule"));
await user.click(await view.findByRole("option", { name: "Every hour" }));
- await user.click(dialog.getByRole("button", { name: "Save changes" }));
- expect((await dialog.findByRole("alert")).textContent).toBe(
+ await user.click(page.getByRole("button", { name: "Save" }));
+ expect((await page.findByRole("alert")).textContent).toBe(
"Routines may run at most every 15 minutes.",
);
- expect(view.getByRole("dialog", { name: "Edit routine" })).toBeTruthy();
+ expect(
+ view.getByRole("heading", { level: 1, name: "Edit routine" }),
+ ).toBeTruthy();
expect(changes).toEqual([{ cron: "0 * * * *" }]);
});
test("an empty What to do is not saved", async () => {
const changes = serving();
const view = draw();
- const { user, dialog } = await openEdit(view);
- await replaceText(user, dialog.getByLabelText("What to do"), "");
- await user.click(dialog.getByRole("button", { name: "Save changes" }));
- expect(await dialog.findByText("Say what the Bot should do.")).toBeTruthy();
+ const { user, page } = await openEdit(view);
+ await replaceText(user, page.getByLabelText("What to do"), "");
+ await user.click(page.getByRole("button", { name: "Save" }));
+ expect(await page.findByText("Say what the Bot should do.")).toBeTruthy();
+ expect(changes).toEqual([]);
+});
+
+test("Cancel goes back to the routine's page and sends nothing", async () => {
+ const changes = serving();
+ const view = draw();
+ const { user, page } = await openEdit(view);
+ await replaceText(user, page.getByLabelText("Name"), "Evening leads");
+ await user.click(page.getByRole("button", { name: "Cancel" }));
+ await backOnRoutine(view);
expect(changes).toEqual([]);
+ expect(
+ view.getByRole("heading", { level: 1, name: "Morning leads" }),
+ ).toBeTruthy();
+});
+
+test("Edit is the page's one action, and the switch and Delete are rows of its actions", async () => {
+ serving();
+ const view = draw();
+ const edit = await view.findByRole("button", { name: /^Edit routine/ });
+ expect(edit.getAttribute("href")).toBe("/routines/schedules/routine-1/edit");
+ const header = view.getByRole("heading", { level: 1 }).closest("header");
+ expect(header?.contains(edit)).toBe(true);
+ expect(header?.querySelector('[role="switch"]')).toBeNull();
+ const actions = view
+ .getByRole("switch", {
+ name: "Enable the routine scheduled Weekdays at 09:00",
+ })
+ .closest('[data-slot="page-rows"]');
+ const remove = view.getByRole("button", {
+ name: "Delete the routine scheduled Weekdays at 09:00",
+ });
+ // Delete is the last row of the same card, never a section of its own under the page.
+ expect(remove.closest('[data-slot="page-rows"]')).toBe(actions);
+ expect(actions?.lastElementChild).toBe(remove);
});
diff --git a/app/tests/skills-settings-page.test.tsx b/app/tests/skills-settings-page.test.tsx
index ed7862acb5..ec4b563902 100644
--- a/app/tests/skills-settings-page.test.tsx
+++ b/app/tests/skills-settings-page.test.tsx
@@ -280,10 +280,18 @@ test("a skill you wrote opens its own screen, and a workspace skill too", async
const yours = section(view, "Your skills");
const written = within(yours).getByText("Weekly report").closest("a");
expect(written?.getAttribute("href")).toBe("/skills/weekly-report");
- // A chevron, as the learned and workspace rows have.
+ // Its menu sits beside the link, not inside it, and the row has no chevron: one outside the
+ // link would open nothing.
+ const row = written?.closest("[data-slot=item]");
expect(
- written?.parentElement?.querySelector("[data-slot=item-actions] > svg"),
+ written?.querySelector('[aria-label="More for Weekly report"]'),
+ ).toBeNull();
+ expect(
+ row?.querySelector(
+ '[data-slot=item-actions] [aria-label="More for Weekly report"]',
+ ),
).toBeTruthy();
+ expect(row?.querySelector("[data-slot=item-actions] > svg")).toBeNull();
const workspace = section(view, "Workspace skills");
expect(
within(workspace)
diff --git a/app/tests/team-connections-directory.test.tsx b/app/tests/team-connections-directory.test.tsx
index 66ce331311..5b05d0690b 100644
--- a/app/tests/team-connections-directory.test.tsx
+++ b/app/tests/team-connections-directory.test.tsx
@@ -425,7 +425,6 @@ describe("Browse apps on the team edition's Connections", () => {
test("apps locked down: is there for a member, says they ask an admin, and Request asks with no Bot", async () => {
const drawn = draw("member");
const browse = await drawn.view.findByTestId("account-browse");
- await drawn.view.findByText("Your connections");
expect(browse.textContent).toContain("Browse apps");
await drawn.user.click(browse);
await drawn.view.findByRole("heading", { name: "Browse apps" });
@@ -602,7 +601,7 @@ describe("apps open, a member adds and connects in one press", () => {
name: "Add custom MCP",
});
expect(add.getAttribute("href")).toBe("/connections/new");
- const browse = open.view.getByRole("link", { name: "Browse apps" });
+ const browse = open.view.getByRole("tab", { name: "Browse apps" });
expect(browse.getAttribute("href")).toBe("/connections/browse/composio");
cleanup();
diff --git a/app/tests/ui-look-guard.allowlist.json b/app/tests/ui-look-guard.allowlist.json
index 503b786f29..753e6a06f3 100644
--- a/app/tests/ui-look-guard.allowlist.json
+++ b/app/tests/ui-look-guard.allowlist.json
@@ -248,8 +248,7 @@
"text": 1
},
"components/what-if/what-if-result.tsx": {
- "cornerStep": 1,
- "darkColor": 1
+ "cornerStep": 1
},
"lib/copilot/a2ui-breakdown.tsx": {
"corner": 2,
From 9ce2b682361e2465f4e8f19f79308e57b42f7bf1 Mon Sep 17 00:00:00 2001
From: Sam Julien
Date: Wed, 2 Dec 2026 10:50:56 -0800
Subject: [PATCH 02/11] fix(app): tighten spacing around Apps search results
---
app/src/components/connections/apps-toolbar.tsx | 5 ++++-
app/src/components/plugins/broker-directory.tsx | 1 +
app/src/routes/_authed/_app/connections.index.tsx | 4 ++--
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/app/src/components/connections/apps-toolbar.tsx b/app/src/components/connections/apps-toolbar.tsx
index 848ba870ef..9e0552f129 100644
--- a/app/src/components/connections/apps-toolbar.tsx
+++ b/app/src/components/connections/apps-toolbar.tsx
@@ -87,7 +87,10 @@ export function AppsToolbar({
children?: ReactNode;
}) {
return (
-
+
diff --git a/app/src/components/plugins/broker-directory.tsx b/app/src/components/plugins/broker-directory.tsx
index 715e4c0e45..1776f9e507 100644
--- a/app/src/components/plugins/broker-directory.tsx
+++ b/app/src/components/plugins/broker-directory.tsx
@@ -374,6 +374,7 @@ export function BrokerDirectory({
>
)}
diff --git a/app/src/routes/_authed/_app/connections.index.tsx b/app/src/routes/_authed/_app/connections.index.tsx
index 2a1da43c22..3c32b36da8 100644
--- a/app/src/routes/_authed/_app/connections.index.tsx
+++ b/app/src/routes/_authed/_app/connections.index.tsx
@@ -575,7 +575,7 @@ function RouteComponent() {
) : null}
{/* What a move to OpenBot Cloud left to connect again, and the way to the list of it. */}
-
+
{/*
* BOTH APP READS DECIDE THIS. Apps that loaded (listApps, the catalogue, getAppSetup) beside a
* listConnections that failed would leave the `connected` set empty and every row
@@ -737,7 +737,7 @@ function ConnectionGrid({
*/
const appPage = useOpenAppPage();
return (
-
+
{rows.map((row) => {
// An app of the person's own to reconnect; a linked account (GitHub, Slack) opens its page.
const reconnects =
From 83b189ec0d5f0e03ac5c2e21b923fa7405c334e4 Mon Sep 17 00:00:00 2001
From: Sam Julien
Date: Wed, 2 Dec 2026 10:53:19 -0800
Subject: [PATCH 03/11] fix(app): place Artifacts below conversation search
---
.../app-sidebar/conversations-panel.tsx | 36 +++++++++----------
app/tests/channel-pagination.test.tsx | 4 +--
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/app/src/components/app-sidebar/conversations-panel.tsx b/app/src/components/app-sidebar/conversations-panel.tsx
index ee67462ad7..73a6c92c5d 100644
--- a/app/src/components/app-sidebar/conversations-panel.tsx
+++ b/app/src/components/app-sidebar/conversations-panel.tsx
@@ -477,24 +477,6 @@ export function ConversationsPanel({ hidden = false }: { hidden?: boolean }) {
- {/*
- * What Bots made in these conversations, kept as things of their own: the Artifacts
- * page, the one destination in this panel that is not a conversation.
- */}
-
- (
-
-
- Artifacts
-
- )}
- />
-
) : null}
+ {/*
+ * What Bots made in these conversations, kept as things of their own: the Artifacts
+ * page, the one destination in this panel that is not a conversation.
+ */}
+
+ (
+
+
+ Artifacts
+
+ )}
+ />
+
{searching ? (
diff --git a/app/tests/channel-pagination.test.tsx b/app/tests/channel-pagination.test.tsx
index 6fc944d764..cd2acb064d 100644
--- a/app/tests/channel-pagination.test.tsx
+++ b/app/tests/channel-pagination.test.tsx
@@ -348,7 +348,7 @@ test("a failed page preserves rows and waits for an explicit retry", async () =>
expect(requests.at(-1)).toBe(`${CONVERSATIONS_PATH}?cursor=last-page`);
});
-test("New conversation is a header action and Artifacts precedes inline search", async () => {
+test("New conversation is a header action and Artifacts follows inline search", async () => {
const view = renderSidebar();
const action = await view.findByRole("button", { name: "New conversation" });
expect(action.getAttribute("href")).toBe("/channel/new");
@@ -356,7 +356,7 @@ test("New conversation is a header action and Artifacts precedes inline search",
const artifacts = view.getByRole("link", { name: "Artifacts" });
const search = view.getByRole("textbox", { name: "Search conversations" });
expect(
- artifacts.compareDocumentPosition(search) &
+ search.compareDocumentPosition(artifacts) &
Node.DOCUMENT_POSITION_FOLLOWING,
).toBeTruthy();
});
From 0d0c8f6e6f5dfaa1a35ae3cf7d2a503270911b80 Mon Sep 17 00:00:00 2001
From: Sam Julien
Date: Wed, 2 Dec 2026 10:57:27 -0800
Subject: [PATCH 04/11] fix(app): make Skills section headings easier to scan
---
app/src/components/skills/skills-settings-page.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/components/skills/skills-settings-page.tsx b/app/src/components/skills/skills-settings-page.tsx
index 014c68bd6d..4e9bd55dac 100644
--- a/app/src/components/skills/skills-settings-page.tsx
+++ b/app/src/components/skills/skills-settings-page.tsx
@@ -257,7 +257,7 @@ export function SkillsSettingsPage({ creating }: { creating: boolean }) {
New skill
}
- className="@container"
+ className="@container [&_[data-slot=page-section-title]]:text-lg [&_[data-slot=page-section-title]]:font-semibold"
description="Write a skill, teach a Bot by showing it, or review what OpenBot proposes."
learnMore="Skills are how your Bots do a task your way."
title="Skills"
From 556d9786b51ab84a3b9f73aac3e1bc39ef706b41 Mon Sep 17 00:00:00 2001
From: Sam Julien
Date: Wed, 2 Dec 2026 11:00:02 -0800
Subject: [PATCH 05/11] fix(app): restore patterned empty states and the
first-routine welcome
---
app/src/components/layout/page-parts.tsx | 6 +++---
app/src/components/routines/routines-home.tsx | 7 ++++++-
app/tests/page-empty.test.tsx | 9 +++++----
app/tests/routines-home.test.tsx | 8 ++++++--
4 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/app/src/components/layout/page-parts.tsx b/app/src/components/layout/page-parts.tsx
index 84f4ebff44..1dc17394db 100644
--- a/app/src/components/layout/page-parts.tsx
+++ b/app/src/components/layout/page-parts.tsx
@@ -325,7 +325,7 @@ export function PageCard({
/**
* What a section says when it has nothing to list, drawn as shadcn's empty state.
*
- * Flat where the rows would be, as the rows are, so the section keeps its shape: the icon says what kind of
+ * The dashed outline marks the space where rows will appear. The icon says what kind of
* thing would be here, the title says that there is none, the description says how one arrives, and
* `action` is the button that adds the first one when the page has one to offer.
*
@@ -345,10 +345,10 @@ export function PageEmpty({
}) {
return (
// `isolate` gives the pattern its own stacking context, so it sits behind the text, not on it.
-
+
{/* The pattern is decoration: see `.empty-pattern` in styles.css and its tokens in theme.css. */}
-
+
{Icon ? (
diff --git a/app/src/components/routines/routines-home.tsx b/app/src/components/routines/routines-home.tsx
index 6a129f76ce..14e7c0489d 100644
--- a/app/src/components/routines/routines-home.tsx
+++ b/app/src/components/routines/routines-home.tsx
@@ -64,7 +64,12 @@ export function RoutinesHome() {
return (
header]:items-center [&>header]:text-center [&_[data-slot=page-title]]:text-3xl"
+ : undefined
+ }
+ title={empty ? "Give your Bots some work" : "Routines"}
>
{
expect(pattern?.getAttribute("aria-hidden")).toBe("true");
});
-test("is flat, as the rows it stands in for are: no edge and no fill of its own", () => {
+test("keeps the dashed frame around the empty-state pattern", () => {
const box = (
renderEmpty().container.querySelector("[data-slot=empty]")?.className ?? ""
).split(/\s+/);
- expect(box).not.toContain("border");
- expect(box).not.toContain("border-border");
+ expect(box).toContain("border-dashed");
+ expect(box).toContain("border");
+ expect(box).toContain("border-border");
expect(box.filter((name) => name.startsWith("bg-"))).toEqual([]);
});
diff --git a/app/tests/routines-home.test.tsx b/app/tests/routines-home.test.tsx
index 33187ef0dd..f81a3c1bd8 100644
--- a/app/tests/routines-home.test.tsx
+++ b/app/tests/routines-home.test.tsx
@@ -117,8 +117,12 @@ const groupNames = (view: ReturnType) =>
test("the heading and the line under it", async () => {
serving({ shown: [bot("atlas", "Atlas")] });
const view = draw();
- const heading = await view.findByRole("heading", { level: 1 });
- expect(heading.textContent).toBe("Routines");
+ expect(
+ await view.findByRole("heading", {
+ name: "Give your Bots some work",
+ level: 1,
+ }),
+ ).toBeTruthy();
expect(
view.getByText(
"Your Bots start these on their own: on a schedule, toward a goal, or when something happens.",
From 67787aeeae4bb82ec4d8be26798e32400a03a2ba Mon Sep 17 00:00:00 2001
From: Sam Julien
Date: Wed, 2 Dec 2026 11:06:51 -0800
Subject: [PATCH 06/11] fix(app): give skill details a clear reading hierarchy
---
app/src/components/manage/skill-page.tsx | 6 ++++--
app/src/components/skills/skill-agents.tsx | 5 ++---
app/src/components/skills/skill-overview.tsx | 20 ++++++++++++--------
3 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/app/src/components/manage/skill-page.tsx b/app/src/components/manage/skill-page.tsx
index fab80542ad..4394224bcf 100644
--- a/app/src/components/manage/skill-page.tsx
+++ b/app/src/components/manage/skill-page.tsx
@@ -216,6 +216,7 @@ export function SkillPage({
) : undefined
}
backButton={back}
+ className="[&_[data-slot=page-section-title]]:text-lg [&_[data-slot=page-section-title]]:font-semibold"
description={skillByline(skill, me?.id, paths.edition)}
title={skill.title}
>
@@ -233,7 +234,7 @@ export function SkillPage({
{/* Their own skill on their own Bots: what a person may grant in the team edition. */}
{!manages && yours ? (
-
+
) : null}
@@ -241,6 +242,7 @@ export function SkillPage({
{manages ? (
<>
Bots with their switch on offer {skill.title} when someone types{" "}
@@ -314,7 +316,7 @@ export function SkillPage({
{/* A row that opens the confirmation, as deleting a Bot is on its own page. */}
-
+
{/* Teams are the team edition's: with one person there is nobody to grant a skill to. */}
{paths.edition === "team" ? (
diff --git a/app/src/components/skills/skill-agents.tsx b/app/src/components/skills/skill-agents.tsx
index 9749a10486..65fb90f12b 100644
--- a/app/src/components/skills/skill-agents.tsx
+++ b/app/src/components/skills/skill-agents.tsx
@@ -1,8 +1,8 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { Button } from "@/components/ui/button";
import { agentListQueryOptions } from "@/lib/agents/queries";
-import { setPluginGrantMutationOptions } from "@/lib/plugins/mutations";
import { failureSaid } from "@/lib/load-failure";
+import { setPluginGrantMutationOptions } from "@/lib/plugins/mutations";
/**
* Which of your Agents carry this skill.
@@ -36,8 +36,7 @@ export function SkillAgents({
grant.mutate({ agentId, granted: !on, kind: "skill", ref: slug });
return (
-
-
Bots
+
{mine.length === 0 ? (
You don't have a Bot of your own yet.
diff --git a/app/src/components/skills/skill-overview.tsx b/app/src/components/skills/skill-overview.tsx
index 1f7f89bc18..5852830cea 100644
--- a/app/src/components/skills/skill-overview.tsx
+++ b/app/src/components/skills/skill-overview.tsx
@@ -1,7 +1,7 @@
import { RESEARCH_ROLES } from "@openbot/shared/research";
import { useQuery } from "@tanstack/react-query";
-import { PageCard } from "@/components/layout/page-shell";
import { toolTitle } from "@/components/skills/skill-tools";
+import { Card, CardTitle } from "@/components/ui/card";
import { appsQueryOptions } from "@/lib/apps/queries";
import type { Skill } from "@/lib/skills/queries";
@@ -120,18 +120,22 @@ function SkillToolList({ refs }: { refs: string[] }) {
export function SkillOverview({ skill }: { skill: Skill }) {
return (
@@ -234,7 +239,7 @@ export function SkillPage({
{/* Their own skill on their own Bots: what a person may grant in the team edition. */}
{!manages && yours ? (
-
+
) : null}
@@ -242,7 +247,7 @@ export function SkillPage({
{manages ? (
<>
Bots with their switch on offer {skill.title} when someone types{" "}
@@ -315,36 +320,25 @@ export function SkillPage({
)}
- {/* A row that opens the confirmation, as deleting a Bot is on its own page. */}
-
-
- {/* Teams are the team edition's: with one person there is nobody to grant a skill to. */}
- {paths.edition === "team" ? (
+
+ {paths.edition === "team" && (
+
- ) : null}
- setRemoving(true)} type="button" />
- }
- size="sm"
- >
-
- Delete
-
- People can't run it any more, and no Bot offers it. You
- can't undo this.
-
-
-
-
-
-
-
-
+
+ )}
+
+
diff --git a/app/src/components/settings/learning-review.tsx b/app/src/components/settings/learning-review.tsx
index 19071e1bec..ba98147cef 100644
--- a/app/src/components/settings/learning-review.tsx
+++ b/app/src/components/settings/learning-review.tsx
@@ -1,19 +1,19 @@
import type { LearningProposal } from "@openbot/shared/learning";
import { useMutation, useQuery } from "@tanstack/react-query";
import { Fragment, useEffect, useRef, useState } from "react";
-import { IconChevronRight, IconSparkles } from "@/components/icons";
import {
- PageEmpty,
- PageRows,
- PageSection,
-} from "@/components/layout/page-shell";
+ IconChevronRight,
+ IconVideo,
+ IconMessageCircle,
+} from "@/components/icons";
+import { PageIntro, PageRows } from "@/components/layout/page-shell";
import { ProposalDialog } from "@/components/learning/proposal-dialog";
-import { Button } from "@/components/ui/button";
import {
Item,
ItemActions,
ItemContent,
ItemDescription,
+ ItemMedia,
ItemTitle,
} from "@/components/ui/item";
import { Separator } from "@/components/ui/separator";
@@ -221,6 +221,7 @@ export function LearningReview({
const unavailable = sources.some((source) => source.unavailable);
// Sources that share a label are one group: the same words to the person, one Learn now.
const groups: {
+ kind: "recordings" | "conversations";
label: string;
containers: string[];
latestRun: LearningRunSummary | null;
@@ -230,6 +231,7 @@ export function LearningReview({
let group = groups.find((candidate) => candidate.label === source.label);
if (!group) {
group = {
+ kind: source.kind,
label: source.label,
containers: [],
latestRun: null,
@@ -248,22 +250,9 @@ export function LearningReview({
if (proposal.status === "pending_review")
group.waiting.push({ container: source.containerId, proposal });
}
- const anyWaiting = groups.some((group) => group.waiting.length > 0);
- // With automatic approval on, an empty list says nothing the switch doesn't.
- const showList = autoApproveOn !== true || anyWaiting;
- // The heading says something waits only when a skill does: not while Learning runs, and not with nothing left to approve.
- const heading = !anyWaiting
- ? { title: "New skills", description: undefined }
- : canReview
- ? {
- title: "Waiting for your review",
- description: "Approve a skill to publish it to your Bots.",
- }
- : {
- title: "Waiting for an admin",
- description:
- "An admin reviews these. You can read what Learning proposes here.",
- };
+ const description = canReview
+ ? "Approve a skill to publish it to your Bots."
+ : "An admin reviews these. You can read what Learning proposes here.";
const learnNowFor = async (group: {
label: string;
containers: string[];
@@ -295,13 +284,103 @@ export function LearningReview({
}));
};
+ const waiting = groups.flatMap((group) => group.waiting);
return (
-
- {stale ? (
-
{failureSaid(saveAutoApprove.error)}
@@ -445,6 +456,6 @@ export function LearningReview({
publishedNote="Published. Your Bots use it from their next conversation."
/>
)}
-
+ >
);
}
diff --git a/app/src/components/skills/skill-overview.tsx b/app/src/components/skills/skill-overview.tsx
index 5852830cea..653f7f1a69 100644
--- a/app/src/components/skills/skill-overview.tsx
+++ b/app/src/components/skills/skill-overview.tsx
@@ -1,5 +1,13 @@
+import { appKey } from "@openbot/shared/audit-filters";
import { RESEARCH_ROLES } from "@openbot/shared/research";
import { useQuery } from "@tanstack/react-query";
+import { IconTool } from "@/components/icons";
+import {
+ appVendorLogo,
+ appVendorMark,
+ GithubMark,
+ PluginLogo,
+} from "@/components/plugins/plugin-logo";
import { toolTitle } from "@/components/skills/skill-tools";
import { Card, CardTitle } from "@/components/ui/card";
import { appsQueryOptions } from "@/lib/apps/queries";
@@ -72,16 +80,39 @@ function toolGroups(
function ToolGroups({ groups }: { groups: ToolGroup[] }) {
return (
diff --git a/app/src/components/skills/skills-settings-page.tsx b/app/src/components/skills/skills-settings-page.tsx
index 4e9bd55dac..741fdc97b2 100644
--- a/app/src/components/skills/skills-settings-page.tsx
+++ b/app/src/components/skills/skills-settings-page.tsx
@@ -1,8 +1,11 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import { Link, useNavigate } from "@tanstack/react-router";
import { useState } from "react";
-import { TEACH_A_BOT } from "@/components/browser/browser-nav-item";
-import { IconChevronRight, IconDots } from "@/components/icons";
+import {
+ IconChalkboardTeacher,
+ IconChevronRight,
+ IconDots,
+} from "@/components/icons";
import { DetailPanel } from "@/components/layout/detail-panel";
import {
PageAddButton,
@@ -29,6 +32,7 @@ import {
ItemActions,
ItemContent,
ItemDescription,
+ ItemMedia,
ItemTitle,
} from "@/components/ui/item";
import { Separator } from "@/components/ui/separator";
@@ -36,7 +40,6 @@ import { grantRoster } from "@/lib/agents/grant-roster";
import { grantSummary } from "@/lib/agents/grant-summary";
import { agentListQueryOptions } from "@/lib/agents/queries";
import { currentUserQueryOptions } from "@/lib/auth/queries";
-import { browserStateQueryOptions } from "@/lib/browser/queries";
import {
type Failure,
failureSaid,
@@ -57,10 +60,10 @@ import { NewSkill } from "./new-skill";
* skill someone wrote opens its own screen, read first, with Edit for the form
* (`/skills/$slug`); learned ones open their dialog and keep the team edition's sharing switches
* (`LearningSharing`).
- * 2. Workspace skills, team edition only: the admin's. Each opens the same screen, with no Edit.
- * 3. Who else's Bots use your skills, team edition only: after the lists, so both are read first.
- * 4. Waiting for your review: what OpenBot proposes, with Learn now and automatic approval.
- * 5. Teach a Bot: one row to the recording page, where OpenBot can run a browser for you.
+ * 2. Teach a Bot: record a task.
+ * 3. Proposed skills: review what OpenBot suggests.
+ * 4. Workspace skills, team edition only: the admin's. Each opens the same screen, with no Edit.
+ * 5. Who else's Bots use your skills, team edition only: after the lists, so both are read first.
*
* Writing a new skill in the team edition is a search parameter, as it was on Capabilities, so the
* list stays behind the panel and the panel is linkable and closed by Back.
@@ -73,7 +76,6 @@ export function SkillsSettingsPage({ creating }: { creating: boolean }) {
const me = useQuery(currentUserQueryOptions());
const { data: agents } = useQuery(agentListQueryOptions());
const { data: hiddenAgents } = useQuery(agentListQueryOptions(true));
- const browser = useQuery(browserStateQueryOptions());
// The error itself, not its words, so a hold is drawn calmly (lib/load-failure.tsx).
const [error, setError] = useState(null);
const removeSkill = useMutation({
@@ -245,8 +247,6 @@ export function SkillsSettingsPage({ creating }: { creating: boolean }) {
>
+
+
+ } size="sm">
+
+
+
+
+ Record a task
+
+ Show a Bot a task once in your browser. When Learning is
+ on, OpenBot automatically checks your recording for
+ skills.
+
+
+
+
+
+
+
+
+
+ {workspace}
+ >
+ }
heldAbove={heldAbove}
written={written}
writtenKnown={writtenKnown}
/>
-
-
-
- {/* Only where OpenBot can run a browser for this person. */}
- {browser.data?.available ? (
-
-
- } size="sm">
-
- Record a task
-
- Show a Bot a task once in your browser, and OpenBot turns
- the steps into a skill.
-
-
-
-
-
-
-
-
- ) : null}
);
diff --git a/app/tests/admin-skills-pages.test.tsx b/app/tests/admin-skills-pages.test.tsx
index b08f25042c..0396dd128c 100644
--- a/app/tests/admin-skills-pages.test.tsx
+++ b/app/tests/admin-skills-pages.test.tsx
@@ -316,9 +316,7 @@ describe("a skill's page", () => {
test("deleting asks first, then goes back to the list", async () => {
const { view, router } = renderAt("/admin/skills/triage");
const user = userEvent.setup({ document });
- await user.click(
- await view.findByRole("button", { name: /^Delete People can.t run it/ }),
- );
+ await user.click(await view.findByRole("button", { name: "Delete skill" }));
expect(writes).toEqual([]);
const dialog = await view.findByRole("dialog");
expect(within(dialog).getByText("Delete Triage the inbox?")).toBeTruthy();
diff --git a/app/tests/learning-review.test.tsx b/app/tests/learning-review.test.tsx
index ee083f3ca5..763e291f9e 100644
--- a/app/tests/learning-review.test.tsx
+++ b/app/tests/learning-review.test.tsx
@@ -310,7 +310,7 @@ function refuseLearnNow(container: string) {
test("lists the pending proposals with what each does", async () => {
const view = draw();
- await view.findByText("Waiting for an admin");
+ await view.findByText(/An admin reviews these/);
expect(await view.findByText("New skill")).toBeTruthy();
expect(view.getByText("Update to Close ticket")).toBeTruthy();
expect(view.getByText("Remove Old skill")).toBeTruthy();
@@ -358,27 +358,6 @@ test("says some were unreadable when another source was read", async () => {
expect(alert.textContent).toContain("Couldn't read some of your");
});
-test("on a team, says what to expect when nothing is waiting", async () => {
- review = reviewOf(true, null, []);
- const view = draw();
- expect(await view.findByText("Nothing to review")).toBeTruthy();
- expect(
- await view.findByText(
- "New proposals show up here after Learning analyses your recordings.",
- ),
- ).toBeTruthy();
-});
-
-test("in the personal edition the empty state mentions conversations", async () => {
- review = reviewOf(true, false, []); // personal: autoApprove is a boolean
- const view = draw();
- expect(
- await view.findByText(
- "New proposals show up here after Learning analyses your recordings and conversations.",
- ),
- ).toBeTruthy();
-});
-
test("with people approving, the latest run shows and Learn now starts one", async () => {
review = body(true);
const first = review.spaces[0];
@@ -389,10 +368,14 @@ test("with people approving, the latest run shows and Learn now starts one", asy
};
const view = draw();
expect(await view.findByText("Latest run finished.")).toBeTruthy();
- fireEvent.click(await view.findByRole("button", { name: "Learn now" }));
+ fireEvent.click(
+ await view.findByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ );
await waitFor(() => expect(posts).toEqual([startedIn("user-1")]));
const busy = await view.findByRole("button", {
- name: "Learning in progress…",
+ name: /Learning in progress…/,
});
expect((busy as HTMLButtonElement).disabled).toBe(true);
expect(view.queryByText(/Learning started/)).toBeNull();
@@ -426,13 +409,20 @@ test("turning automatic approval off shows proposals from recordings and from co
}),
]);
const view = draw();
- expect(await view.findByText("From your recordings")).toBeTruthy();
- expect(view.getByText("From your conversations")).toBeTruthy();
+ expect(await view.findByText("Learn from saved recordings")).toBeTruthy();
+ expect(view.getByText("Learn from finished conversations")).toBeTruthy();
expect(view.getByText("Refund order")).toBeTruthy();
expect(view.getByText("Reply politely")).toBeTruthy();
- expect(view.getByText("No run yet.")).toBeTruthy();
+ expect(
+ view.getByRole("button", { name: /^Learn from saved recordings/ }),
+ ).toBeTruthy();
+ expect(
+ view.getByRole("button", { name: /^Learn from finished conversations/ }),
+ ).toBeTruthy();
expect(view.getByText("Latest run finished.")).toBeTruthy();
- const buttons = view.getAllByRole("button", { name: "Learn now" });
+ const buttons = view.getAllByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ });
expect(buttons).toHaveLength(2);
fireEvent.click(buttons[1] as HTMLElement);
await waitFor(() => expect(posts).toEqual([startedIn("user-1-chat")]));
@@ -453,13 +443,19 @@ test("sources with the same label make one group with one Learn now", async () =
);
const view = draw();
expect(await view.findByText("Skill a")).toBeTruthy();
- expect(view.getAllByText("From your conversations")).toHaveLength(1);
+ expect(view.getAllByText("Learn from finished conversations")).toHaveLength(
+ 1,
+ );
fireEvent.click(view.getByText("Skill b"));
fireEvent.click(await view.findByText("Approve and publish"));
await waitFor(() => expect(posts).toEqual([approvedIn("p-b", "bot-b")]));
posts.length = 0;
fireEvent.click(await view.findByText("Done"));
- fireEvent.click(await view.findByRole("button", { name: "Learn now" }));
+ fireEvent.click(
+ await view.findByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ );
await waitFor(() =>
expect(posts).toEqual([startedIn("bot-a"), startedIn("bot-b")]),
);
@@ -474,12 +470,17 @@ test("Learn now starts every source in the group even when one fails", async ()
containerId: `bot-${id}`,
kind: "conversations",
label: "From your conversations",
+ proposals: [proposal(`p-${id}`, `skill-${id}`, "add")],
}),
),
);
refuseLearnNow("bot-a");
const view = draw();
- fireEvent.click(await view.findByRole("button", { name: "Learn now" }));
+ fireEvent.click(
+ await view.findByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ );
await waitFor(() =>
expect(posts).toEqual([startedIn("bot-a"), startedIn("bot-b")]),
);
@@ -488,8 +489,12 @@ test("Learn now starts every source in the group even when one fails", async ()
test("with admins approving, there is no Learn now", async () => {
const view = draw();
- await view.findByText("Waiting for an admin");
- expect(view.queryByRole("button", { name: "Learn now" })).toBeNull();
+ await view.findByText(/An admin reviews these/);
+ expect(
+ view.queryByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ ).toBeNull();
expect(view.queryByText(/Latest run/)).toBeNull();
});
@@ -591,7 +596,11 @@ test("the personal edition shows Learning with automatic approval on and no shar
expect(approve.getAttribute("aria-checked")).toBe("true");
await view.findByText("Your skills");
expect(view.queryByText("Who else's Bots use your skills")).toBeNull();
- expect(view.getByRole("button", { name: "Learn now" })).toBeTruthy();
+ expect(
+ await view.findByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ ).toBeTruthy();
expect(view.queryByText("Nothing to review")).toBeNull();
fireEvent.click(approve);
await waitFor(() =>
@@ -601,7 +610,7 @@ test("the personal edition shows Learning with automatic approval on and no shar
);
});
-test("Waiting for your review shows only once a skill is waiting, not while Learning runs with automatic approval on", async () => {
+test("review instructions appear when a proposal needs a decision", async () => {
const base = body(true, true);
const source = (
proposals: LearningProposal[],
@@ -617,48 +626,49 @@ test("Waiting for your review shows only once a skill is waiting, not while Lear
,
);
- await view.findByRole("button", { name: "Learning in progress…" });
+ await view.findByRole("switch", { name: "Approve new skills automatically" });
await view.findByText("Your skills");
expect(view.queryByText("Waiting for your review")).toBeNull();
expect(view.queryByText(/Approve a skill to publish it/)).toBeNull();
- expect(view.getByRole("heading", { name: "New skills" })).toBeTruthy();
+ expect(view.queryByRole("heading", { name: "Proposed skills" })).toBeNull();
// The run finished and its skill was approved automatically: still nothing waits.
review = { ...base, spaces: [source([], null)] };
await queryClient.invalidateQueries({ queryKey: ["learning", "review"] });
- await view.findByRole("button", { name: "Learn now" });
+ expect(
+ await view.findByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ ).toBeTruthy();
expect(view.queryByText("Waiting for your review")).toBeNull();
- // One skill is waiting: now the heading says so.
+ // A pending proposal adds instructions under the same heading.
review = {
...base,
spaces: [source([proposal("p1", "refund-order", "add")], null)],
};
await queryClient.invalidateQueries({ queryKey: ["learning", "review"] });
expect(
- await view.findByRole("heading", { name: "Waiting for your review" }),
+ await view.findByText("Approve a skill to publish it to your Bots."),
).toBeTruthy();
expect(
- view.getByText("Approve a skill to publish it to your Bots."),
+ view.getByRole("heading", { level: 3, name: "Proposed skills" }),
).toBeTruthy();
expect(view.getByText("Refund order")).toBeTruthy();
- expect(view.queryByRole("heading", { name: "New skills" })).toBeNull();
});
-test("with nothing waiting, the empty state shows under New skills, not under a Waiting heading", async () => {
- review = reviewOf(true, false, []);
+test("an empty queue has no Proposed skills section", async () => {
+ review = reviewOf(true, false, [space({ proposals: [] })]);
const view = draw();
- expect(await view.findByText("Nothing to review")).toBeTruthy();
- expect(view.queryByText("Waiting for your review")).toBeNull();
- expect(view.getByRole("heading", { name: "New skills" })).toBeTruthy();
- cleanup();
- queryClient.clear();
-
- // On a team where admins approve, the same rule holds for Waiting for an admin.
- review = reviewOf(false, null, []);
- const team = draw();
- expect(await team.findByText("Nothing to review")).toBeTruthy();
- expect(team.queryByText("Waiting for an admin")).toBeNull();
+ await view.findByRole("switch", { name: "Approve new skills automatically" });
+ fireEvent.click(
+ view.getByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ );
+ await waitFor(() => expect(posts).toEqual([startedIn("user-1")]));
+ expect(view.queryByRole("heading", { name: "Proposed skills" })).toBeNull();
+ expect(view.queryByText("Nothing to review")).toBeNull();
});
test("a source Learning is off for says so plainly, without the read failure alert", async () => {
@@ -703,19 +713,30 @@ test("a Learn now failure in one group does not show in another", async () => {
containerId: `src-${id}`,
kind: "conversations",
label: `Group ${id}`,
+ proposals: [proposal(`p-${id}`, `skill-${id}`, "add")],
}),
),
);
refuseLearnNow("src-a");
const view = draw();
- const buttons = await view.findAllByRole("button", { name: "Learn now" });
+ const buttons = await view.findAllByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ });
fireEvent.click(buttons[0] as HTMLElement);
expect((await view.findByRole("alert")).textContent).toBe(UNREACHABLE);
- fireEvent.click(view.getAllByRole("button", { name: "Learn now" })[1]!);
- await view.findByRole("button", { name: "Learning in progress…" });
+ fireEvent.click(
+ view.getAllByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ })[1]!,
+ );
+ await view.findByRole("button", { name: /Learning in progress…/ });
// Group b's start does not wipe or borrow group a's failure, and a's button comes back.
expect(view.getByRole("alert").textContent).toBe(UNREACHABLE);
- expect(view.getAllByRole("button", { name: "Learn now" })).toHaveLength(1);
+ expect(
+ view.getAllByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ ).toHaveLength(1);
});
test("Learn now stays disabled until the run it started has finished", async () => {
@@ -723,8 +744,12 @@ test("Learn now stays disabled until the run it started has finished", async ()
const first = review.spaces[0];
if (first) first.latestRun = run("run-1", "2026-11-01T00:00:00Z");
const view = draw();
- fireEvent.click(await view.findByRole("button", { name: "Learn now" }));
- await view.findByRole("button", { name: "Learning in progress…" });
+ fireEvent.click(
+ await view.findByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ );
+ await view.findByRole("button", { name: /Learning in progress…/ });
const next = review.spaces[0];
if (next) next.latestRun = run("run-2", "2026-11-02T00:00:00Z", "batching");
await queryClient.invalidateQueries({ queryKey: ["learning", "review"] });
@@ -732,7 +757,7 @@ test("Learn now stays disabled until the run it started has finished", async ()
expect(
(
view.getByRole("button", {
- name: "Learning in progress…",
+ name: /Learning in progress…/,
}) as HTMLButtonElement
).disabled,
).toBe(true);
@@ -740,8 +765,11 @@ test("Learn now stays disabled until the run it started has finished", async ()
await queryClient.invalidateQueries({ queryKey: ["learning", "review"] });
await view.findByText("Latest run finished.");
expect(
- (view.getByRole("button", { name: "Learn now" }) as HTMLButtonElement)
- .disabled,
+ (
+ view.getByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }) as HTMLButtonElement
+ ).disabled,
).toBe(false);
});
@@ -751,7 +779,7 @@ test("a run already going shows Learning in progress, disabled", async () => {
if (first) first.latestRun = run("run-1", "2026-11-01T00:00:00Z", "queued");
const view = draw();
const busy = await view.findByRole("button", {
- name: "Learning in progress…",
+ name: /Learning in progress…/,
});
expect((busy as HTMLButtonElement).disabled).toBe(true);
});
diff --git a/app/tests/skills-settings-page.test.tsx b/app/tests/skills-settings-page.test.tsx
index ec4b563902..a44e417719 100644
--- a/app/tests/skills-settings-page.test.tsx
+++ b/app/tests/skills-settings-page.test.tsx
@@ -109,7 +109,15 @@ function draw(
canReview: true,
autoApprove: null,
approved: 0,
- spaces: [],
+ spaces: [
+ {
+ containerId: "me",
+ kind: "recordings",
+ label: "From your recordings",
+ latestRun: null,
+ proposals: [],
+ },
+ ],
});
client.setQueryData(browserKeys.state, { available: browser });
const root = createRootRoute();
@@ -172,9 +180,8 @@ test("New skill opens the side panel, and Teach a Bot is a row where a browser c
expect(view.getByText("New skill").closest("a")?.getAttribute("href")).toBe(
"/skills?new=true",
);
- const teach = section(view, "Teach a Bot");
expect(
- within(teach).getByText("Record a task").closest("a")?.getAttribute("href"),
+ view.getByRole("link", { name: /Record a task/ }).getAttribute("href"),
).toBe("/browser");
});
@@ -186,10 +193,12 @@ test("in the personal edition, New skill opens the form whose skill has a switch
);
});
-test("no Teach a Bot row where OpenBot can't run a browser for you", async () => {
+test("Teach a Bot is reachable even when recording is unavailable", async () => {
const view = draw("team");
await view.findByRole("heading", { name: "Skills" });
- expect(view.queryByRole("heading", { name: "Teach a Bot" })).toBeNull();
+ expect(
+ view.getByRole("link", { name: /Record a task/ }).getAttribute("href"),
+ ).toBe("/browser");
});
test("the skills you wrote and New skill stay when Learning can't be read", async () => {
@@ -266,9 +275,22 @@ test("both lists come before the setting about who else's Bots use them", async
const headings = view
.getAllByRole("heading", { level: 2 })
.map((heading) => heading.textContent);
- expect(headings.indexOf("Your skills")).toBeLessThan(
- headings.indexOf("Workspace skills"),
- );
+ expect(view.getByRole("link", { name: /Record a task/ })).toBeTruthy();
+ expect(
+ within(section(view, "Learning")).queryByRole("heading", {
+ name: "Proposed skills",
+ }),
+ ).toBeNull();
+ expect(
+ within(section(view, "Learning")).getByRole("button", {
+ name: /^Learn from (?!.*Learning in progress)/,
+ }),
+ ).toBeTruthy();
+ expect(headings.slice(0, 3)).toEqual([
+ "Your skills",
+ "Learning",
+ "Workspace skills",
+ ]);
expect(headings.indexOf("Workspace skills")).toBeLessThan(
headings.indexOf("Who else's Bots use your skills"),
);
diff --git a/app/tests/team-grants-screens-layout.test.tsx b/app/tests/team-grants-screens-layout.test.tsx
index 6932e1da44..3b0b2a7a25 100644
--- a/app/tests/team-grants-screens-layout.test.tsx
+++ b/app/tests/team-grants-screens-layout.test.tsx
@@ -829,7 +829,11 @@ const SCREENS: Screen[] = [
? page.getByRole("heading", { name: "Manage" }).waitFor()
: teamsRow(page).waitFor(),
],
- lookAt: lookAtHeading("Manage"),
+ lookAt: before
+ ? lookAtHeading("Manage")
+ : async (page) => {
+ await teamsRow(page).scrollIntoViewIfNeeded();
+ },
},
{
name: "skill-teams",
From a96512ac1e248a8ea173b2450918195444e31738 Mon Sep 17 00:00:00 2001
From: Sam Julien
Date: Wed, 2 Dec 2026 12:14:53 -0800
Subject: [PATCH 08/11] Use stable skill tool labels and sort Learning imports
---
app/src/components/settings/learning-review.tsx | 2 +-
app/src/components/skills/skill-overview.tsx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/src/components/settings/learning-review.tsx b/app/src/components/settings/learning-review.tsx
index ba98147cef..3c3865e867 100644
--- a/app/src/components/settings/learning-review.tsx
+++ b/app/src/components/settings/learning-review.tsx
@@ -3,8 +3,8 @@ import { useMutation, useQuery } from "@tanstack/react-query";
import { Fragment, useEffect, useRef, useState } from "react";
import {
IconChevronRight,
- IconVideo,
IconMessageCircle,
+ IconVideo,
} from "@/components/icons";
import { PageIntro, PageRows } from "@/components/layout/page-shell";
import { ProposalDialog } from "@/components/learning/proposal-dialog";
diff --git a/app/src/components/skills/skill-overview.tsx b/app/src/components/skills/skill-overview.tsx
index 653f7f1a69..99afc96110 100644
--- a/app/src/components/skills/skill-overview.tsx
+++ b/app/src/components/skills/skill-overview.tsx
@@ -72,7 +72,7 @@ function toolGroups(
const list = (groups: Map) =>
[...groups].map(([title, tools]) => ({
title,
- tools: tools.filter(Boolean),
+ tools: [...new Set(tools.filter(Boolean))],
}));
return { connected: list(connected), missing: list(missing) };
}
@@ -99,8 +99,8 @@ function ToolGroups({ groups }: { groups: ToolGroup[] }) {
{group.tools.length > 0 && (
- {group.tools.map((tool, index) => (
-
+ {group.tools.map((tool) => (
+
Date: Wed, 2 Dec 2026 12:16:06 -0800
Subject: [PATCH 09/11] Use the supported role query in the Bot routine tests
---
app/tests/bot-routines-summary.test.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/tests/bot-routines-summary.test.tsx b/app/tests/bot-routines-summary.test.tsx
index 5045616f1e..dfb311f9d2 100644
--- a/app/tests/bot-routines-summary.test.tsx
+++ b/app/tests/bot-routines-summary.test.tsx
@@ -84,7 +84,7 @@ const rowNames = (view: ReturnType) =>
);
const heading = (view: ReturnType) =>
- view.findByRole("heading", { name: "Routines", exact: true });
+ view.findByRole("heading", { name: "Routines" });
test("running first, then what starts soonest, then what is paused, counted, with All routines to the Bot's Routines", async () => {
const view = draw([
From 3c724a1abf12f4fe104f91fb19b8088bf55a2153 Mon Sep 17 00:00:00 2001
From: Sam Julien
Date: Wed, 2 Dec 2026 13:32:21 -0800
Subject: [PATCH 10/11] Address Skills review and restore standard section
spacing
---
.../components/connections/apps-toolbar.tsx | 5 +--
app/src/components/layout/page-parts.tsx | 2 +-
app/src/components/manage/skill-page.tsx | 38 +++++++----------
.../components/settings/learning-review.tsx | 8 ++--
app/src/components/skills/skill-overview.tsx | 4 +-
.../skills/skills-settings-page.tsx | 42 ++++++++++---------
app/tests/learning-review.test.tsx | 2 +-
app/tests/skills-settings-page.test.tsx | 9 ++--
app/tests/team-grants-screens-layout.test.tsx | 6 +--
9 files changed, 52 insertions(+), 64 deletions(-)
diff --git a/app/src/components/connections/apps-toolbar.tsx b/app/src/components/connections/apps-toolbar.tsx
index 9e0552f129..848ba870ef 100644
--- a/app/src/components/connections/apps-toolbar.tsx
+++ b/app/src/components/connections/apps-toolbar.tsx
@@ -87,10 +87,7 @@ export function AppsToolbar({
children?: ReactNode;
}) {
return (
-
+
diff --git a/app/src/components/layout/page-parts.tsx b/app/src/components/layout/page-parts.tsx
index 1dc17394db..065a831df6 100644
--- a/app/src/components/layout/page-parts.tsx
+++ b/app/src/components/layout/page-parts.tsx
@@ -345,7 +345,7 @@ export function PageEmpty({
}) {
return (
// `isolate` gives the pattern its own stacking context, so it sits behind the text, not on it.
-
+
{/* The pattern is decoration: see `.empty-pattern` in styles.css and its tokens in theme.css. */}
diff --git a/app/src/components/manage/skill-page.tsx b/app/src/components/manage/skill-page.tsx
index f74f137cbc..99e1c2d588 100644
--- a/app/src/components/manage/skill-page.tsx
+++ b/app/src/components/manage/skill-page.tsx
@@ -1,18 +1,14 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { Link, linkOptions, useNavigate } from "@tanstack/react-router";
import { useState } from "react";
-import {
- IconBolt,
- IconFileOff,
- IconPencil,
- IconTrash,
-} from "@/components/icons";
+import { IconBolt, IconFileOff, IconPencil } from "@/components/icons";
import {
PageEmpty,
PageRows,
PageSection,
PageShell,
} from "@/components/layout/page-shell";
+import { DeleteRow } from "@/components/routines/delete-row";
import { SkillAgents } from "@/components/skills/skill-agents";
import { SkillFields } from "@/components/skills/skill-fields";
import { SkillOverview, skillByline } from "@/components/skills/skill-overview";
@@ -216,7 +212,6 @@ export function SkillPage({
) : undefined
}
backButton={back}
- className="[&_[data-slot=page-section-title]]:text-lg [&_[data-slot=page-section-title]]:font-semibold"
description={
<>
{skill.summary && (
@@ -239,7 +234,7 @@ export function SkillPage({
{/* Their own skill on their own Bots: what a person may grant in the team edition. */}
{!manages && yours ? (
-
+
) : null}
@@ -247,7 +242,6 @@ export function SkillPage({
{manages ? (
<>
Bots with their switch on offer {skill.title} when someone types{" "}
@@ -320,25 +314,23 @@ export function SkillPage({
)}
-