From 4edcbc0378fa21ff4d728eaa45103ac9cc02de4b Mon Sep 17 00:00:00 2001 From: "nekomimi.pet" Date: Mon, 19 Oct 2026 19:24:14 -0400 Subject: [PATCH] web: a thinking session reads as busy, and faces keep their width The client counted a session as busy only while its phase was running, which the daemon reports only while a tool runs. While the model thinks or writes the phase is generating, so the chat signed the turn off with its face and showed nothing live until the reply landed. Every phase but idle and interrupted now counts, each with its own face: preparing, thinking or responding, working, compacting and stopping. A live face swapped frames of different widths, which moved whatever sat beside it. Every frame of the animation now sits invisibly under the current one, so the face keeps the width of its widest frame. --- robot-docs/web.md | 2 +- web/src/App.svelte | 3 ++- web/src/lib/LiveFace.svelte | 21 +++++++++++++--- web/src/lib/Rail.svelte | 3 ++- web/src/lib/chat/Chat.svelte | 3 ++- web/src/lib/live.svelte.ts | 37 +++++++++++++++++++++------- web/src/lib/moods.ts | 7 +++--- web/src/lib/nodes/SessionNode.svelte | 3 ++- 8 files changed, 57 insertions(+), 22 deletions(-) diff --git a/robot-docs/web.md b/robot-docs/web.md index d7a37f643..35be921e8 100644 --- a/robot-docs/web.md +++ b/robot-docs/web.md @@ -18,7 +18,7 @@ A board is an open canvas. **Windows** sit anywhere on it; the view pans freely Design rules the client keeps (from the design pass): surfaces separate by a step in tone, not by lines; only what floats (windows, the palette, the view controls, the overview map) casts a shadow; one accent, albedo's mauve by default, used for focus and selection; no status dots; monospace only for code and tool commands. -The client shares the terminal's voice. `moods.ts` is a port of `cli/internal/tui/moods.go` (its pools, their order and the seeded FNV-1a pick), so a finished turn signs off with the same kaomoji in both clients: its seed is the turn's last entry time in milliseconds, and its class comes from how long it took. A running session shows an animated face for what its activity says (thinking, working, responding), one shared 500 ms clock for every face on the page (`live.svelte.ts`). `burst.ts` writes a turn's thinking and tool calls as the terminal's one past-tense line (`thought 12s · read tui/{chat,moods}.go · ran go test ×2 +12 −3`), from each call's trace, fetched when the line scrolls into view. Speakers are named as in the terminal: "albedo" in mauve, "you" in teal, with "2h later" after a pause of 30 minutes or more. Copy is lowercase, and empty and error states carry a face. The canvas has sparse, faint dots that fade out below 75% zoom, before they can crowd into a texture. +The client shares the terminal's voice. `moods.ts` is a port of `cli/internal/tui/moods.go` (its pools, their order and the seeded FNV-1a pick), so a finished turn signs off with the same kaomoji in both clients: its seed is the turn's last entry time in milliseconds, and its class comes from how long it took. A busy session shows an animated face for what it is doing, read from its phase (`preparing`, `generating`, `running` a tool, `compacting`, `interrupting`; only `idle` and `interrupted` are at rest) and the tail of its activity, on one shared 500 ms clock for every face on the page (`live.svelte.ts`). Every frame of the animation sits invisibly under the current one, so a face keeps its width and nothing beside it moves. `burst.ts` writes a turn's thinking and tool calls as the terminal's one past-tense line (`thought 12s · read tui/{chat,moods}.go · ran go test ×2 +12 −3`), from each call's trace, fetched when the line scrolls into view. Speakers are named as in the terminal: "albedo" in mauve, "you" in teal, with "2h later" after a pause of 30 minutes or more. Copy is lowercase, and empty and error states carry a face. The canvas has sparse, faint dots that fade out below 75% zoom, before they can crowd into a texture. Settings (the sliders button at the top right, or ⌘,) is a non-modal pane over the board: theme (follow the system, the default; light; dark), accent (pine, lake, clay, graphite) and the canvas dots. They live in this browser (`prefs.svelte.ts`, `albedo.prefs.v1`). The resolved theme and accent are attributes on `` (`data-theme`, `data-accent`) that `app.css` keys every token on; a small script in `index.html` sets them before the first paint so a saved dark theme never flashes light, and `prefs` follows system changes while the theme is `system`. diff --git a/web/src/App.svelte b/web/src/App.svelte index 110df4b2e..c214e2296 100644 --- a/web/src/App.svelte +++ b/web/src/App.svelte @@ -5,6 +5,7 @@ import { shortcut, typing } from './lib/keys'; import Palette, { type Item } from './lib/Palette.svelte'; import { prefs } from './lib/prefs.svelte'; + import { busy } from './lib/live.svelte'; import Rail from './lib/Rail.svelte'; import Settings from './lib/Settings.svelte'; import { sessions } from './lib/sessions.svelte'; @@ -54,7 +55,7 @@ key: session.id, kind: 'session', label: session.name || 'untitled session', - detail: `${place(session.workspace)} · ${session.status?.phase === 'running' ? 'working' : ago(session.activity_at)}`, + detail: `${place(session.workspace)} · ${busy(session) ? 'working' : ago(session.activity_at)}`, run: () => boards.openSession(session), })); const reopen = boards.closed.map((entry) => ({ label: `open board: ${entry.name}`, run: () => boards.show(entry.id) })); diff --git a/web/src/lib/LiveFace.svelte b/web/src/lib/LiveFace.svelte index 185111e73..b5b77827e 100644 --- a/web/src/lib/LiveFace.svelte +++ b/web/src/lib/LiveFace.svelte @@ -1,11 +1,13 @@ @@ -13,7 +15,10 @@ {#if session} {#if label}{mood}{/if} - {liveFace(session.id, mood, clock.tick)} + + {#each set as frame, index (index)}{/each} + {set[clock.tick % set.length]} + {/if} @@ -29,6 +34,14 @@ color: var(--muted); } .face { + display: inline-grid; font-weight: 500; } + .sizer, + .now { + grid-area: 1 / 1; + } + .sizer { + visibility: hidden; + } diff --git a/web/src/lib/Rail.svelte b/web/src/lib/Rail.svelte index 7676ac0a1..35f5073e9 100644 --- a/web/src/lib/Rail.svelte +++ b/web/src/lib/Rail.svelte @@ -2,6 +2,7 @@ import type { Session } from './api'; import { boards } from './boards.svelte'; import { ago, homePath, matches, place } from './format'; + import { busy } from './live.svelte'; import LiveFace from './LiveFace.svelte'; import { sessions } from './sessions.svelte'; @@ -62,7 +63,7 @@ {#snippet row(session: Session)}