Compare commits

...
3 Commits
Author SHA1 Message Date
tbenandClaude Opus 5.5 7da2bd6941 Release v0.12.4
Release image / image (release) Canceled after 0s
CI / check (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 18:52:59 +01:00
tbenandClaude Opus 5.5 5842735813 Animate bot faces by state
Only the eyes move: idle blinks at a per-bot pace, working glances side
to side, done hops once, asleep breathes, needs-you nudges. Off under
reduced motion; the logo stays still.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 18:52:29 +01:00
tbenandClaude Opus 5.5 6312c92334 Show the sessions modal's empty note only when the list is empty
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 17:04:44 +01:00
8 changed files with 223 additions and 45 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ Enables SQLite foreign keys (`enableForeignKeys`), `bunextInit()`, `ensureDocker
- **Voice:** mic -> `api/admin/bots/transcribe.ts`; play -> `GET speak-message` streamed into `<audio>`. Nothing recorded is stored. Both disabled with a note when the harness has no model.
- **Pictures:** `image_media_id` (private media, `bot-image`/`workspace-image`), via `set-profile-image.ts`, the `set_picture` tool or `update_workspace`. Bytes are **copied**, never moved; only picture-paradigm rows are deleted on replace. Format kept by `imageOutputFormat`.
- **Colour:** only `src/utils/bot-color.ts` resolves/validates colours and stones (`resolveBotColor`, `resolveBotStone`, `botColorNeedsPaperFace`); new bots get `pick-free-color.ts`.
- **Avatars:** `BotStone` draws the stone inline with the colour as SVG `fill` and the face as eyes. Coordinator: ink body, paper eyes. **Never put a stone in a circle/badge or add outline/shadow.** The wordmark is vector (`Wordmark`), never live text.
- **Avatars:** `BotStone` draws the stone inline with the colour as SVG `fill` and the face as eyes. Coordinator: ink body, paper eyes. Each face moves only its eyes (`BotStoneFace`, keyframes `stone-*` in `main.css`: idle blinks at a per-bot pace, working glances, done hops once, asleep breathes, needs-you nudges; off under reduced motion; `still` for the logo). **Never put a stone in a circle/badge or add outline/shadow.** The wordmark is vector (`Wordmark`), never live text.
- **Copy helpers:** `src/utils/crew-status.ts`, `src/utils/relative-time.ts` (relative timestamps only).
### Prompt and memory
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cobble",
"version": "0.12.3",
"version": "0.12.4",
"module": "index.ts",
"type": "module",
"private": true,
@@ -157,7 +157,7 @@ export default function BotSessionsModal({
))}
{sessions.loading ? (
<LoadingBlock className="w-full h-[300px]" />
) : sessions.sessions.length ? (
) : !sessions.sessions.length ? (
<Span className="px-3 py-6 text-[13px] leading-[18px] text-ink-secondary">
{sessions.query.trim()
? `No session matches "${sessions.query.trim()}".`
+60
View File
@@ -0,0 +1,60 @@
import type { BotFace } from "@/src/dict/bot-dict";
import { StoneEyes } from "@/src/data/stone-geometry";
import StoneEyeDot from "./stone-eye-dot";
import StoneEyeLidded from "./stone-eye-lidded";
import StoneEyeArc from "./stone-eye-arc";
import StoneEyeFlat from "./stone-eye-flat";
type Props = {
face: BotFace;
/**
* Fill class for solid eyes.
*/
fill_class: string;
/**
* Stroke class for arc eyes.
*/
stroke_class: string;
};
/**
* The eyes for each face. Geometry follows the handoff face states:
* idle dots, working half-lidded, done upward arcs, asleep one flattened
* dot, needs-you dot plus arc.
*/
export default function BotStoneEyes({ face, fill_class, stroke_class }: Props) {
const { left, right, centre } = StoneEyes;
switch (face) {
case "working":
return (
<>
<StoneEyeLidded {...left} className={fill_class} />
<StoneEyeLidded {...right} className={fill_class} />
</>
);
case "done":
return (
<>
<StoneEyeArc {...left} className={stroke_class} />
<StoneEyeArc {...right} className={stroke_class} />
</>
);
case "asleep":
return <StoneEyeFlat {...centre} className={fill_class} />;
case "needs-you":
return (
<>
<StoneEyeDot {...left} className={fill_class} />
<StoneEyeArc {...right} className={stroke_class} />
</>
);
default:
return (
<>
<StoneEyeDot {...left} className={fill_class} />
<StoneEyeDot {...right} className={fill_class} />
</>
);
}
}
+57 -42
View File
@@ -1,9 +1,24 @@
import { twMerge } from "tailwind-merge";
import type { BotFace } from "@/src/dict/bot-dict";
import { StoneEyes } from "@/src/data/stone-geometry";
import StoneEyeDot from "./stone-eye-dot";
import StoneEyeLidded from "./stone-eye-lidded";
import StoneEyeArc from "./stone-eye-arc";
import StoneEyeFlat from "./stone-eye-flat";
import BotStoneEyes from "./bot-stone-eyes";
/**
* Idle blinks at three paces (`--animate-stone-blink-*` in `main.css`), so
* stones side by side never blink in step. Literal class names, so Tailwind
* sees them.
*/
const BlinkClasses = [
"animate-stone-blink-a",
"animate-stone-blink-b",
"animate-stone-blink-c",
] as const;
const FaceMotionClasses: Record<Exclude<BotFace, "idle">, string> = {
working: "animate-stone-glance",
done: "animate-stone-hop",
asleep: "animate-stone-breathe",
"needs-you": "animate-stone-nudge",
};
type Props = {
face: BotFace;
@@ -15,46 +30,46 @@ type Props = {
* Stroke class for arc eyes.
*/
stroke_class: string;
/**
* Leave the eyes still (the logo, static marks).
*/
still?: boolean;
/**
* Any whole number, the same for the same bot: picks its blink pace.
*/
motion_seed?: number;
};
/**
* The face is the status. Geometry follows the handoff face states:
* idle dots, working half-lidded, done upward arcs, asleep one flattened
* dot, needs-you dot plus arc.
* The face is the status, and each face moves its own way: idle blinks,
* working glances side to side, done hops once, asleep breathes, needs-you
* nudges. Only the eyes move; reduced motion keeps them still.
*/
export default function BotStoneFace({ face, fill_class, stroke_class }: Props) {
const { left, right, centre } = StoneEyes;
export default function BotStoneFace({
face,
fill_class,
stroke_class,
still,
motion_seed = 0,
}: Props) {
const motion_class =
face === "idle" || !FaceMotionClasses[face]
? BlinkClasses[Math.abs(motion_seed) % BlinkClasses.length]
: FaceMotionClasses[face];
switch (face) {
case "working":
return (
<>
<StoneEyeLidded {...left} className={fill_class} />
<StoneEyeLidded {...right} className={fill_class} />
</>
);
case "done":
return (
<>
<StoneEyeArc {...left} className={stroke_class} />
<StoneEyeArc {...right} className={stroke_class} />
</>
);
case "asleep":
return <StoneEyeFlat {...centre} className={fill_class} />;
case "needs-you":
return (
<>
<StoneEyeDot {...left} className={fill_class} />
<StoneEyeArc {...right} className={stroke_class} />
</>
);
default:
return (
<>
<StoneEyeDot {...left} className={fill_class} />
<StoneEyeDot {...right} className={fill_class} />
</>
);
}
return (
<g
className={twMerge(
"origin-center transform-fill",
!still && motion_class,
"motion-reduce:animate-none",
)}
>
<BotStoneEyes
face={face}
fill_class={fill_class}
stroke_class={stroke_class}
/>
</g>
);
}
+16
View File
@@ -37,6 +37,11 @@ type Props = {
* stone (the default), so the stone is decorative.
*/
label?: string;
/**
* Leave the eyes still. Every face moves by default (`BotStoneFace`);
* the logo and other static marks pass this.
*/
still?: boolean;
className?: string;
};
@@ -52,6 +57,7 @@ export default function BotStone({
face = "idle",
size = 32,
label,
still,
className,
}: Props) {
const is_coordinator = !color;
@@ -65,6 +71,14 @@ export default function BotStone({
const paper_face = is_coordinator || botColorNeedsPaperFace({ color: color! });
const eye_fill = paper_face ? "fill-paper" : "fill-dark";
const eye_stroke = paper_face ? "stroke-paper" : "stroke-dark";
/**
* The same bot always blinks at the same pace; different bots rarely
* share one.
*/
const motion_seed = [...`${color || ""}${stone || hue || ""}`].reduce(
(sum, char) => sum + char.charCodeAt(0),
0,
);
return (
<svg
@@ -85,6 +99,8 @@ export default function BotStone({
face={face}
fill_class={eye_fill}
stroke_class={eye_stroke}
still={still}
motion_seed={motion_seed}
/>
</svg>
);
+1
View File
@@ -18,6 +18,7 @@ export default function LogoIcon({ icon_size = 40, img_props }: Props) {
stone={BotHues[0].value}
size={icon_size}
label="Logo Icon"
still
className={img_props?.className}
/>
);
+86
View File
@@ -197,6 +197,92 @@
transform: translateX(300%);
}
}
/* Bot faces (`BotStoneFace`): only the eyes move, never the stone.
Idle blinks, at three paces so a rail of bots never blinks in step. */
--animate-stone-blink-a: stone-blink 5.3s ease-in-out infinite;
--animate-stone-blink-b: stone-blink 6.7s ease-in-out infinite;
--animate-stone-blink-c: stone-blink 8.1s ease-in-out infinite;
/* Working: the eyes glance left and right over the work. */
--animate-stone-glance: stone-glance 3.4s ease-in-out infinite;
/* Done: one small hop when the face turns happy. */
--animate-stone-hop: stone-hop 0.6s ease-out 1;
/* Asleep: the closed eye breathes slowly. */
--animate-stone-breathe: stone-breathe 4.8s ease-in-out infinite;
/* Needs you: a double nudge, then a pause. */
--animate-stone-nudge: stone-nudge 2.6s ease-in-out infinite;
@keyframes stone-blink {
0%,
93%,
100% {
transform: scaleY(1);
}
96% {
transform: scaleY(0.1);
}
}
@keyframes stone-glance {
0%,
12%,
100% {
transform: translateX(0);
}
30%,
45% {
transform: translateX(-4px);
}
65%,
80% {
transform: translateX(4px);
}
}
@keyframes stone-hop {
0% {
transform: translateY(0);
}
40% {
transform: translateY(-6px);
}
70% {
transform: translateY(1px);
}
100% {
transform: translateY(0);
}
}
@keyframes stone-breathe {
0%,
100% {
transform: scale(1, 1);
}
50% {
transform: scale(1.12, 1.45);
}
}
@keyframes stone-nudge {
0%,
68%,
100% {
transform: translateY(0);
}
75% {
transform: translateY(-4px);
}
82% {
transform: translateY(0);
}
88% {
transform: translateY(-2px);
}
94% {
transform: translateY(0);
}
}
}
body {