diff --git a/api/accepted-breaking-changes.md b/api/accepted-breaking-changes.md
index e03406dba2..f35d7f3be5 100644
--- a/api/accepted-breaking-changes.md
+++ b/api/accepted-breaking-changes.md
@@ -44,4 +44,6 @@ Once the change is on the base branch, oasdiff no longer reports it and its line
- 2026-11-15 PUT /api/v2/organizations/{organizationId}/network-policies/{networkPolicyId} added the new `team` enum value to the `scopeKind` response property for the response status `200`. A network policy can now be set for a team by id, beside the organization and a directory group; a client that never set one never reads one.
- 2026-11-15 GET /api/v2/organizations/{organizationId}/shared-use-requests added the new `team` enum value to the `sharedUseRequests/items/current/oneOf[#/components/schemas/SharedUseApproval]/members/items/kind` response property for the response status `200` (shared schema: `SharedUseApproval`, also at `sharedUseRequests/items/proposed/members/items/kind`). A shared account's audience can now name a team by id beside a person and a directory group; nothing is taken from a client, and one written before teams never sent or approved a team.
- 2026-11-15 POST /api/v2/organizations/{organizationId}/shared-use-requests/{sharedUseRequestId}/approve added the new `team` enum value to the `current/oneOf[#/components/schemas/SharedUseApproval]/members/items/kind` response property for the response status `200` (shared schema: `SharedUseApproval`, also at `proposed/members/items/kind`). A shared account's audience can now name a team by id beside a person and a directory group; nothing is taken from a client, and one written before teams never sent or approved a team.
-- 2026-11-15 POST /api/v2/organizations/{organizationId}/shared-use-requests/{sharedUseRequestId}/decline added the new `team` enum value to the `current/oneOf[#/components/schemas/SharedUseApproval]/members/items/kind` response property for the response status `200` (shared schema: `SharedUseApproval`, also at `proposed/members/items/kind`). A shared account's audience can now name a team by id beside a person and a directory group; nothing is taken from a client, and one written before teams never sent or approved a team.
\ No newline at end of file
+- 2026-11-15 POST /api/v2/organizations/{organizationId}/shared-use-requests/{sharedUseRequestId}/decline added the new `team` enum value to the `current/oneOf[#/components/schemas/SharedUseApproval]/members/items/kind` response property for the response status `200` (shared schema: `SharedUseApproval`, also at `proposed/members/items/kind`). A shared account's audience can now name a team by id beside a person and a directory group; nothing is taken from a client, and one written before teams never sent or approved a team.
+- 2026-11-18 GET /api/v2/organizations/{organizationId}/people/{personId}/preferences added the new `kitebot` enum value to the `skin` response property for the response status `200`. A person's skin is the one they picked, and Kite Bot is a new one. A build from before it reads an id it does not know as `openbot`, OpenBot's own look, as it already reads any skin it does not know, so a client written against the old list shows OpenBot rather than failing.
+- 2026-11-18 PATCH /api/v2/organizations/{organizationId}/people/{personId}/preferences added the new `kitebot` enum value to the `skin` response property for the response status `200`. The same skin, as a save answers it.
\ No newline at end of file
diff --git a/api/openapi.yaml b/api/openapi.yaml
index b7f7a8ebb4..b7f5f57ef8 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -21620,6 +21620,7 @@ components:
- openduet
- opendots
- openfuse
+ - kitebot
description: How OpenBot looks. openbot is OpenBot as it is without a skin.
Preferences:
type: object
diff --git a/api/openapi/accounts.yaml b/api/openapi/accounts.yaml
index d06cf464cf..0a5e92d0d8 100644
--- a/api/openapi/accounts.yaml
+++ b/api/openapi/accounts.yaml
@@ -1344,7 +1344,7 @@ components:
enum: ['on', 'off']
SkinId:
type: string
- enum: [openbot, openduet, opendots, openfuse]
+ enum: [openbot, openduet, opendots, openfuse, kitebot]
description: How OpenBot looks. openbot is OpenBot as it is without a skin.
Preferences:
type: object
diff --git a/app/src/components/agents/abstract-avatar.tsx b/app/src/components/agents/abstract-avatar.tsx
index b1518448c6..50cfb900d5 100644
--- a/app/src/components/agents/abstract-avatar.tsx
+++ b/app/src/components/agents/abstract-avatar.tsx
@@ -1,8 +1,11 @@
import Avatar from "boring-avatars";
-import { useBotLook } from "@/components/agents/bot-look";
+import { drawsBotMark, useBotLook } from "@/components/agents/bot-look";
import { BotOrb } from "@/components/agents/bot-orb";
-/** A Bot's avatar: its orb, or its face in a skin that has not opted in to orbs. */
+/**
+ * A Bot's avatar: its orb or its kite, or its face in a skin that has opted in to neither.
+ * `BotOrb` draws whichever mark the skin asks for.
+ */
export function AbstractAvatar({
name,
seed,
@@ -12,7 +15,7 @@ export function AbstractAvatar({
seed: string;
size?: number;
}) {
- if (useBotLook() === "orb") {
+ if (drawsBotMark(useBotLook())) {
return ;
}
diff --git a/app/src/components/agents/bot-look.tsx b/app/src/components/agents/bot-look.tsx
index 9d9c1c1259..b1902d4af8 100644
--- a/app/src/components/agents/bot-look.tsx
+++ b/app/src/components/agents/bot-look.tsx
@@ -1,12 +1,17 @@
import { createContext, useContext } from "react";
-/** How a Bot is drawn: as its orb, or as the generated face. */
-export type BotLook = "orb" | "face";
+/** How a Bot is drawn: as its orb, as its kite (the Kite Bot skin), or as the generated face. */
+export type BotLook = "orb" | "kite" | "face";
+
+/** Whether Bots are drawn as a mark of their own, an orb or a kite, rather than as faces. */
+export function drawsBotMark(look: BotLook): boolean {
+ return look !== "face";
+}
/*
* Set once, from the active skin's `botLook` (see `_authed.tsx`), so a component asks how to draw a
- * Bot rather than which skin is on. A skin opts in to orbs by setting `botLook: "orb"`; without a
- * provider, as in a component test, Bots are faces.
+ * Bot rather than which skin is on. A skin opts in to orbs by setting `botLook: "orb"`, or to kites
+ * with `botLook: "kite"`; without a provider, as in a component test, Bots are faces.
*/
const BotLookContext = createContext("face");
diff --git a/app/src/components/agents/bot-orb.tsx b/app/src/components/agents/bot-orb.tsx
index 30fadaa3b1..78ff09ff30 100644
--- a/app/src/components/agents/bot-orb.tsx
+++ b/app/src/components/agents/bot-orb.tsx
@@ -1,4 +1,6 @@
import type { CSSProperties } from "react";
+import { useBotLook } from "@/components/agents/bot-look";
+import { BotKite } from "@/components/agents/kite/bot-kite";
import AgentOrb from "@/components/agents/orb/agent-orb";
import { orbPalette } from "@/lib/orb-palette";
@@ -15,6 +17,9 @@ const STATIC_MAX_SIZE = 32;
* each run a blur and a backdrop filter on every frame. A larger orb, or one whose Bot is working,
* is the live `AgentOrb` drawing the same sphere, in the palette as it is in every state. Neither
* moves under reduced motion: `AgentOrb` honours it, and the still orb has nothing to move.
+ *
+ * Where Bots are kites (`useBotLook`, the Kite Bot skin), this draws the Bot's kite in its place, so
+ * every spot that draws a Bot's mark follows the skin.
*/
export function BotOrb({
seed,
@@ -27,6 +32,10 @@ export function BotOrb({
size?: number;
state?: "idle" | "working" | "waiting";
}) {
+ const look = useBotLook();
+ if (look === "kite") {
+ return ;
+ }
const colors = orbPalette(seed);
if (size <= STATIC_MAX_SIZE && state === "idle") {
diff --git a/app/src/components/agents/kite/bot-kite.tsx b/app/src/components/agents/kite/bot-kite.tsx
new file mode 100644
index 0000000000..6b189d6f6a
--- /dev/null
+++ b/app/src/components/agents/kite/bot-kite.tsx
@@ -0,0 +1,418 @@
+import { type CSSProperties, useId } from "react";
+import {
+ DETAIL_MIN_SIZE,
+ type Expression,
+ eyeCells,
+ FACE_MIN_SIZE,
+ facePoint,
+ KITE,
+ KITE_PATH,
+ KITE_STATUS,
+ kiteColor,
+ kiteTones,
+ type Point,
+ patternShapes,
+ pixelUnit,
+ STILL_MAX_SIZE,
+ sailPattern,
+ seeded,
+ statusPixel,
+ WEAVE_MIN_SIZE,
+} from "./kite";
+
+export type KiteState = "idle" | "working" | "waiting";
+
+/**
+ * A Bot drawn as a kite in its own colours: the colour its seed picks (the same slot as its orb) and a
+ * sail pattern of its own, in a lighter tone of that colour. The Kite Bot skin draws Bots this way.
+ *
+ * The face shows only at moments of contact. A kite drawn large enough to be what the page is about
+ * (48px and up, such as the top of a conversation) is awake: its pixels gather into a pair of eyes
+ * that look toward the text beside it. A smaller kite wakes on contact (`awake`): a row or tile
+ * pointed at, or the Bot you are with. Its eyes stand by rather than chase the pointer, now and then
+ * glancing a pixel aside and back. Every face blinks on the Bot's own schedule. A Bot waiting on the
+ * person looks straight out with taller eyes and shows an amber pixel, and a working Bot's face steps
+ * back while a blue pixel keeps time. Everywhere else a kite is a still, faceless shape, so twenty of
+ * them in a sidebar cost nothing.
+ *
+ * Under 22px there is no face, and at 32px and under the body never moves (a waiting Bot over 32px
+ * nudges every few seconds). Reduced motion stills everything (kite.css). The colours for both
+ * themes ride on the element, and kite.css picks one.
+ */
+export function BotKite({
+ seed,
+ name,
+ size = 32,
+ state = "idle",
+ awake = false,
+ look: gaze,
+}: {
+ seed: string;
+ name: string;
+ size?: number;
+ state?: KiteState;
+ /**
+ * Wakes an idle kite drawn under 48px, as one at the top of a conversation always is: its pixels
+ * gather into eyes that stand by. A tile or a row does this while the person points at it or
+ * focuses it, and a sidebar row while its Bot is the one on screen.
+ */
+ awake?: boolean;
+ /** Where its eyes look, in whole pixels. By default a waiting Bot looks out, any other toward the text. */
+ look?: Point;
+}) {
+ const id = useId().replace(/[^a-zA-Z0-9_-]/g, "");
+ const color = kiteColor(seed);
+ const pattern = sailPattern(seed);
+ const light = kiteTones(color, false);
+ const dark = kiteTones(color, true);
+ const detail = size >= DETAIL_MIN_SIZE;
+ const weave = size >= WEAVE_MIN_SIZE;
+ const expression: Expression | null =
+ size < FACE_MIN_SIZE
+ ? null
+ : state === "waiting"
+ ? "tall"
+ : state === "idle" && (detail || awake)
+ ? "open"
+ : null;
+ const look: Point = gaze ?? (state === "waiting" ? [0, 0] : [1, 0]);
+ const gap = expression && detail ? faceWindow(size, expression, look) : null;
+ const status = state === "idle" ? null : statusGeometry(size, state);
+ const style = {
+ "--kite-body": light.body,
+ "--kite-panel": light.panel,
+ "--kite-spar": light.spar,
+ "--kite-edge": light.edge,
+ "--kite-eye": light.eye,
+ "--kite-body-dark": dark.body,
+ "--kite-panel-dark": dark.panel,
+ "--kite-spar-dark": dark.spar,
+ "--kite-edge-dark": dark.edge,
+ "--kite-eye-dark": dark.eye,
+ // Every 3–7 s, on the Bot's own seed, so a team never blinks in unison.
+ "--kite-blink": `${(3 + 4 * seeded(seed, "blink")).toFixed(2)}s`,
+ "--kite-blink-delay": `${(-7 * seeded(seed, "phase")).toFixed(2)}s`,
+ // A small face's glance: every 6–10 s, one whole pixel, to a side the seed picks.
+ "--kite-glance": `${(6 + 4 * seeded(seed, "glance")).toFixed(2)}s`,
+ "--kite-glance-delay": `${(-10 * seeded(seed, "glance-phase")).toFixed(2)}s`,
+ // Unrounded, so the step lands on a whole screen pixel.
+ "--kite-glance-by": `${(seeded(seed, "glance-side") < 0.5 ? -1 : 1) * pixelUnit(size)}px`,
+ height: size,
+ width: size,
+ } as CSSProperties;
+
+ return (
+
+
+
+ );
+}
+
+/** The fine square weave of ripstop kite fabric. */
+function Weave({ id, size }: { id: string; size: number }) {
+ const step = size >= 140 ? 0.06 : 0.08;
+ return (
+
+
+
+ );
+}
+
+/**
+ * Where a face cell lands, in whole CSS pixels: the eyes are pixel art, so every edge sits on the
+ * screen's grid at any size.
+ */
+function cellBox(size: number, column: number, row: number) {
+ const pixel = Math.round(pixelUnit(size) * size);
+ const [fx, fy] = facePoint(size);
+ const left = Math.round((fx + 0.5) * size) + column * pixel - pixel / 2;
+ const top = Math.round((fy + 0.5) * size) + row * pixel - pixel / 2;
+ const snap = (v: number) => Math.round(v) / size - 0.5;
+ return {
+ x: snap(left),
+ y: snap(top),
+ width: pixel / size,
+ height: pixel / size,
+ };
+}
+
+/** The face's window: the eyes' bounds and a pixel and a half more on every side. */
+function faceWindow(size: number, expression: Expression, look: Point) {
+ const cells = eyeCells(expression, look);
+ const columns = cells.map((cell) => cell.column);
+ const rows = cells.map((cell) => cell.row);
+ const unit = pixelUnit(size);
+ const from = cellBox(size, Math.min(...columns), Math.min(...rows));
+ const to = cellBox(size, Math.max(...columns), Math.max(...rows));
+ return {
+ x: from.x - 1.5 * unit,
+ y: from.y - 1.5 * unit,
+ width: to.x + to.width - from.x + 3 * unit,
+ height: to.y + to.height - from.y + 3 * unit,
+ };
+}
+
+/**
+ * The pixel eyes. Each pixel flies in from a seeded spot within three pixels of its place, one after
+ * another, so the eyes gather rather than appear. The rows above the bottom one close to blink. On
+ * `standby` (a face drawn small) the pair glances a pixel aside now and then; a large face holds its
+ * look, since it looks at the words beside it.
+ */
+function PixelEyes({
+ expression,
+ look,
+ seed,
+ size,
+ standby,
+}: {
+ expression: Expression;
+ look: Point;
+ seed: string;
+ size: number;
+ standby: boolean;
+}) {
+ const unit = pixelUnit(size);
+ const cells = eyeCells(expression, look);
+ const eye = (cell: (typeof cells)[number], index: number) => {
+ const scatter = (salt: string) =>
+ ((seeded(seed, `${salt}${index}`) - 0.5) * unit * 6).toFixed(4);
+ return (
+
+ );
+ };
+ const lids = cells.filter((cell) => cell.lid);
+ const base = cells.filter((cell) => !cell.lid);
+ return (
+
+
+ {lids.map((cell) => eye(cell, cells.indexOf(cell)))}
+
+ {base.map((cell) => eye(cell, cells.indexOf(cell)))}
+
+ );
+}
+
+/**
+ * Status lives in a square pixel beside the body, never in it, in reserved colours. A ring around it
+ * is cut out of the body (`cut`, a mask in `BotKite`), so it reads on the sidebar, a card or the page.
+ */
+function statusGeometry(size: number, state: Exclude) {
+ const { half, ring } = statusPixel(size);
+ const [x, y] = KITE.dot;
+ return {
+ state,
+ size,
+ pixel: { x: x - half, y: y - half, width: 2 * half, height: 2 * half },
+ cut: {
+ x: x - half - ring,
+ y: y - half - ring,
+ width: 2 * (half + ring),
+ height: 2 * (half + ring),
+ },
+ };
+}
+
+function StatusPixel({
+ state,
+ size,
+ pixel,
+}: ReturnType) {
+ const color = KITE_STATUS[state];
+ return (
+
+ {state === "working" ? (
+
+ ) : null}
+
+
+ );
+}
diff --git a/app/src/components/agents/kite/kite-mark.tsx b/app/src/components/agents/kite/kite-mark.tsx
new file mode 100644
index 0000000000..5e61b9c091
--- /dev/null
+++ b/app/src/components/agents/kite/kite-mark.tsx
@@ -0,0 +1,53 @@
+import { useId } from "react";
+import { cn } from "@/lib/utils";
+import { KITE, KITE_PATH } from "./kite";
+
+/**
+ * OpenBot's own kite, as a mark: the Bots' silhouette in one solid ink, with its two spars cut out
+ * of it, so it reads as the product rather than as one more Bot. It takes the colour of the text
+ * around it, which is what lets a skin set it in black, white or anything else.
+ */
+export function KiteMark({
+ size = 20,
+ className,
+}: {
+ size?: number;
+ className?: string;
+}) {
+ const id = `${useId().replace(/[^a-zA-Z0-9_-]/g, "")}-spars`;
+ // The spars are cut a whole pixel wide wherever the mark is drawn, so they never blur away.
+ const spar = Math.max(1, Math.round(size * 0.055)) / size;
+ return (
+
+ );
+}
diff --git a/app/src/components/agents/kite/kite.css b/app/src/components/agents/kite/kite.css
new file mode 100644
index 0000000000..6b08cfae88
--- /dev/null
+++ b/app/src/components/agents/kite/kite.css
@@ -0,0 +1,148 @@
+/*
+ * A Bot drawn as a kite (bot-kite.tsx). Each kite carries its colours for both themes on its own
+ * element, and this picks the pair for the page it is on.
+ *
+ * Motion follows one curve, fast out with a long soft landing and no overshoot, and then holds
+ * still: the eyes gather once and blink now and then, a small face glances aside on standby, and
+ * only a waiting Bot repeats a gesture.
+ */
+.bot-kite {
+ --kb: var(--kite-body);
+ --kp: var(--kite-panel);
+ --ks: var(--kite-spar);
+ --ke: var(--kite-edge);
+ --kx: var(--kite-eye);
+}
+
+.dark .bot-kite {
+ --kb: var(--kite-body-dark);
+ --kp: var(--kite-panel-dark);
+ --ks: var(--kite-spar-dark);
+ --ke: var(--kite-edge-dark);
+ --kx: var(--kite-eye-dark);
+}
+
+/* Waking: each pixel flies in from its own spot, a little after the one before. */
+.bot-kite .bot-kite-eye {
+ transform-box: fill-box;
+ transform-origin: center;
+ animation: bot-kite-gather 385ms cubic-bezier(0.2, 0, 0, 1)
+ var(--gather-delay, 0ms) both;
+}
+
+@keyframes bot-kite-gather {
+ from {
+ opacity: 0;
+ transform: translate(var(--sx, 0), var(--sy, 0)) scale(0.78);
+ }
+}
+
+/* A blink: 70ms to close, a moment shut, 120ms to open, once a cycle of 3–7 seconds. */
+.bot-kite .bot-kite-lids {
+ animation: bot-kite-blink var(--kite-blink, 4.4s) linear
+ var(--kite-blink-delay, 0s) infinite;
+}
+
+@keyframes bot-kite-blink {
+ 0%,
+ 95% {
+ opacity: 1;
+ }
+ 96.4%,
+ 97.2% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
+
+/*
+ * Standby, for a face drawn small: once a cycle of 6–10 seconds the eyes step one whole pixel aside,
+ * rest there a beat and step back. They step rather than slide, as pixel art does.
+ */
+.bot-kite .bot-kite-glance {
+ animation: bot-kite-glance var(--kite-glance, 8s) linear
+ var(--kite-glance-delay, 0s) infinite;
+}
+
+@keyframes bot-kite-glance {
+ 0%,
+ 71.9%,
+ 86.1%,
+ 100% {
+ transform: translateX(0);
+ }
+ 72%,
+ 86% {
+ transform: translateX(var(--kite-glance-by, 0));
+ }
+}
+
+/* A Bot waiting on the person tugs at its line every 4.8 seconds. */
+.bot-kite .bot-kite-nudge {
+ animation: bot-kite-nudge 4.8s linear infinite;
+}
+
+@keyframes bot-kite-nudge {
+ 0%,
+ 9.2%,
+ 100% {
+ transform: translateY(0);
+ }
+ 2.5% {
+ transform: translateY(0.03px);
+ }
+}
+
+/* Working: a ring steps out from the blue pixel and fades, keeping time. */
+.bot-kite .bot-kite-pulse {
+ transform-box: fill-box;
+ transform-origin: center;
+ animation: bot-kite-pulse 1.4s cubic-bezier(0.2, 0, 0, 1) infinite;
+}
+
+@keyframes bot-kite-pulse {
+ from {
+ opacity: 0.55;
+ transform: scale(1);
+ }
+ to {
+ opacity: 0;
+ transform: scale(2.2);
+ }
+}
+
+/* Waiting: the amber pixel swells a little, every two seconds. */
+.bot-kite .bot-kite-beat {
+ transform-box: fill-box;
+ transform-origin: center;
+ animation: bot-kite-beat 2s cubic-bezier(0.2, 0, 0, 1) infinite;
+}
+
+@keyframes bot-kite-beat {
+ 0%,
+ 40%,
+ 100% {
+ transform: scale(1);
+ }
+ 20% {
+ transform: scale(1.18);
+ }
+}
+
+/* Reduced motion: each state's designed still. The working ring rests part way out, faint. */
+@media (prefers-reduced-motion: reduce) {
+ .bot-kite .bot-kite-eye,
+ .bot-kite .bot-kite-lids,
+ .bot-kite .bot-kite-glance,
+ .bot-kite .bot-kite-nudge,
+ .bot-kite .bot-kite-beat {
+ animation: none;
+ }
+ .bot-kite .bot-kite-pulse {
+ animation: none;
+ opacity: 0.35;
+ transform: scale(1.54);
+ }
+}
diff --git a/app/src/components/agents/kite/kite.ts b/app/src/components/agents/kite/kite.ts
new file mode 100644
index 0000000000..d2e33f830a
--- /dev/null
+++ b/app/src/components/agents/kite/kite.ts
@@ -0,0 +1,287 @@
+import { paletteSlot, seedHash } from "@/lib/orb-palette";
+
+/*
+ * Kite Bot: a Bot drawn as a kite, one silhouette for every Bot, each in colours of its own (a colour
+ * and a sail pattern). The Kite Bot skin draws Bots this way. Everything here is a pure function of the
+ * Bot's seed and the size it is drawn at, so a Bot is the same kite wherever it appears.
+ *
+ * Units: a Bot's slot is 1 × 1, centred on (0, 0), which is the drawing's viewBox.
+ */
+
+export type Point = readonly [number, number];
+
+/*
+ * The kite: upright and symmetrical, as wide as it is tall, with the cross spar 40% of the way down
+ * from the nose and crisp corners. The face sits in the kite's incircle, the circle touching all four
+ * edges, a fifth of its radius below the centre.
+ */
+function kite(height: number, cross: number) {
+ const top = -height / 2;
+ const half = height / 2;
+ const spar = cross * height;
+ const crossY = top + spar;
+ const upper = Math.hypot(half, spar);
+ const lower = Math.hypot(half, height - spar);
+ const centre = (height * upper) / (upper + lower);
+ const radius = (half * centre) / upper;
+ return {
+ width: height,
+ height,
+ nose: [0, top] as Point,
+ right: [half, crossY] as Point,
+ tail: [0, top + height] as Point,
+ left: [-half, crossY] as Point,
+ cross: [0, crossY] as Point,
+ face: [0, top + centre + 0.2 * radius] as Point,
+ /** Where the status pixel sits, beside the body and never on it. */
+ dot: [0.36, 0.34] as Point,
+ };
+}
+
+export const KITE = kite(0.9, 0.4);
+
+/** The kite's outline, as an SVG path. */
+export const KITE_PATH = `M${KITE.nose.join(" ")}L${KITE.right.join(" ")}L${KITE.tail.join(" ")}L${KITE.left.join(" ")}Z`;
+
+/*
+ * Eight colours from CopilotKit's brand, in the same slot order as `orb-palette.ts`, so a Bot is the
+ * same colour as a kite as it is as an orb. Each has a lifted twin for dark grounds, so all sixteen
+ * clear 3:1 against the page. Red, amber, green and blue are left for status.
+ */
+export const KITE_COLORS = [
+ { name: "mint", hex: "#189370", darkHex: "#2fb38b" },
+ { name: "violet", hex: "#6430ab", darkHex: "#9265dd" },
+ { name: "blue", hex: "#005dbb", darkHex: "#3d8ae6" },
+ { name: "teal", hex: "#0e7c86", darkHex: "#22a6b0" },
+ { name: "copper", hex: "#b4561a", darkHex: "#e07b3a" },
+ { name: "raspberry", hex: "#a8325e", darkHex: "#d75c86" },
+ { name: "plum", hex: "#7b2f7a", darkHex: "#b061ae" },
+ { name: "graphite", hex: "#2b2b2b", darkHex: "#e9e9ef" },
+] as const;
+
+export type KiteColor = (typeof KITE_COLORS)[number];
+
+/** Status colours, reserved: never a body's colour. */
+export const KITE_STATUS = {
+ working: "#2f6fed",
+ waiting: "#d99a06",
+} as const;
+
+/*
+ * The sail patterns, each painted in a lighter tone of the Bot's own colour. The quarters are the
+ * four panels the spars divide the sail into.
+ */
+export const KITE_PATTERNS = [
+ "solid",
+ "quarters",
+ "top",
+ "left",
+ "spine",
+ "bottom",
+ "band",
+ "cross-quarters",
+] as const;
+
+export type KitePattern = (typeof KITE_PATTERNS)[number];
+
+/** A Bot's colour, from the same slot as its orb. */
+export function kiteColor(seed: string): KiteColor {
+ return KITE_COLORS[paletteSlot(seed)];
+}
+
+/*
+ * The colour is the seed's hash modulo eight, its low three bits. FNV-1a's low bits depend only on
+ * the low bits before them, so a pattern taken the same way, even from the seed with something
+ * appended, would follow the colour: every violet Bot would wear the same pattern. This finaliser
+ * (MurmurHash3's) folds the high bits down into the low ones first.
+ */
+function scramble(hash: number): number {
+ let h = hash ^ (hash >>> 16);
+ h = Math.imul(h, 0x85ebca6b);
+ h ^= h >>> 13;
+ h = Math.imul(h, 0xc2b2ae35);
+ return (h ^ (h >>> 16)) >>> 0;
+}
+
+/**
+ * A Bot's sail pattern, from its seed, independent of its colour, so two Bots of one colour usually
+ * differ in pattern. No seed has no identity to keep, so it gets quarters, the pattern the kite was
+ * drawn with.
+ */
+export function sailPattern(seed: string): KitePattern {
+ if (!seed) return "quarters";
+ return KITE_PATTERNS[scramble(seedHash(seed)) % KITE_PATTERNS.length];
+}
+
+export type Shape =
+ | { kind: "polygon"; points: readonly Point[] }
+ | { kind: "rect"; x: number; y: number; width: number; height: number };
+
+/** The lighter panels of a pattern, to be clipped to the kite's outline. */
+export function patternShapes(pattern: KitePattern): Shape[] {
+ const { nose, right, tail, left, cross, width, height } = KITE;
+ const panel = {
+ topLeft: [nose, cross, left],
+ topRight: [nose, right, cross],
+ bottomLeft: [left, cross, tail],
+ bottomRight: [cross, right, tail],
+ } satisfies Record;
+ const panels: Partial> = {
+ quarters: ["topRight", "bottomLeft"],
+ "cross-quarters": ["topLeft", "bottomRight"],
+ top: ["topLeft", "topRight"],
+ bottom: ["bottomLeft", "bottomRight"],
+ left: ["topLeft", "bottomLeft"],
+ };
+ const chosen = panels[pattern];
+ if (chosen) {
+ return chosen.map((key) => ({ kind: "polygon", points: panel[key] }));
+ }
+ if (pattern === "spine") {
+ return [
+ {
+ kind: "rect",
+ x: -0.075 * width,
+ y: -height,
+ width: 0.15 * width,
+ height: 2 * height,
+ },
+ ];
+ }
+ if (pattern === "band") {
+ return [
+ {
+ kind: "rect",
+ x: -width,
+ y: cross[1] - 0.055 * height,
+ width: 2 * width,
+ height: 0.11 * height,
+ },
+ ];
+ }
+ return [];
+}
+
+const hexRgb = (hex: string) => {
+ const n = Number.parseInt(hex.slice(1), 16);
+ return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
+};
+
+/** `a` moved toward `b` by `t`, as a hex colour. */
+export function mix(a: string, b: string, t: number): string {
+ const from = hexRgb(a);
+ const to = hexRgb(b);
+ return `#${from
+ .map((v, i) =>
+ Math.round(v + (to[i] - v) * t)
+ .toString(16)
+ .padStart(2, "0"),
+ )
+ .join("")}`;
+}
+
+function rgba(hex: string, alpha: number) {
+ const [r, g, b] = hexRgb(hex);
+ return `rgba(${r},${g},${b},${alpha})`;
+}
+
+function luminance(hex: string) {
+ const [r, g, b] = hexRgb(hex).map((v) => {
+ const c = v / 255;
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
+ });
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
+}
+
+export type KiteTones = {
+ body: string;
+ panel: string;
+ spar: string;
+ edge: string;
+ /** Solid, so the eyes read the same on a light page or a dark one. */
+ eye: string;
+};
+
+/** The colours a kite is painted in, on a light page or a dark one. */
+export function kiteTones(color: KiteColor, dark: boolean): KiteTones {
+ const body = dark ? color.darkHex : color.hex;
+ const graphite = color.name === "graphite";
+ const panel =
+ graphite && dark
+ ? mix(body, "#000000", 0.14)
+ : mix(body, "#ffffff", graphite ? 0.16 : 0.2);
+ return {
+ body,
+ panel,
+ spar: rgba(mix(body, "#000000", 0.38), 0.55),
+ edge: rgba(mix(body, "#000000", 0.3), 0.35),
+ // White eyes on most bodies; near-black on a light one, such as graphite on a dark page.
+ eye: luminance(body) > 0.45 ? "#121216" : "#ffffff",
+ };
+}
+
+/** The smallest a kite has a face at all: below it, a status pixel carries the state alone. */
+export const FACE_MIN_SIZE = 22;
+/** The smallest a kite is drawn with its spars and the light across its sail. */
+export const DETAIL_MIN_SIZE = 48;
+/** The smallest a kite is drawn with the fine square weave of ripstop. */
+export const WEAVE_MIN_SIZE = 64;
+/** At this size and under, the body never moves: only the status pixel does. */
+export const STILL_MAX_SIZE = 32;
+
+/** One pixel of the face, in the drawing's units, for a kite drawn `size` CSS pixels wide. */
+export function pixelUnit(size: number): number {
+ return Math.max(1, Math.round(size * 0.055)) / size;
+}
+
+/** `v` (in the drawing's units) moved onto the CSS pixel grid of a kite `size` pixels wide. */
+function onGrid(v: number, size: number) {
+ return Math.round((v + 0.5) * size) / size - 0.5;
+}
+
+export type Expression = "open" | "tall";
+
+/**
+ * The pixel eyes: two blocks, two pixels wide and three tall, a pixel's gap either side of the
+ * centre column; four tall while the Bot waits on the person. `look` moves both by whole pixels.
+ * Each cell carries its row before the look moved it, so the rows above the bottom one can close.
+ */
+export function eyeCells(
+ expression: Expression,
+ look: Point = [0, 0],
+): { column: number; row: number; lid: boolean }[] {
+ const rows = expression === "tall" ? [-2, -1, 0, 1] : [-1, 0, 1];
+ const cells: { column: number; row: number; lid: boolean }[] = [];
+ for (const column of [-3, -2, 2, 3]) {
+ for (const row of rows) {
+ cells.push({
+ column: column + look[0],
+ row: row + look[1],
+ lid: row < 1,
+ });
+ }
+ }
+ return cells;
+}
+
+/** Where the face is drawn: a pixel above the incircle's centre, on the pixel grid. */
+export function facePoint(size: number): Point {
+ const unit = pixelUnit(size);
+ return [onGrid(KITE.face[0], size), onGrid(KITE.face[1] - unit, size)];
+}
+
+/** The status pixel: its half-width, and the ring of page colour that cuts it out of the body. */
+export function statusPixel(size: number) {
+ return {
+ half: Math.min(12, Math.max(2.5, size * 0.075)) / size,
+ ring: Math.max(1.3, size * 0.026) / size,
+ };
+}
+
+/**
+ * A number in [0, 1) from a seed and a salt, for the details that vary per Bot: where each eye pixel
+ * flies in from, and how often it blinks, so a team never blinks in unison.
+ */
+export function seeded(seed: string, salt: string): number {
+ return seedHash(`${seed}:${salt}`) / 2 ** 32;
+}
diff --git a/app/src/components/app-sidebar/app-sidebar.tsx b/app/src/components/app-sidebar/app-sidebar.tsx
index 53426f45bf..0562666ca6 100644
--- a/app/src/components/app-sidebar/app-sidebar.tsx
+++ b/app/src/components/app-sidebar/app-sidebar.tsx
@@ -61,6 +61,7 @@ import {
type MessageListEmphasis,
useMessageListEmphasis,
} from "@/lib/settings/message-list";
+import { cn } from "@/lib/utils";
import { BotsNavBadge } from "../bot-profile/attention";
import {
RecordingDot,
@@ -374,10 +375,13 @@ function usePointerRestingSinceNavigation(): boolean {
function PrimaryNavItem({
item,
tooltip,
+ compact = false,
children,
}: {
item: NavigationLink;
tooltip?: React.ComponentProps["tooltip"];
+ /** A 32px row with its icon in a 22px slot, for a sidebar whose own rows are that shape. */
+ compact?: boolean;
children?: React.ReactNode;
}) {
return (
@@ -385,7 +389,10 @@ function PrimaryNavItem({
(
-
+
- {item.label}
+
+ {item.label}
+
{children}
@@ -409,10 +423,17 @@ function PrimaryNavItem({
* The Skills entry. While any of the person's Recorders records, it carries a red dot named for the recording, and a
* tooltip saying the same, as the Teach a Bot entry once did. Nothing extra otherwise.
*/
-function SkillsNavItem({ item }: { item: NavigationLink }) {
+function SkillsNavItem({
+ item,
+ compact,
+}: {
+ item: NavigationLink;
+ compact?: boolean;
+}) {
const recording = useLiveRecording();
return (
@@ -421,8 +442,18 @@ function SkillsNavItem({ item }: { item: NavigationLink }) {
);
}
-export function AppSidebar({ ...props }: React.ComponentProps) {
- const emphasis = useMessageListEmphasis();
+/**
+ * The sidebar's foot: the main destinations (`lib/navigation.ts`) and the person's account menu,
+ * with the organizations they can switch to and the way out. Exported so a skin that draws its own
+ * sidebar keeps the same destinations, the same Bots badge and the same menu, rather than a copy
+ * that drifts.
+ */
+export function AppSidebarFooter({
+ compact = false,
+}: {
+ /** Its destinations as 32px rows, for a sidebar whose own rows are that size. */
+ compact?: boolean;
+} = {}) {
const signOut = useSignOut();
const signOutOffered = useSignOutOffered();
// Where OpenBot lists no organizations, the menu has none at all.
@@ -430,6 +461,90 @@ export function AppSidebar({ ...props }: React.ComponentProps) {
const invitationsWaiting = useWaitingInvitationCount();
const switchOrganization = useSwitchOrganization();
const pointerResting = usePointerRestingSinceNavigation();
+ const navigation = useNavigationItems();
+ const { setOpenMobile } = useSidebar();
+ return (
+
+
+ {navigation
+ .filter(isNavigationLink)
+ .filter((item) => item.section === "primary")
+ .map((item) =>
+ // Skills says when a recording is live: teaching a Bot a task is how a skill is recorded.
+ item.id === "skills" ? (
+
+ ) : (
+
+ {/* What waits on you across every Bot; Bots lists them first. */}
+ {item.id === "bots" ? : null}
+
+ ),
+ )}
+
+
+
+ {organizationChoices ? (
+ {
+ // A narrow window's sheet would wait behind the dialog.
+ setOpenMobile(false);
+ openNewOrganization();
+ }}
+ switching={switchOrganization}
+ />
+ ) : null}
+ {navigation
+ .filter((item) => item.section === "account")
+ .map((item) => (
+ setOpenMobile(false) }
+ : {},
+ )}
+ >
+
+ {item.label}
+
+ ))}
+ {signOutOffered ? (
+
+
+ Sign out
+
+ ) : null}
+
+
+
+
+
+ );
+}
+
+export function AppSidebar({ ...props }: React.ComponentProps) {
+ const emphasis = useMessageListEmphasis();
const channels = useInfiniteQuery(channelListQueryOptions());
// One socket for the app, opened where the roster is kept live.
useChannelEvents();
@@ -461,7 +576,6 @@ export function AppSidebar({ ...props }: React.ComponentProps) {
}, [searching]);
const visibleChannels = pinnedFirst(channels.data ?? []);
const animateOrder = (channels.data?.length ?? 0) <= MAX_ANIMATED_ROWS;
- const navigation = useNavigationItems();
const { setOpenMobile } = useSidebar();
// Opened with Cmd/Ctrl+K over the phone sidebar, the menu closes it before it navigates.
useBeforeCommandNavigate(() => setOpenMobile(false));
@@ -584,82 +698,7 @@ export function AppSidebar({ ...props }: React.ComponentProps) {
-
-
- {navigation
- .filter(isNavigationLink)
- .filter((item) => item.section === "primary")
- .map((item) =>
- // Skills says when a recording is live: teaching a Bot a task is how a skill is recorded.
- item.id === "skills" ? (
-
- ) : (
-
- {/* What waits on you across every Bot; Bots lists them first. */}
- {item.id === "bots" ? : null}
-
- ),
- )}
-
-
-
- {organizationChoices ? (
- {
- // A narrow window's sheet would wait behind the dialog.
- setOpenMobile(false);
- openNewOrganization();
- }}
- switching={switchOrganization}
- />
- ) : null}
- {navigation
- .filter((item) => item.section === "account")
- .map((item) => (
- setOpenMobile(false) }
- : {},
- )}
- >
-
- {item.label}
-
- ))}
- {signOutOffered ? (
-
-
- Sign out
-
- ) : null}
-
-
-
-
-
+
);
diff --git a/app/src/components/app-sidebar/channel.tsx b/app/src/components/app-sidebar/channel.tsx
index e671543c4e..72cca73184 100644
--- a/app/src/components/app-sidebar/channel.tsx
+++ b/app/src/components/app-sidebar/channel.tsx
@@ -6,7 +6,7 @@ import {
} from "@tabler/icons-react";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { Link, useNavigate, useParams } from "@tanstack/react-router";
-import { memo, useState } from "react";
+import { memo, type ReactNode, useState } from "react";
import { DeleteConversationDialog } from "@/components/channels/delete-conversation-dialog";
import { RenameConversationDialog } from "@/components/channels/rename-conversation-dialog";
import {
@@ -24,9 +24,7 @@ import { ChannelItemContent } from "./channel-item-content";
* Memoized roster row. `use-channel-events` preserves unchanged row identity, and
* `content-visibility` keeps off-screen rows cheap without virtualization.
*
- * Right-click opens Pin, Rename and Delete. Rename is offered only to the person who started the
- * conversation, which is who the server lets rename it. Deleting is confirmed in a dialog that
- * names the channel, because the row it was invoked on is one of several identical-looking rows.
+ * Right-click opens Pin, Rename and Delete (`ConversationMenu`).
*/
export const Channel = memo(function Channel({
channelId,
@@ -56,8 +54,6 @@ export const Channel = memo(function Channel({
busy: boolean;
emphasis: MessageListEmphasis;
}) {
- const queryClient = useQueryClient();
- const navigate = useNavigate();
// Whether this row's channel is the one on screen, as a boolean, so navigating between
// channels re-renders the two rows whose answer changed rather than the whole roster.
const isOpen = useParams({
@@ -68,6 +64,69 @@ export const Channel = memo(function Channel({
/* Types in only on arrival; an already-named row draws it outright. */
const revealed = useTypedReveal(summary);
const threadTitle = revealed.text || untitled || "New conversation";
+ return (
+
+ 1
+ ? "/group/$channelId"
+ : "/channel/$channelId"
+ }
+ params={{ channelId }}
+ type="button"
+ className="flex flex-row py-2 px-2.5 gap-2 items-center w-full hover:bg-foreground/5 rounded-lg [contain-intrinsic-size:auto_3.25rem] [content-visibility:auto]"
+ activeProps={{
+ className: "bg-foreground/5",
+ }}
+ >
+
+
+
+ );
+});
+
+/**
+ * A conversation's right-click menu around whatever row draws it: Pin, Rename (offered only to the
+ * person who started it, which is who the server lets rename it) and Delete, confirmed in a dialog
+ * that names the conversation. Exported so a skin's own roster offers the same three things.
+ */
+export function ConversationMenu({
+ channelId,
+ pinned,
+ canRename,
+ title,
+ open,
+ children,
+}: {
+ channelId: string;
+ pinned: boolean;
+ canRename: boolean;
+ /** What the dialogs call the conversation. */
+ title: string;
+ /** Whether the conversation is the one on screen, which Delete leaves first. */
+ open: boolean;
+ children: ReactNode;
+}) {
+ const queryClient = useQueryClient();
+ const navigate = useNavigate();
const setPinned = useMutation(setChannelPinnedMutationOptions(queryClient));
const [confirming, setConfirming] = useState(false);
const [renaming, setRenaming] = useState(false);
@@ -84,35 +143,7 @@ export const Channel = memo(function Channel({
return (
<>
-
- 1
- ? "/group/$channelId"
- : "/channel/$channelId"
- }
- params={{ channelId }}
- type="button"
- className="flex flex-row py-2 px-2.5 gap-2 items-center w-full hover:bg-foreground/5 rounded-lg [contain-intrinsic-size:auto_3.25rem] [content-visibility:auto]"
- activeProps={{
- className: "bg-foreground/5",
- }}
- >
-
-
-
+ {children} {
@@ -150,16 +181,16 @@ export const Channel = memo(function Channel({
channelId={channelId}
onOpenChange={setRenaming}
open={renaming}
- title={summary || untitled || ""}
+ title={title}
/>
navigate({ to: "/" }) : undefined}
+ leave={open ? () => navigate({ to: "/" }) : undefined}
onOpenChange={setConfirming}
open={confirming}
- title={summary || untitled || ""}
+ title={title}
/>
>
);
-});
+}
diff --git a/app/src/components/channels/avatar.tsx b/app/src/components/channels/avatar.tsx
index 1d9549c621..e6021f3f8e 100644
--- a/app/src/components/channels/avatar.tsx
+++ b/app/src/components/channels/avatar.tsx
@@ -1,7 +1,7 @@
import { useQuery } from "@tanstack/react-query";
import Avatar from "boring-avatars";
import { memo, type ReactNode } from "react";
-import { useBotLook } from "@/components/agents/bot-look";
+import { drawsBotMark, useBotLook } from "@/components/agents/bot-look";
import { BotOrb } from "@/components/agents/bot-orb";
import { agentListQueryOptions } from "@/lib/agents/queries";
import { cn } from "@/lib/utils";
@@ -16,10 +16,10 @@ import { cn } from "@/lib/utils";
* `typing` overlays a working indicator at the bottom-right — three bouncing dots, so a channel
* whose agent is mid-turn reads as busy from the roster without moving the row's layout.
*
- * Where Bots are orbs (`useBotLook`), each is drawn from its `avatarSeed`, as `AbstractAvatar`
- * draws it, so a Bot is one color everywhere; a skin that has not opted in keeps the faces. The orbs
- * are hidden from screen readers: the row beside the avatar names the conversation, and an id read
- * aloud would name nothing.
+ * Where Bots are orbs or kites (`useBotLook`), each is drawn from its `avatarSeed`, as
+ * `AbstractAvatar` draws it, so a Bot is one color everywhere; a skin that has not opted in keeps the
+ * faces. The orbs and kites are hidden from screen readers: the row beside the avatar names the
+ * conversation, and an id read aloud would name nothing.
*/
export const ChannelAvatar = memo(function ChannelAvatar({
participantIds,
@@ -30,7 +30,8 @@ export const ChannelAvatar = memo(function ChannelAvatar({
size?: number;
typing?: boolean;
}) {
- const orbs = useBotLook() === "orb";
+ const look = useBotLook();
+ const orbs = drawsBotMark(look);
const face = orbs ? orbFace : boringFace;
const avatar =
participantIds.length === 1 ? (
@@ -38,7 +39,15 @@ export const ChannelAvatar = memo(function ChannelAvatar({
) : (
@@ -74,6 +83,8 @@ const LAYOUTS = {
type Layout = {
diameter: number;
at: readonly (readonly [number, number])[];
+ /** Whether a face is cut out where a later one covers it. Faces that never overlap need no cut. */
+ overlaps?: boolean;
};
/** The orbs' group: the first two Bots side by side, overlapping by a third of an orb. */
@@ -85,6 +96,19 @@ const ORB_PAIR: Layout = {
],
};
+/**
+ * The kites' group: the first two Bots flying at different heights, clear of each other. A circle
+ * cut out of a diamond leaves a broken kite, so kites are spaced so that nothing covers them.
+ */
+const KITE_PAIR: Layout = {
+ diameter: 0.56,
+ at: [
+ [0, 0.1],
+ [0.44, 0.34],
+ ],
+ overlaps: false,
+};
+
function boringFace(id: string, size: number) {
return ;
}
@@ -133,7 +157,8 @@ function GroupFaces({
return (
{shown.map((id, i) => {
- const cuts = at.slice(i + 1).map(([x, y]) => {
+ const covering = layout.overlaps === false ? [] : at.slice(i + 1);
+ const cuts = covering.map(([x, y]) => {
const cx = x - at[i][0] + diameter / 2;
const cy = y - at[i][1] + diameter / 2;
const r = diameter / 2 + gap;
diff --git a/app/src/components/channels/conversation-view.tsx b/app/src/components/channels/conversation-view.tsx
index 6d5aec840b..b1581dbde0 100644
--- a/app/src/components/channels/conversation-view.tsx
+++ b/app/src/components/channels/conversation-view.tsx
@@ -9,7 +9,7 @@ import {
useRef,
useState,
} from "react";
-import { useBotLook } from "@/components/agents/bot-look";
+import { drawsBotMark, useBotLook } from "@/components/agents/bot-look";
import {
ChatTranscript,
skillLabels,
@@ -126,7 +126,7 @@ export function ConversationView({
restoring?: boolean;
/**
* The top of the conversation, drawn above the first message and scrolled away with it. Only
- * where Bots are orbs (`useBotLook`); elsewhere the transcript starts at its first message.
+ * where Bots are orbs or kites (`useBotLook`); elsewhere the transcript starts at its first message.
*/
intro?: ReactNode;
/**
@@ -153,7 +153,7 @@ export function ConversationView({
* See `composer/queue.ts` for what this state is worth: it is memory in one tab, it does not
* survive a reload, and it is not an outbox.
*/
- const orbs = useBotLook() === "orb";
+ const orbs = drawsBotMark(useBotLook());
const [queued, setQueued] = useState([]);
const queuedRef = useRef(queued);
diff --git a/app/src/components/theme-provider.tsx b/app/src/components/theme-provider.tsx
index cf25e657dc..a1c40f23b4 100644
--- a/app/src/components/theme-provider.tsx
+++ b/app/src/components/theme-provider.tsx
@@ -3,6 +3,7 @@ import {
type ReactNode,
useContext,
useEffect,
+ useRef,
useState,
useSyncExternalStore,
} from "react";
@@ -14,6 +15,7 @@ import {
THEME_STORAGE_KEY,
type ThemePreference,
} from "@/lib/theme";
+import { crossFade } from "@/lib/view-transition";
type ThemeContextValue = {
/** What the person chose: the system's light or dark, or one of their own. */
@@ -42,19 +44,28 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
);
const systemDark = useSyncExternalStore(subscribeToSystemDark, systemIsDark);
+ /*
+ * The first theme is drawn as the page loads; every change after it cross-fades the whole app from
+ * one theme to the other, rather than each colour snapping on its own.
+ */
+ const drawn = useRef(false);
useEffect(() => {
- applyTheme(theme, systemDark, {
- setStoredValue: (key, value) => window.localStorage.setItem(key, value),
- removeStoredValue: (key) => window.localStorage.removeItem(key),
- toggleRootClass: (name, force) =>
- document.documentElement.classList.toggle(name, force),
- setRootColorScheme: (scheme) => {
- document.documentElement.style.colorScheme = scheme;
- },
- setRootChoice: (preference) => {
- document.documentElement.dataset.themeChoice = preference;
- },
- });
+ const apply = () =>
+ applyTheme(theme, systemDark, {
+ setStoredValue: (key, value) => window.localStorage.setItem(key, value),
+ removeStoredValue: (key) => window.localStorage.removeItem(key),
+ toggleRootClass: (name, force) =>
+ document.documentElement.classList.toggle(name, force),
+ setRootColorScheme: (scheme) => {
+ document.documentElement.style.colorScheme = scheme;
+ },
+ setRootChoice: (preference) => {
+ document.documentElement.dataset.themeChoice = preference;
+ },
+ });
+ if (drawn.current) crossFade(apply);
+ else apply();
+ drawn.current = true;
}, [theme, systemDark]);
return (
diff --git a/app/src/lib/api/generated/model/skinId.ts b/app/src/lib/api/generated/model/skinId.ts
index 24eea9fd19..29cf7004fd 100644
--- a/app/src/lib/api/generated/model/skinId.ts
+++ b/app/src/lib/api/generated/model/skinId.ts
@@ -12,4 +12,5 @@ export const SkinId = {
openduet: "openduet",
opendots: "opendots",
openfuse: "openfuse",
+ kitebot: "kitebot",
} as const;
diff --git a/app/src/lib/api/generated/people/people.zod.ts b/app/src/lib/api/generated/people/people.zod.ts
index dba8244a78..519e397052 100644
--- a/app/src/lib/api/generated/people/people.zod.ts
+++ b/app/src/lib/api/generated/people/people.zod.ts
@@ -919,7 +919,7 @@ export const GetPreferencesResponse = zod
"Whether they narrate their recordings in OpenBot's browser, which opens the microphone only when on. Null until they choose, which the browser asks before their first recording.",
),
skin: zod
- .enum(["openbot", "openduet", "opendots", "openfuse"])
+ .enum(["openbot", "openduet", "opendots", "openfuse", "kitebot"])
.describe(
"How OpenBot looks. openbot is OpenBot as it is without a skin.",
),
@@ -988,7 +988,7 @@ export const UpdatePreferencesBody = zod
selfHostBannerDismissed: zod.boolean().optional(),
narration: zod.enum(["on", "off"]).optional(),
skin: zod
- .enum(["openbot", "openduet", "opendots", "openfuse"])
+ .enum(["openbot", "openduet", "opendots", "openfuse", "kitebot"])
.optional()
.describe(
"How OpenBot looks. openbot is OpenBot as it is without a skin.",
@@ -1017,7 +1017,7 @@ export const UpdatePreferencesResponse = zod
"Whether they narrate their recordings in OpenBot's browser, which opens the microphone only when on. Null until they choose, which the browser asks before their first recording.",
),
skin: zod
- .enum(["openbot", "openduet", "opendots", "openfuse"])
+ .enum(["openbot", "openduet", "opendots", "openfuse", "kitebot"])
.describe(
"How OpenBot looks. openbot is OpenBot as it is without a skin.",
),
diff --git a/app/src/lib/orb-palette.ts b/app/src/lib/orb-palette.ts
index bacf1aa48b..7eed236fff 100644
--- a/app/src/lib/orb-palette.ts
+++ b/app/src/lib/orb-palette.ts
@@ -32,18 +32,29 @@ export const ORB_PALETTES: readonly OrbColors[] = [
const FNV_OFFSET = 0x811c9dc5;
const FNV_PRIME = 0x01000193;
-/**
- * A Bot's palette, from its seed (`avatarSeed`, the Bot's id unless set). Never from its name, so
- * renaming a Bot keeps its color. A 32-bit FNV-1a hash spreads similar ids across the eight.
- */
-export function orbPalette(seed: string): OrbColors {
- // No seed has no identity to keep, so it gets the first palette rather than whatever the hash of
- // nothing happens to land on.
- if (!seed) return ORB_PALETTES[0];
+/** A 32-bit FNV-1a hash of a seed, which spreads similar ids apart. */
+export function seedHash(seed: string): number {
let hash = FNV_OFFSET;
for (let i = 0; i < seed.length; i++) {
hash ^= seed.charCodeAt(i);
hash = Math.imul(hash, FNV_PRIME);
}
- return ORB_PALETTES[(hash >>> 0) % ORB_PALETTES.length];
+ return hash >>> 0;
+}
+
+/**
+ * Which of the eight colours a Bot is, from its seed (`avatarSeed`, the Bot's id unless set). Never
+ * from its name, so renaming a Bot keeps its color. The orb and the Kite Bot kite both read this one
+ * slot, so a Bot keeps its colour whichever way a skin draws it.
+ */
+export function paletteSlot(seed: string): number {
+ // No seed has no identity to keep, so it gets the first slot rather than whatever the hash of
+ // nothing happens to land on.
+ if (!seed) return 0;
+ return seedHash(seed) % ORB_PALETTES.length;
+}
+
+/** A Bot's orb palette, from its seed (`paletteSlot`). */
+export function orbPalette(seed: string): OrbColors {
+ return ORB_PALETTES[paletteSlot(seed)];
}
diff --git a/app/src/lib/settings/message-list.ts b/app/src/lib/settings/message-list.ts
index e0f0e82f89..f656051fb4 100644
--- a/app/src/lib/settings/message-list.ts
+++ b/app/src/lib/settings/message-list.ts
@@ -12,6 +12,7 @@ import {
} from "@/lib/api/generated/people/people";
import { idempotencyKey, organizationId } from "@/lib/api/request";
import { currentUserQueryOptions } from "@/lib/auth/queries";
+import { crossFade } from "@/lib/view-transition";
import { getSkinId, setSkin } from "@/skins/store";
import { settingsKeys } from "./queries";
@@ -140,7 +141,8 @@ export function saveSkinMutationOptions(
},
onMutate: async (skin) => {
const previousSkin = getSkinId();
- setSkin(skin);
+ // A new skin is a new frame around every page: it cross-fades in rather than snapping.
+ crossFade(() => setSkin(skin));
await queryClient.cancelQueries({ queryKey });
const previous = queryClient.getQueryData(queryKey);
if (previous) queryClient.setQueryData(queryKey, { ...previous, skin });
diff --git a/app/src/lib/view-transition.ts b/app/src/lib/view-transition.ts
new file mode 100644
index 0000000000..c7e6337f49
--- /dev/null
+++ b/app/src/lib/view-transition.ts
@@ -0,0 +1,51 @@
+import { flushSync } from "react-dom";
+
+/*
+ * Changes that redraw a lot at once, done as one movement instead of a snap, with the browser's view
+ * transitions: it takes a picture of the page, the change happens under it, and the picture gives
+ * way to the new page (the curves are in styles.css). Where the browser has no view transitions, or
+ * the person asked their system for less motion, the change simply happens, as it always did.
+ */
+
+/** Whether the person asked their system for less motion. */
+export function prefersReducedMotion(): boolean {
+ return (
+ typeof window !== "undefined" &&
+ window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true
+ );
+}
+
+/**
+ * Runs `change`, which redraws the whole app (the theme, the skin), as one cross-fade from the old
+ * look to the new. React's updates inside it are flushed before the new picture is taken.
+ */
+export function crossFade(change: () => void): void {
+ if (
+ typeof document === "undefined" ||
+ typeof document.startViewTransition !== "function" ||
+ prefersReducedMotion()
+ ) {
+ change();
+ return;
+ }
+ document.startViewTransition(() => {
+ flushSync(change);
+ });
+}
+
+/**
+ * Which page changes the router draws as a transition: going to another page, never the first page
+ * drawn, a change to the address's options alone (a pane opening over the same page has its own
+ * motion), or anything for somebody who asked for less motion. The type names the transition, so
+ * styles.css can give a page change its own curve.
+ */
+export function pageTransitionTypes({
+ fromLocation,
+ pathChanged,
+}: {
+ fromLocation?: unknown;
+ pathChanged: boolean;
+}): string[] | false {
+ if (!fromLocation || !pathChanged || prefersReducedMotion()) return false;
+ return ["page"];
+}
diff --git a/app/src/router.tsx b/app/src/router.tsx
index 3e30e90268..06cb13bc54 100644
--- a/app/src/router.tsx
+++ b/app/src/router.tsx
@@ -1,6 +1,7 @@
import { createRouter } from "@tanstack/react-router";
import { ReportedErrorComponent } from "./lib/error-reporting";
import { parseSearchText } from "./lib/search-text";
+import { pageTransitionTypes } from "./lib/view-transition";
import type { RouterContext } from "./router-context";
import { routeTree } from "./routeTree.gen";
@@ -15,6 +16,8 @@ export const router = createRouter({
parseSearch: parseSearchText,
// The router's own error screen, which also tells OpenBot what it caught (lib/error-reporting.tsx).
defaultErrorComponent: ReportedErrorComponent,
+ // Going to another page cross-fades the page instead of swapping it (lib/view-transition.ts).
+ defaultViewTransition: { types: pageTransitionTypes },
});
declare module "@tanstack/react-router" {
diff --git a/app/src/routes/_authed/_app/index.tsx b/app/src/routes/_authed/_app/index.tsx
index 24405b6299..3f2c0ac197 100644
--- a/app/src/routes/_authed/_app/index.tsx
+++ b/app/src/routes/_authed/_app/index.tsx
@@ -59,6 +59,7 @@ import { newId } from "@/lib/new-id";
import { takeInvitationLink } from "@/lib/organizations/invitation-link";
import { useAnyBotSkillCommands } from "@/lib/plugins/skill-commands";
import { queryClient } from "@/query-client";
+import { useActiveSkin } from "@/skins/registry";
/** How many Bots the home page shows before pointing to the rest. Two rows of two. */
const EXPLORE_SHOWN = 4;
@@ -109,6 +110,8 @@ export const Route = createFileRoute("/_authed/_app/")({
});
function RouteComponent() {
+ // A skin may draw its own section under the composer in place of Explore Bots.
+ const { home: SkinHome } = useActiveSkin();
const { data: user } = useQuery(currentUserQueryOptions());
const channels = useInfiniteQuery(channelListQueryOptions());
const {
@@ -385,79 +388,84 @@ function RouteComponent() {
* composer, not the place to browse: more than four would push the composer up every time
* somebody shared another Bot, so the rest are one "All Bots" away. Every state below
* reserves the same two rows, so the composer above it does not move when the list settles.
+ * A skin may draw its own section here instead (`Skin.home`).
*/}
-
- {loading || capabilities.isPending ? (
- <>
-
Explore Bots
-
- >
- ) : explore?.length ? (
- // Wins over `failed`: a failed background refetch does not clear TanStack Query's
- // cached `data`, so a stale list here beats an error card claiming there is
- // nothing to explore, which would be false while this list is still populated.
-
-
-
- Explore Bots
-
- {explore.length > EXPLORE_SHOWN ? (
-
+ ) : (
+
+ {loading || capabilities.isPending ? (
+ <>
+
Explore Bots
+
+ >
+ ) : explore?.length ? (
+ // Wins over `failed`: a failed background refetch does not clear TanStack Query's
+ // cached `data`, so a stale list here beats an error card claiming there is
+ // nothing to explore, which would be false while this list is still populated.
+
+
-
- ) : personal ? null : failed && agents === undefined ? (
- // `agents === undefined` narrows this to "the query has never once returned
- // successfully" — not merely "the last request errored". `?.length` alone can't
- // tell that apart from a slice that loaded and is genuinely empty: TanStack Query
- // never clears `data` on a failed background refetch, so once the query has
- // resolved even one response, `agents` stays defined and `explore`'s emptiness is a
- // fact about that response, not a symptom of the failure. Rendering the destructive
- // card there would say the opposite of what a populated composer beside it (still
- // working off that same, successfully loaded `agents`) proves.
- <>
-
Explore Bots
-
-
-
- Couldn't load the Bots shared with you.
-
-
-
- >
- ) : (
- // Reached both when the query never failed and `explore` is genuinely empty, and
- // when it failed but `agents` is defined — a loaded, empty slice either way. Same
- // plain copy for both: an empty roster is a fact, not an error.
- <>
-
Explore Bots
-
-
-
- Nobody has shared a Bot with you yet.
-
-
-
- >
- )}
-
+
+ ) : personal ? null : failed && agents === undefined ? (
+ // `agents === undefined` narrows this to "the query has never once returned
+ // successfully" — not merely "the last request errored". `?.length` alone can't
+ // tell that apart from a slice that loaded and is genuinely empty: TanStack Query
+ // never clears `data` on a failed background refetch, so once the query has
+ // resolved even one response, `agents` stays defined and `explore`'s emptiness is a
+ // fact about that response, not a symptom of the failure. Rendering the destructive
+ // card there would say the opposite of what a populated composer beside it (still
+ // working off that same, successfully loaded `agents`) proves.
+ <>
+
Explore Bots
+
+
+
+ Couldn't load the Bots shared with you.
+
+
+
+ >
+ ) : (
+ // Reached both when the query never failed and `explore` is genuinely empty, and
+ // when it failed but `agents` is defined — a loaded, empty slice either way. Same
+ // plain copy for both: an empty roster is a fact, not an error.
+ <>
+
Explore Bots
+
+
+
+ Nobody has shared a Bot with you yet.
+
+
+
+ >
+ )}
+
+ )}
{/* A Bot already working somewhere, and the way to it. Nothing while every Bot is idle. */}
diff --git a/app/src/skins/kitebot/frame.tsx b/app/src/skins/kitebot/frame.tsx
new file mode 100644
index 0000000000..4ed7384285
--- /dev/null
+++ b/app/src/skins/kitebot/frame.tsx
@@ -0,0 +1,26 @@
+import type { ReactNode } from "react";
+import { ConnectionBanner } from "@/components/layout/connection-banner";
+import { SelfHostBanner } from "@/components/layout/self-host-banner";
+import { SidebarShell } from "@/components/layout/sidebar-shell";
+import { UpdateBanner } from "@/components/layout/update-banner";
+import { SidebarInset } from "@/components/ui/sidebar";
+import { KiteSidebar } from "./sidebar";
+
+/**
+ * Kite Bot's frame: OpenBot's own shell (the sidebar that collapses with ⌘B, is dragged wider at its
+ * edge and becomes a sheet on a phone, and the page inset beside it), with Kite Bot's sidebar in it.
+ * Every page keeps the toggle it already draws, so a collapsed or phone sidebar always comes back.
+ */
+export function KiteBotFrame({ children }: { children: ReactNode }) {
+ return (
+
+
+
+
+
+
+ {children}
+
+
+ );
+}
diff --git a/app/src/skins/kitebot/index.ts b/app/src/skins/kitebot/index.ts
new file mode 100644
index 0000000000..193de8c5a8
--- /dev/null
+++ b/app/src/skins/kitebot/index.ts
@@ -0,0 +1,19 @@
+import type { Skin } from "../types";
+import { KiteBotFrame } from "./frame";
+import { KiteSky } from "./sky";
+
+/*
+ * Kite Bot over OpenBot. Every Bot is drawn as OpenBot's kite, each in a colour and sail pattern of
+ * its own (components/agents/kite), on quiet black-and-white chrome, so the Bots are the colour on
+ * the page. The frame lists Bots first, with what waits on you above them; the home page shows the
+ * Sky, every Bot's kite and what it is doing. The pages inside are OpenBot's own.
+ */
+export const kitebot: Skin = {
+ id: "kitebot",
+ name: "Kite Bot",
+ description:
+ "Your Bots as kites in their own colours, listed first, with what needs you on top.",
+ Frame: KiteBotFrame,
+ botLook: "kite",
+ home: KiteSky,
+};
diff --git a/app/src/skins/kitebot/roster.ts b/app/src/skins/kitebot/roster.ts
new file mode 100644
index 0000000000..d5bac5484f
--- /dev/null
+++ b/app/src/skins/kitebot/roster.ts
@@ -0,0 +1,160 @@
+import type { KiteState } from "@/components/agents/kite/bot-kite";
+import { waitingOnYou } from "@/components/bot-profile/attention";
+import type { AgentProfile } from "@/lib/agents/queries";
+import type { BotAttention } from "@/lib/bot-lifecycle/queries";
+import type { ChannelSummary } from "@/lib/channels/queries";
+
+/*
+ * What Kite Bot's sidebar and its Sky say about each Bot, worked out from three things OpenBot
+ * already loads: the Bots, the conversations, and what waits on the person. Plain functions, so the
+ * frame and the tests read one answer.
+ */
+
+/** One Bot as Kite Bot draws it. */
+export type KiteBot = {
+ bot: AgentProfile;
+ /** What its kite shows: waiting on the person, working in a conversation, or neither. */
+ state: KiteState;
+ /** How many things it waits on the person for, counted as every badge in OpenBot counts them. */
+ waiting: number;
+ /** Where the newest thing it waits on sits, when that is a conversation. */
+ waitingIn: string | null;
+ paused: boolean;
+ /** Whether it said something in one of its conversations that the person has not seen. */
+ unread: boolean;
+ /** Its conversations with the person alone, pinned first, then newest first. */
+ conversations: ChannelSummary[];
+ /** When it last spoke or was spoken to in any conversation, or null for never. */
+ lastActiveAt: string | null;
+};
+
+/** A conversation with one Bot, which Kite Bot files under that Bot. */
+export function isOneToOne(channel: ChannelSummary): boolean {
+ return channel.agentIds.length === 1;
+}
+
+/** When a conversation last moved: its last message, or when it was made. */
+export function activityOf(channel: ChannelSummary): string {
+ return channel.lastMessageAt ?? channel.createdAt;
+}
+
+const newestFirst = (a: ChannelSummary, b: ChannelSummary) =>
+ activityOf(b).localeCompare(activityOf(a));
+
+/**
+ * Whether a Bot has said something this member has not had on screen yet: the same rule as
+ * OpenBot's own roster (`hasUnseenActivity`), kept beside the rows that use it here.
+ */
+export function unseen(channel: ChannelSummary): boolean {
+ if (channel.lastMessageAgentId === null || channel.lastMessageAt === null)
+ return false;
+ return (
+ channel.lastReadAt === null || channel.lastMessageAt > channel.lastReadAt
+ );
+}
+
+/**
+ * Every Bot the sidebar lists, with what its kite shows. In a steady order (pinned Bots first, then
+ * by name), so a row never moves under the pointer because a Bot spoke: what needs the person is
+ * lifted into its own section above instead.
+ */
+export function kiteBots(
+ bots: readonly AgentProfile[],
+ channels: readonly ChannelSummary[],
+ attention: readonly BotAttention[],
+ openChannelId?: string,
+): KiteBot[] {
+ return bots
+ .filter((bot) => !bot.hidden)
+ .map((bot) => {
+ const held = attention.find((one) => one.botId === bot.id);
+ const involved = channels.filter((channel) =>
+ channel.agentIds.includes(bot.id),
+ );
+ const conversations = involved
+ .filter(isOneToOne)
+ .sort(newestFirst)
+ .sort((a, b) => Number(b.pinned) - Number(a.pinned));
+ const waiting = held ? waitingOnYou(held) : 0;
+ const working = involved.some((channel) => channel.busy === true);
+ const lastActiveAt = involved.map(activityOf).sort().reverse()[0] ?? null;
+ return {
+ bot,
+ state: waiting > 0 ? "waiting" : working ? "working" : "idle",
+ waiting,
+ waitingIn: held?.waitingIn ?? null,
+ paused: held?.paused ?? false,
+ unread: conversations.some(
+ (channel) => channel.id !== openChannelId && unseen(channel),
+ ),
+ conversations,
+ lastActiveAt,
+ } satisfies KiteBot;
+ })
+ .sort(
+ (a, b) =>
+ Number(b.bot.pinned) - Number(a.bot.pinned) ||
+ a.bot.name.localeCompare(b.bot.name),
+ );
+}
+
+/** The Bots that wait on the person, most waiting first. */
+export function needingYou(bots: readonly KiteBot[]): KiteBot[] {
+ return bots
+ .filter((one) => one.waiting > 0)
+ .sort((a, b) => b.waiting - a.waiting);
+}
+
+/** Conversations with more than one Bot, newest first. */
+export function groupConversations(
+ channels: readonly ChannelSummary[],
+): ChannelSummary[] {
+ return channels
+ .filter((channel) => channel.agentIds.length > 1)
+ .sort(newestFirst);
+}
+
+/**
+ * The Sky's order: what waits on the person, then what is working, then whoever was busiest last,
+ * then everyone else by name. The opposite of the sidebar's steady order, because the Sky is read
+ * once, top to bottom, to see what is going on.
+ */
+export function skyOrder(bots: readonly KiteBot[]): KiteBot[] {
+ const rank = (one: KiteBot) =>
+ one.state === "waiting" ? 0 : one.state === "working" ? 1 : 2;
+ return [...bots].sort(
+ (a, b) =>
+ rank(a) - rank(b) ||
+ b.waiting - a.waiting ||
+ (b.lastActiveAt ?? "").localeCompare(a.lastActiveAt ?? "") ||
+ a.bot.name.localeCompare(b.bot.name),
+ );
+}
+
+/**
+ * The one Bot whose conversations the sidebar opens out: the Bot of the conversation on screen, or
+ * the Bot whose page is open. Null on any other page.
+ */
+export function openBotId(
+ pathname: string,
+ channels: readonly ChannelSummary[],
+): string | null {
+ const channel = /^\/channel\/([^/]+)/.exec(pathname)?.[1];
+ if (channel) {
+ const open = channels.find((one) => one.id === channel);
+ return open && isOneToOne(open) ? (open.agentIds[0] ?? null) : null;
+ }
+ return /^\/bots\/([^/]+)/.exec(pathname)?.[1] ?? null;
+}
+
+/** What one line under a Bot's name says about it, on the Sky. */
+export function skyLine(one: KiteBot, ago: (iso: string) => string): string {
+ if (one.paused) return "Paused";
+ if (one.waiting > 0)
+ return one.waiting === 1
+ ? "Waiting on you"
+ : `Waiting on you · ${one.waiting}`;
+ if (one.state === "working") return "Working";
+ if (one.lastActiveAt) return `Active ${ago(one.lastActiveAt)}`;
+ return one.bot.title || "Ready";
+}
diff --git a/app/src/skins/kitebot/sidebar.tsx b/app/src/skins/kitebot/sidebar.tsx
new file mode 100644
index 0000000000..118ca48c31
--- /dev/null
+++ b/app/src/skins/kitebot/sidebar.tsx
@@ -0,0 +1,547 @@
+import { IconPinFilled, IconPlus, IconSearch } from "@tabler/icons-react";
+import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
+import { Link, useRouterState } from "@tanstack/react-router";
+import { AnimatePresence, motion, useReducedMotion } from "motion/react";
+import { type ReactNode, useEffect, useMemo, useState } from "react";
+import { BotKite } from "@/components/agents/kite/bot-kite";
+import { KiteMark } from "@/components/agents/kite/kite-mark";
+import { AppSidebarFooter } from "@/components/app-sidebar/app-sidebar";
+import { ConversationMenu } from "@/components/app-sidebar/channel";
+import { ChannelAvatar } from "@/components/channels/avatar";
+import { BrandName } from "@/components/edition/brand-name";
+import {
+ openCommandMenu,
+ useBeforeCommandNavigate,
+} from "@/components/navigation/command-menu";
+import {
+ Sidebar,
+ SidebarContent,
+ SidebarHeader,
+ SidebarMenuSkeleton,
+ SidebarRail,
+ useSidebar,
+} from "@/components/ui/sidebar";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { agentListQueryOptions } from "@/lib/agents/queries";
+import { botAttentionQueryOptions } from "@/lib/bot-lifecycle/queries";
+import { conversationTitle } from "@/lib/channels/label";
+import {
+ type ChannelSummary,
+ channelListQueryOptions,
+} from "@/lib/channels/queries";
+import { useChannelEvents } from "@/lib/channels/use-channel-events";
+import { appConfig } from "@/lib/generated/application-config";
+import { EASE_OUT, ENTRANCE_SECONDS } from "@/lib/motion";
+import { relativeTimeShort } from "@/lib/relative-time";
+import { cn } from "@/lib/utils";
+import {
+ activityOf,
+ groupConversations,
+ type KiteBot,
+ kiteBots,
+ needingYou,
+ openBotId,
+ unseen,
+} from "./roster";
+
+/** How many of a Bot's conversations show under it before "Show all". */
+const SHOWN_CONVERSATIONS = 5;
+
+const SHORTCUT = /Mac|iPhone|iPad|iPod/.test(navigator.userAgent)
+ ? "⌘K"
+ : "Ctrl K";
+
+/** Every row's shape: 32px, the sidebar's hover, and the open page's fill. */
+const row =
+ "group/row relative flex h-8 w-full min-w-0 items-center gap-2.5 rounded-md px-2.5 text-[13px] text-sidebar-foreground/80 outline-none transition-colors duration-150 hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring";
+const openRow = "bg-sidebar-accent font-medium text-sidebar-foreground";
+
+/**
+ * A Bot's kite in a row: 22px, the smallest a kite has a face at, so a Bot can look up when you point
+ * at it. Whatever leads any other row sits in a slot of the same width, so every name lines up.
+ */
+const KITE_SIZE = 22;
+const slot = "grid size-[22px] shrink-0 place-items-center";
+
+/**
+ * The conversation open on screen, from the path: OpenBot serves a conversation with one Bot at
+ * `/channel/:id` and one with several at `/group/:id`.
+ */
+function openConversationId(pathname: string): string | undefined {
+ return /^\/(?:channel|group)\/([^/]+)/.exec(pathname)?.[1];
+}
+
+/** Where a conversation opens, by how many Bots are in it. */
+function conversationLink(channel: ChannelSummary) {
+ return channel.agentIds.length > 1
+ ? ({ to: "/group/$channelId", params: { channelId: channel.id } } as const)
+ : ({
+ to: "/channel/$channelId",
+ params: { channelId: channel.id },
+ } as const);
+}
+
+function titleOf(channel: ChannelSummary): string {
+ return conversationTitle(channel) || "New conversation";
+}
+
+/**
+ * Kite Bot's sidebar. Bots first: every Bot is a row with its kite, and the Bot you are with opens
+ * out to show its conversations, so the sidebar says where you are without a second bar on top of
+ * OpenBot's pages. Above the Bots, what waits on you and what you pinned; below them, the
+ * conversations with more than one Bot. The foot is OpenBot's own: its destinations, the Bots badge
+ * and the account menu.
+ *
+ * It keeps the one thing OpenBot's sidebar does beyond drawing: the socket that keeps every
+ * conversation, and so every kite's working pixel, live.
+ */
+export function KiteSidebar() {
+ useChannelEvents();
+ const pathname = useRouterState({
+ select: (state) => state.location.pathname,
+ });
+ const bots = useQuery(agentListQueryOptions());
+ const channels = useInfiniteQuery(channelListQueryOptions());
+ const attention = useQuery(botAttentionQueryOptions());
+ const openChannel = openConversationId(pathname);
+ const loaded = channels.data ?? [];
+ const roster = useMemo(
+ () => kiteBots(bots.data ?? [], loaded, attention.data ?? [], openChannel),
+ [bots.data, loaded, attention.data, openChannel],
+ );
+ const needs = needingYou(roster);
+ const pinned = loaded.filter((channel) => channel.pinned);
+ const groups = groupConversations(loaded).filter(
+ (channel) => !channel.pinned,
+ );
+ const openBot = openBotId(pathname, loaded);
+ const { isMobile, setOpenMobile } = useSidebar();
+ useBeforeCommandNavigate(() => setOpenMobile(false));
+ // On a phone the sidebar is a sheet over the page: going anywhere puts it away.
+ // biome-ignore lint/correctness/useExhaustiveDependencies: closes on each new path, by design.
+ useEffect(() => {
+ if (isMobile) setOpenMobile(false);
+ }, [pathname]);
+
+ return (
+
+
+
+
+ );
+}
+
+/**
+ * A Bot that waits on you, and the way to what it waits on: the conversation it asked in, or its
+ * page, where questions and approvals are answered.
+ */
+function NeedsYouRow({
+ one,
+ channels,
+ pathname,
+}: {
+ one: KiteBot;
+ channels: readonly ChannelSummary[];
+ pathname: string;
+}) {
+ const where = one.waitingIn
+ ? channels.find((channel) => channel.id === one.waitingIn)
+ : undefined;
+ const link = where
+ ? conversationLink(where)
+ : ({ to: "/bots/$agentId", params: { agentId: one.bot.id } } as const);
+ const here = where
+ ? pathname.endsWith(`/${where.id}`)
+ : pathname.startsWith(`/bots/${one.bot.id}`);
+ return (
+
+
+
+ {one.bot.name}
+
+ {one.waiting}
+
+
+
+ );
+}
+
+/**
+ * One Bot: its kite, its name, and what is new with it. Choosing it opens its newest conversation,
+ * or starts one when there is none. While it is the Bot you are with, its conversations open out
+ * under it and its kite stays awake; any other Bot's kite wakes while you point at its row or tab
+ * to it.
+ */
+function BotRow({
+ one,
+ open,
+ openChannel,
+ pathname,
+}: {
+ one: KiteBot;
+ open: boolean;
+ openChannel: string | undefined;
+ pathname: string;
+}) {
+ const reduce = useReducedMotion();
+ const [all, setAll] = useState(false);
+ const [contact, setContact] = useState(false);
+ const latest = one.conversations[0];
+ const link = latest
+ ? conversationLink(latest)
+ : ({ to: "/channel/new", search: { agent: one.bot.id } } as const);
+ const onBotPage = pathname.startsWith(`/bots/${one.bot.id}`);
+ const shown = all
+ ? one.conversations
+ : one.conversations.slice(0, SHOWN_CONVERSATIONS);
+ const hidden = one.conversations.length - shown.length;
+
+ return (
+
+ );
+}
+
+/**
+ * A conversation: under its Bot, just what it is about and when it last moved; on its own (pinned,
+ * or with several Bots), led by its Bots' kites. Right-click offers what OpenBot's roster does.
+ */
+function ConversationRow({
+ channel,
+ open,
+ nested = false,
+}: {
+ channel: ChannelSummary;
+ open: boolean;
+ nested?: boolean;
+}) {
+ const title = titleOf(channel);
+ const unread = !open && unseen(channel);
+ return (
+
+ );
+}
+
+/**
+ * A conversation with several Bots, as two of their kites flying together in the space of one: the
+ * second a little lower and to the right, over the first. Two kites of a row's size side by side
+ * would push its words out of line with every other row's.
+ */
+function KitePair({ ids, working }: { ids: string[]; working: boolean }) {
+ const bots = useQuery(agentListQueryOptions()).data;
+ const kites = ids.slice(0, 2).map((id) => {
+ const bot = bots?.find((one) => one.id === id);
+ return { id, name: bot?.name ?? "", seed: bot?.avatarSeed ?? id };
+ });
+ return (
+
+ {kites.map((kite, index) => (
+
+
+
+ ))}
+
+ );
+}
diff --git a/app/src/skins/kitebot/skin.css b/app/src/skins/kitebot/skin.css
new file mode 100644
index 0000000000..9729b38951
--- /dev/null
+++ b/app/src/skins/kitebot/skin.css
@@ -0,0 +1,86 @@
+/*
+ * Kite Bot. OpenBot's shell in black, white and grey, so the Bots are the colour on the page: each
+ * is a kite in its own colours (components/agents/kite). Lines are hairline greys, selection is a
+ * neutral step with a breath of violet, and the one accent is OpenBot's violet, on focus alone.
+ * Corners are a little tighter than OpenBot's, to sit with the kite's sharp ones, and text is set
+ * with greyscale smoothing, which keeps small grey labels crisp on white and on black.
+ *
+ * Every token is set for both. A skin's `:root[data-skin]` outranks OpenBot's `.dark`, so a token set
+ * only for light would leak into dark.
+ */
+
+:root[data-skin="kitebot"] {
+ color-scheme: light;
+ --background: #ffffff;
+ --foreground: #0a0a0a;
+ --card: #ffffff;
+ --card-foreground: #0a0a0a;
+ --popover: #ffffff;
+ --popover-foreground: #0a0a0a;
+ --primary: #0a0a0a;
+ --primary-foreground: #ffffff;
+ --secondary: #f2f2f2;
+ --secondary-foreground: #0a0a0a;
+ --muted: #f2f2f2;
+ --muted-foreground: #666666;
+ --accent: #f0f0f0;
+ --accent-foreground: #0a0a0a;
+ --destructive: #c4321f;
+ --success: #18794e;
+ --border: #ebebeb;
+ --input: #dcdcdc;
+ --ring: #6430ab;
+ --radius: 0.5rem;
+ --sidebar: #fafafa;
+ --sidebar-foreground: #0a0a0a;
+ --sidebar-primary: #0a0a0a;
+ --sidebar-primary-foreground: #ffffff;
+ --sidebar-accent: #ededed;
+ --sidebar-accent-foreground: #0a0a0a;
+ --sidebar-border: #ebebeb;
+ --sidebar-ring: #6430ab;
+ --kitebot-selection: #f4effb;
+}
+
+:root[data-skin="kitebot"].dark {
+ color-scheme: dark;
+ --background: #0a0a0a;
+ --foreground: #ededed;
+ --card: #111111;
+ --card-foreground: #ededed;
+ --popover: #141414;
+ --popover-foreground: #ededed;
+ --primary: #ededed;
+ --primary-foreground: #0a0a0a;
+ /* Lighter than the cards, as shadcn's dark fills are, so a button or badge never reads as a hole. */
+ --secondary: #1c1c1c;
+ --secondary-foreground: #ededed;
+ --muted: #1c1c1c;
+ --muted-foreground: #a1a1a1;
+ --accent: #222222;
+ --accent-foreground: #ededed;
+ --destructive: #ff7a68;
+ --success: #3ccf8e;
+ --border: #242424;
+ --input: #2e2e2e;
+ --ring: #b598f3;
+ --radius: 0.5rem;
+ --sidebar: #000000;
+ --sidebar-foreground: #ededed;
+ --sidebar-primary: #ededed;
+ --sidebar-primary-foreground: #0a0a0a;
+ --sidebar-accent: #1a1a1a;
+ --sidebar-accent-foreground: #ededed;
+ --sidebar-border: #1f1f1f;
+ --sidebar-ring: #b598f3;
+ --kitebot-selection: #2a2140;
+}
+
+:root[data-skin="kitebot"] ::selection {
+ background: var(--kitebot-selection);
+}
+
+:root[data-skin="kitebot"] body {
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
diff --git a/app/src/skins/kitebot/sky.tsx b/app/src/skins/kitebot/sky.tsx
new file mode 100644
index 0000000000..4b240d587f
--- /dev/null
+++ b/app/src/skins/kitebot/sky.tsx
@@ -0,0 +1,132 @@
+import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
+import { Link } from "@tanstack/react-router";
+import { useState } from "react";
+import { BotKite } from "@/components/agents/kite/bot-kite";
+import { StaggerItem } from "@/components/layout/stagger";
+import { Skeleton } from "@/components/ui/skeleton";
+import { agentListQueryOptions } from "@/lib/agents/queries";
+import { botAttentionQueryOptions } from "@/lib/bot-lifecycle/queries";
+import { channelListQueryOptions } from "@/lib/channels/queries";
+import { relativeTimeShort } from "@/lib/relative-time";
+import { cn } from "@/lib/utils";
+import { type KiteBot, kiteBots, skyLine, skyOrder } from "./roster";
+
+/** Two rows of four on a wide screen, two of two on a phone. The rest are one "All Bots" away. */
+const SKY_SHOWN = 8;
+
+function ago(iso: string): string {
+ const short = relativeTimeShort(iso);
+ return short === "now" ? "just now" : `${short} ago`;
+}
+
+/**
+ * The Sky: Kite Bot's home under the composer, in place of OpenBot's Explore Bots. Every Bot's kite,
+ * with what needs you first, then what is working, then whoever was busiest last. A kite wakes when
+ * you point at it or tab to it, and choosing one opens its newest conversation, or starts one.
+ *
+ * Every state holds the same two rows, so the composer above never moves when the Bots arrive.
+ */
+export function KiteSky() {
+ const bots = useQuery(agentListQueryOptions());
+ const channels = useInfiniteQuery(channelListQueryOptions());
+ const attention = useQuery(botAttentionQueryOptions());
+ const sky = skyOrder(
+ kiteBots(bots.data ?? [], channels.data ?? [], attention.data ?? []),
+ );
+ const shown = sky.slice(0, SKY_SHOWN);
+
+ return (
+
+