Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(agents): gemini and opencode pulse their brand mark while working

enes3801a1e08916
diff --git a/src/renderer/hud/hud.css b/src/renderer/hud/hud.css
index cc0a056a9..d3ecbc22f 100644
--- a/src/renderer/hud/hud.css
+++ b/src/renderer/hud/hud.css
@@ -146,13 +146,22 @@ body {
background-size: calc(var(--mascot-w) * 2) var(--mascot-h);
animation: mascot-walk-claude 0.8s steps(1) infinite;
}
-/* Grok is the brand mark breathing, not a sprite — same treatment as the canvas badge. The bloom is
- a drop-shadow of `currentColor`, so it needs no ink of its own; on this strip that resolves
- against --capsule-bg (#000), which is why it reads as a glow here. */
-.mascot--grok {
- animation: mascot-pulse-grok 1.6s ease-in-out infinite;
+/* Grok, gemini and opencode are their brand mark breathing, not a sprite — same treatment as the
+ canvas badge. The bloom is a drop-shadow of `currentColor`, so it needs no ink of its own; on this
+ strip that resolves against --capsule-bg (#000), which is why it reads as a glow here. */
+.mascot--pulse {
+ animation: mascot-pulse-brand 1.6s ease-in-out infinite;
+}
+/* An asset-based mark (gemini/opencode) is painted as a background image, since those four brand
+ SVGs are multi-colour documents and cannot be inlined the way grok's monochrome path is.
+ `image-rendering: auto` undoes .mascot's `pixelated`, which is there for the pixel-art critters
+ and would harden a vector mark's curves at 13px. */
+.mascot--pulse-asset {
+ background-size: contain;
+ background-position: center;
+ image-rendering: auto;
}
-@keyframes mascot-pulse-grok {
+@keyframes mascot-pulse-brand {
0%,
100% {
opacity: 0.55;
@@ -164,7 +173,7 @@ body {
}
}
@media (prefers-reduced-motion: reduce) {
- .mascot--grok {
+ .mascot--pulse {
animation: none;
opacity: 1;
filter: drop-shadow(0 0 1px currentColor);
diff --git a/src/renderer/hud/main.ts b/src/renderer/hud/main.ts
index 3ca7b3d59..9dd866e94 100644
--- a/src/renderer/hud/main.ts
+++ b/src/renderer/hud/main.ts
@@ -5,6 +5,7 @@
import './hud.css'
import { CLAUDE_MASCOT, CODEX_MASCOT, DONE_BLOB } from '../lib/mascot'
+import { HUD_BRAND_PULSE_CLASS, brandPulseBackground, brandPulsePlan } from '../lib/brandPulse'
import { createGrokMarkSvg } from '../lib/grokMark'
import { orderIndicatorAgents } from './indicator'
import codexPet from '../assets/pet-codex.webp'
@@ -128,8 +129,8 @@ function reltime(ts: number): string {
// and the Codex pet at 26px; these are the sensible defaults — NAIL EXACTLY ON A MAC (the notch
// bar height varies by model, and 26px overflows a short bar). Aspect ratios are preserved from
// the sprite geometry, so only the height matters.
-/** Height of the quadrant-block sprite (claude), and of grok's inline brand mark — one number so
- * the two working indicators sit on the same baseline in the strip. */
+/** Height of the quadrant-block sprite (claude), and of the pulsing brand marks — one number so the
+ * working indicators all sit on the same baseline in the strip. */
const HUD_QUADRANT_H = 13
const HUD_CODEX_H = 17
@@ -160,14 +161,33 @@ function codexMascot(): HTMLElement {
el.style.backgroundImage = `url(${codexPet})`
return el
}
+/** An asset brand mark (gemini/opencode), breathing: a background-image span. These marks carry their
+ * own fills, so unlike grok's they cannot be drawn as an inline `currentColor` path — the bloom is
+ * the strip's label colour rather than their own ink (see lib/brandPulse.ts). */
+function brandPulseMascot(src: string, size: number): HTMLElement {
+ const el = document.createElement('span')
+ el.className = `${HUD_BRAND_PULSE_CLASS} mascot--pulse-asset`
+ el.style.width = `${size}px`
+ el.style.height = `${size}px`
+ // Quoted via brandPulseBackground: these marks are inlined data URIs containing `)` and `'`, and
+ // an unquoted url() is rejected outright — the mark would paint NOTHING.
+ el.style.backgroundImage = brandPulseBackground(src)
+ return el
+}
// Returns an SVGSVGElement for grok (an inline brand mark) and HTMLElement for the sprite
// mascots; every caller only appends it, so `Element` is the honest shared type.
function workingMascot(agentId?: string): Element {
if (agentId === 'claude' && CLAUDE_MASCOT.src) return quadrantMascot(CLAUDE_MASCOT, 'claude')
- // grok breathes its own brand mark instead of walking a critter — the SAME treatment the canvas
- // badge uses (AgentMascot), so one agent is never two different things on two surfaces.
- if (agentId === 'grok') return createGrokMarkSvg(HUD_QUADRANT_H, 'mascot mascot--grok')
if (agentId === 'codex') return codexMascot()
+ // grok, gemini and opencode breathe their own brand mark instead of walking a critter — the SAME
+ // decision the canvas badge makes (lib/brandPulse.ts, shared precisely so one agent is never two
+ // different things on two surfaces). This renderer stays React-free, so it draws the plan itself.
+ const plan = brandPulsePlan(agentId, HUD_QUADRANT_H)
+ if (plan) {
+ return plan.kind === 'inline'
+ ? createGrokMarkSvg(plan.size, HUD_BRAND_PULSE_CLASS)
+ : brandPulseMascot(plan.src, plan.size)
+ }
const dot = document.createElement('span')
dot.className = 'mascot mascot--dot'
return dot
diff --git a/src/renderer/lib/agentIcons.tsx b/src/renderer/lib/agentIcons.tsx
index 0334c686b..d26b4f589 100644
--- a/src/renderer/lib/agentIcons.tsx
+++ b/src/renderer/lib/agentIcons.tsx
@@ -1,23 +1,12 @@
import type { AgentId } from '@shared/agents/config'
-import claudeIcon from '../assets/claude.svg'
-import codexIcon from '../assets/codex-color.svg'
-import geminiIcon from '../assets/gemini-color.svg'
-import opencodeIcon from '../assets/opencode.svg'
import { IconTerminal } from '../components/icons'
+import { AGENT_LOGO, BRAND_PULSE_CLASS, brandPulsePlan } from './brandPulse'
import { GROK_MARK_PATH, GROK_MARK_VIEWBOX } from './grokMark'
-// Brand logo per builtin agent; custom/unknown agents fall back to the terminal glyph.
-//
-// These four are MULTI-COLOUR marks, so each carries its own fills and is loaded as an `<img src>`
-// (Vite hands us a URL). An SVG loaded that way is an isolated document — `currentColor` has nothing
-// to inherit there, which is why none of these assets uses it. Grok is the exception and is handled
-// below: its mark is monochrome, so it is inlined instead.
-const AGENT_LOGO: Partial<Record<string, string>> = {
- claude: claudeIcon,
- codex: codexIcon,
- gemini: geminiIcon,
- opencode: opencodeIcon
-}
+// The logo map itself lives in the REACT-FREE lib/brandPulse.ts, because the notch HUD needs the
+// same assets and must not import React. Re-exported here so React callers have one import for
+// "which agents have a mark" beside the components that draw them.
+export { hasBrandLogo } from './brandPulse'
/**
* The official Grok mark (xAI), inlined rather than shipped as an asset — geometry from
@@ -49,6 +38,26 @@ export function GrokMark({
)
}
+/**
+ * The RUNNING-badge indicator for an agent that has a brand mark but no mascot art: the mark
+ * itself, pulsing with a `currentColor` bloom. See `brandPulsePlan` for why (and for the bloom's
+ * one caveat on the multi-colour assets); `null` here means "no mark — fall back to the dot".
+ *
+ * A thin renderer on purpose: every decision is in the pure plan, which the notch HUD shares.
+ */
+export function BrandPulse({ agentId, size }: { agentId?: AgentId; size: number }): React.JSX.Element | null {
+ const plan = brandPulsePlan(agentId, size)
+ if (!plan) return null
+ // Grok keeps carrying the class on the <svg> itself — no wrapper — so its `currentColor` fill and
+ // its drop-shadow bloom resolve exactly as they did before the class was generalized.
+ if (plan.kind === 'inline') return <GrokMark size={plan.size} className={BRAND_PULSE_CLASS} />
+ return (
+ <span className={BRAND_PULSE_CLASS} aria-hidden style={{ display: 'block', lineHeight: 0 }}>
+ <img src={plan.src} width={plan.size} height={plan.size} alt="" style={{ display: 'block' }} />
+ </span>
+ )
+}
+
export function AgentIcon({ agentId, size = 16 }: { agentId: AgentId; size?: number }): React.JSX.Element {
if (agentId === 'grok') return <GrokMark size={size} />
const src = AGENT_LOGO[agentId]
diff --git a/src/renderer/lib/brandPulse.test.tsx b/src/renderer/lib/brandPulse.test.tsx
new file mode 100644
index 000000000..4fe92115a
--- /dev/null
+++ b/src/renderer/lib/brandPulse.test.tsx
@@ -0,0 +1,166 @@
+// @vitest-environment jsdom
+import { act } from 'react'
+import { createRoot } from 'react-dom/client'
+import { readFileSync } from 'node:fs'
+import { join } from 'node:path'
+import { describe, expect, it } from 'vitest'
+import {
+ BRAND_PULSE_CLASS,
+ HUD_BRAND_PULSE_CLASS,
+ brandPulseBackground,
+ brandPulsePlan,
+ hasBrandLogo
+} from './brandPulse'
+import { BrandPulse } from './agentIcons'
+
+;(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true
+
+/**
+ * The working indicator for agents that have a brand mark but no mascot art.
+ *
+ * The DECISION ("does this agent get a pulsing mark, and which glyph?") is the pure
+ * `brandPulsePlan`, because it has two consumers with nothing in common: the React canvas badge and
+ * the notch HUD, which builds DOM imperatively and must stay React-free. Testing the plan tests
+ * both surfaces at once; the two thin renderers on top of it are checked separately below.
+ */
+describe('brandPulsePlan', () => {
+ it('gives gemini and opencode their own asset mark', () => {
+ for (const agentId of ['gemini', 'opencode'] as const) {
+ const plan = brandPulsePlan(agentId, 16)
+ expect(plan, agentId).toEqual({ kind: 'asset', src: expect.any(String), size: 16 })
+ // A real, non-empty URL — an asset import that silently resolved to '' would render an
+ // invisible box, which is worse than the dot it replaced.
+ expect(plan?.kind === 'asset' && plan.src.length, agentId).toBeGreaterThan(0)
+ }
+ })
+
+ it('keeps grok on its INLINE mark, not an asset', () => {
+ // Grok's mark is a single monochrome path drawn in `currentColor`; loading it through `<img>`
+ // would paint it black and lose it on the dark theme. This is the pre-existing behaviour the
+ // generalized pulse must not change.
+ expect(brandPulsePlan('grok', 16)).toEqual({ kind: 'inline', size: 16 })
+ })
+
+ it('answers nothing for an agent with no mark, so the caller falls back to the dot', () => {
+ expect(brandPulsePlan('custom:abc', 16)).toBeNull()
+ expect(brandPulsePlan(undefined, 16)).toBeNull()
+ })
+
+ it('passes the caller\'s size through, because the two surfaces draw at different heights', () => {
+ // Canvas badge 16px (level with claude's critter), notch strip 13px (level with the sprites).
+ expect(brandPulsePlan('gemini', 13)?.size).toBe(13)
+ expect(brandPulsePlan('grok', 13)?.size).toBe(13)
+ })
+})
+
+describe('brandPulseBackground', () => {
+ // Measured, not assumed: with `url(${src})` the CSS parser rejected the declaration for ALL FOUR
+ // marks (backgroundImage came back ''), because Vite inlines them as data URIs carrying literal
+ // `'` and, for three of them, literal `(`/`)`. The notch strip would have shown an empty box.
+ it('survives a real CSS parser for every mark', () => {
+ for (const agentId of ['claude', 'codex', 'gemini', 'opencode'] as const) {
+ const plan = brandPulsePlan(agentId, 13)
+ const src = plan?.kind === 'asset' ? plan.src : ''
+ const el = document.createElement('span')
+ el.style.backgroundImage = brandPulseBackground(src)
+ expect(el.style.backgroundImage.length, agentId).toBeGreaterThan(0)
+ }
+ })
+
+ it('is what the raw form is not — proof the quoting is the load-bearing part', () => {
+ const plan = brandPulsePlan('opencode', 13)
+ const src = plan?.kind === 'asset' ? plan.src : ''
+ expect(src).toMatch(/[()]/) // the inner parens that break an unquoted url()
+ const bare = document.createElement('span')
+ bare.style.backgroundImage = `url(${src})`
+ expect(bare.style.backgroundImage).toBe('')
+ })
+})
+
+describe('hasBrandLogo', () => {
+ it('counts grok, which is inlined rather than shipped as an asset', () => {
+ // The trap this predicate exists to close: `agentId in AGENT_LOGO` is false for grok.
+ expect(hasBrandLogo('grok')).toBe(true)
+ })
+
+ it('counts the four asset marks and nothing else', () => {
+ for (const agentId of ['claude', 'codex', 'gemini', 'opencode'] as const) {
+ expect(hasBrandLogo(agentId), agentId).toBe(true)
+ }
+ expect(hasBrandLogo('custom:abc')).toBe(false)
+ })
+})
+
+describe('BrandPulse', () => {
+ const renderPulse = (agentId: string): HTMLElement => {
+ const host = document.createElement('div')
+ const root = createRoot(host)
+ act(() => root.render(<BrandPulse agentId={agentId} size={16} />))
+ return host
+ }
+
+ it('marks an asset agent with the pulse class and draws its logo', () => {
+ const host = renderPulse('gemini')
+ const el = host.querySelector(`.${BRAND_PULSE_CLASS}`)
+ expect(el).not.toBeNull()
+ expect(el?.querySelector('img')?.getAttribute('src')).toBeTruthy()
+ })
+
+ it('draws grok as the inline SVG carrying the pulse class itself', () => {
+ // Byte-for-byte the pre-rename DOM shape: the class sits ON the <svg>, with no wrapper, so the
+ // `currentColor` fill and the drop-shadow bloom resolve exactly as they did.
+ const host = renderPulse('grok')
+ const svg = host.querySelector('svg')
+ expect(svg?.getAttribute('class')).toBe(BRAND_PULSE_CLASS)
+ expect(svg?.getAttribute('fill')).toBe('currentColor')
+ expect(host.querySelector('img')).toBeNull()
+ })
+
+ it('renders nothing for an agent with no mark', () => {
+ expect(renderPulse('custom:abc').firstChild).toBeNull()
+ })
+})
+
+describe('the pulse classes exist in both stylesheets', () => {
+ // The class names are strings on one side and selectors on the other, so a rename can only be
+ // half-done. Nothing else would notice: a missing selector loses the animation silently.
+ const CANVAS_CSS = readFileSync(join(__dirname, '..', 'styles.css'), 'utf8')
+ const HUD_CSS = readFileSync(join(__dirname, '..', 'hud', 'hud.css'), 'utf8')
+
+ it('the canvas badge class is styled and animated', () => {
+ expect(CANVAS_CSS).toContain(`.${BRAND_PULSE_CLASS} {`)
+ expect(CANVAS_CSS).toContain('@keyframes mascot-pulse-brand')
+ })
+
+ it('the notch strip class is styled and animated', () => {
+ const hudClass = HUD_BRAND_PULSE_CLASS.split(' ').at(-1)
+ expect(HUD_CSS).toContain(`.${hudClass} {`)
+ expect(HUD_CSS).toContain('@keyframes mascot-pulse-brand')
+ })
+
+ it('leaves no agent-specific name behind, since the animation is now shared', () => {
+ for (const css of [CANVAS_CSS, HUD_CSS]) {
+ expect(css).not.toContain('mascot--grok')
+ expect(css).not.toContain('mascot-pulse-grok')
+ }
+ })
+
+ it('still freezes at the LIT end of the cycle for reduced motion', () => {
+ // A working node must read as awake, not dimmed — the frozen frame is opacity 1, not 0.55.
+ // styles.css has several reduced-motion blocks, so pick the one that names the pulse class
+ // rather than the first one in the file.
+ for (const [css, cls] of [
+ [CANVAS_CSS, BRAND_PULSE_CLASS],
+ [HUD_CSS, HUD_BRAND_PULSE_CLASS.split(' ').at(-1) as string]
+ ] as const) {
+ const blocks = css
+ .split('@media (prefers-reduced-motion: reduce)')
+ .slice(1)
+ .map((rest) => rest.slice(0, rest.indexOf('}\n}') + 3))
+ const block = blocks.find((b) => b.includes(`.${cls}`))
+ expect(block, cls).toBeTruthy()
+ expect(block).toContain('opacity: 1')
+ expect(block).toContain('drop-shadow(0 0 1px currentColor)')
+ }
+ })
+})
diff --git a/src/renderer/lib/brandPulse.ts b/src/renderer/lib/brandPulse.ts
new file mode 100644
index 000000000..c8084b8c9
--- /dev/null
+++ b/src/renderer/lib/brandPulse.ts
@@ -0,0 +1,84 @@
+// The brand marks, and the decision of when one of them IS an agent's working indicator.
+//
+// This module is deliberately REACT-FREE, like lib/grokMark.ts and lib/mascot.ts: the notch HUD
+// (hud/main.ts) builds its DOM imperatively and must not pull React into its bundle, yet it needs
+// the exact same answer the canvas badge needs. So the decision lives here as a pure function, and
+// each surface keeps its own thin renderer on top of it (`BrandPulse` in agentIcons.tsx for React,
+// `workingMascot` in hud/main.ts for plain DOM).
+
+import type { AgentId } from '@shared/agents/config'
+import claudeIcon from '../assets/claude.svg'
+import codexIcon from '../assets/codex-color.svg'
+import geminiIcon from '../assets/gemini-color.svg'
+import opencodeIcon from '../assets/opencode.svg'
+
+// Brand logo per builtin agent; custom/unknown agents have none (callers fall back to the terminal
+// glyph, or to the plain pulsing dot).
+//
+// These four are MULTI-COLOUR marks, so each carries its own fills and is loaded as an `<img src>` /
+// `background-image` (Vite hands us a URL). An SVG loaded that way is an isolated document —
+// `currentColor` has nothing to inherit there, which is why none of these assets uses it. Grok is
+// the exception: its mark is monochrome, so it is inlined from lib/grokMark.ts instead, and is
+// therefore NOT in this map.
+export const AGENT_LOGO: Partial<Record<string, string>> = {
+ claude: claudeIcon,
+ codex: codexIcon,
+ gemini: geminiIcon,
+ opencode: opencodeIcon
+}
+
+/** Does this agent have a brand mark to draw? grok is inlined rather than an asset, so it is not in
+ * AGENT_LOGO — ask through here rather than testing that map directly. */
+export const hasBrandLogo = (agentId: AgentId): boolean => agentId === 'grok' || agentId in AGENT_LOGO
+
+/** Canvas RUNNING-badge class (styles.css). */
+export const BRAND_PULSE_CLASS = 'term-node__mascot--pulse'
+/** Notch-strip class (hud/hud.css) — the sprite base class plus the pulse. */
+export const HUD_BRAND_PULSE_CLASS = 'mascot mascot--pulse'
+
+/**
+ * How to draw an agent's mark as its working indicator: `inline` = an SVG element built from
+ * lib/grokMark.ts (monochrome, painted in `currentColor`), `asset` = the brand file at `src`.
+ */
+export type BrandPulsePlan =
+ | { kind: 'inline'; size: number }
+ | { kind: 'asset'; src: string; size: number }
+
+/**
+ * An agent's own brand mark as its working indicator — pulsing with a bloom instead of walking.
+ *
+ * This is the pattern grok arrived at after a hand-drawn quadrant critter was rejected: standing
+ * next to two real mascots (claude's painted blob, codex's pet) an invented creature read as
+ * neither, so the glyph the agent actually has is what animates. gemini and opencode were falling
+ * through to the plain dot, which says "something is happening" but not WHO.
+ *
+ * Returns null when the agent has no mark (custom agents, plain terminals), so the caller falls back
+ * to that dot rather than rendering an empty box. It does NOT know which agents have mascot art:
+ * claude and codex have marks too, and their sprite branches come FIRST in each surface's
+ * dispatcher, next to the spritesheet geometry they need.
+ *
+ * A caveat worth knowing: the bloom is a `drop-shadow` of the element's `color`, which is exactly
+ * right for a MONOCHROME mark painted in `currentColor` (grok) and approximate for the multi-colour
+ * assets — gemini's gradient mark and codex's white one bloom in the label colour, not their own
+ * ink. That is accepted: the halo reads as a glow either way, and per-mark bloom colours would mean
+ * an ink table.
+ */
+export function brandPulsePlan(agentId: AgentId | undefined, size: number): BrandPulsePlan | null {
+ if (!agentId || !hasBrandLogo(agentId)) return null
+ if (agentId === 'grok') return { kind: 'inline', size }
+ const src = AGENT_LOGO[agentId]
+ return src ? { kind: 'asset', src, size } : null
+}
+
+/**
+ * An asset mark as a CSS `background-image` value, for the surface that paints instead of using an
+ * `<img>` (the notch HUD).
+ *
+ * The quotes are load-bearing, and measured: Vite INLINES these small brand SVGs as
+ * `data:image/svg+xml,…` URIs, and the encoded markup carries literal `'` (every mark) and literal
+ * `(`/`)` (gemini, opencode, codex — `url(%23mask…)` for their gradient/clip refs). An unquoted
+ * `url(…)` therefore terminates at the first inner `)`, the whole declaration is REJECTED, and the
+ * indicator silently paints nothing at all. The React path is unaffected — an `<img src>` is an
+ * attribute, not a CSS value — so this trap only exists here.
+ */
+export const brandPulseBackground = (src: string): string => `url("${src}")`
diff --git a/src/renderer/nodes/AgentMascot.tsx b/src/renderer/nodes/AgentMascot.tsx
index f2076100b..f5f506fcb 100644
--- a/src/renderer/nodes/AgentMascot.tsx
+++ b/src/renderer/nodes/AgentMascot.tsx
@@ -1,22 +1,23 @@
import type { CSSProperties } from 'react'
import type { AgentId } from '@shared/agents/config'
import { CLAUDE_MASCOT, CODEX_MASCOT } from '../lib/mascot'
-import { GrokMark } from '../lib/agentIcons'
+import { BrandPulse, hasBrandLogo } from '../lib/agentIcons'
import codexPet from '../assets/pet-codex.webp'
-/** Grok's badge glyph height, matched to CLAUDE_FRAME_HEIGHT so the two sit on one baseline. */
-const GROK_BADGE_SIZE = 16
+/** Brand-mark glyph height, matched to CLAUDE_FRAME_HEIGHT so every indicator sits on one baseline. */
+const BRAND_BADGE_SIZE = 16
/**
* The walking mascot shown inside the RUNNING badge (docs/mascot-sprites.md):
* - claude → the runtime-drawn coral pixel critter (data-URI spritesheet; the walk is CSS
* `steps(1)` over three keyframes, NOT `steps(2)` — see .term-node__mascot--claude).
- * - grok → its own BRAND MARK, pulsing and blooming rather than walking. It had a quadrant
- * critter first; a hand-drawn creature next to two real mascots read as neither, so the glyph
- * grok actually has is what animates. `currentColor` + a `drop-shadow` bloom keeps that legible
- * in both themes without picking an ink (see .term-node__mascot--grok).
* - codex → pet-codex.webp, first-row walk cycle (CSS `steps(8)`).
- * - anything else (gemini/opencode/custom/plain) → the plain pulsing dot, unchanged.
+ * - grok / gemini / opencode → their own BRAND MARK, pulsing and blooming rather than walking. Grok
+ * had a quadrant critter first; a hand-drawn creature next to two real mascots read as neither, so
+ * the glyph the agent actually has is what animates. gemini and opencode used to fall through to
+ * the plain dot, which says "something is happening" but not WHO. The decision and the bloom's
+ * caveat live in lib/brandPulse.ts, which the notch HUD shares.
+ * - anything else (custom agents, plain terminals) → the plain pulsing dot, unchanged.
*
* Animation is pure CSS (see .term-node__mascot* in styles.css) — no JS timers, so a canvas
* full of RUNNING terminals costs nothing per node. Dimensions come from lib/mascot.ts so the
@@ -32,12 +33,6 @@ export function AgentMascot({ agentId }: { agentId?: AgentId }): React.JSX.Eleme
return <span className="term-node__mascot term-node__mascot--claude" style={style} aria-hidden />
}
- if (agentId === 'grok') {
- // The badge's own glyph, not a sprite — so there is no spritesheet, no frame geometry and
- // nothing that can desync from lib/mascot.ts. Sized to sit level with claude's 16px-tall critter.
- return <GrokMark size={GROK_BADGE_SIZE} className="term-node__mascot--grok" />
- }
-
if (agentId === 'codex') {
const style = {
'--cmascot-w': `${CODEX_MASCOT.frameWidth}px`,
@@ -49,6 +44,18 @@ export function AgentMascot({ agentId }: { agentId?: AgentId }): React.JSX.Eleme
return <span className="term-node__mascot term-node__mascot--codex" style={style} aria-hidden />
}
- // Every other agent keeps the original pulsing dot.
+ // The mascot-less builtins pulse their own brand mark instead of a critter. Sprites are matched
+ // first, above: claude and codex have marks too, and their art wins. Gated on the predicate rather
+ // than on `<BrandPulse/> !== null`, because a JSX element is truthy even for a component that
+ // renders nothing.
+ //
+ // Note the one knock-on: claude's branch needs a runtime-drawn spritesheet, and when that cannot be
+ // built (no `document` — SSR/tests) it now lands HERE, on claude's own mark, instead of on the bare
+ // dot. That is a strictly better fallback and never happens in the real renderer.
+ if (agentId && hasBrandLogo(agentId)) {
+ return <BrandPulse agentId={agentId} size={BRAND_BADGE_SIZE} />
+ }
+
+ // Custom agents and plain terminals have no mark: the original pulsing dot, unchanged.
return <span className="term-node__status-dot" />
}
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index 8a1db23f1..4e027289d 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -1320,16 +1320,19 @@ body,
animation: mascot-walk-claude 0.8s steps(1) infinite;
}
-/* Grok has no critter: its RUNNING indicator is the brand mark itself, breathing. Deliberately NOT
- a sprite — the glyph is an inline SVG painted in `currentColor`, so the bloom is a drop-shadow of
- that same colour and needs no ink of its own. That is what makes it correct in both themes: the
- halo is light-on-dark and dark-on-light, exactly like the mark. A fixed glow colour would have
- vanished into one of the two backgrounds. */
-.term-node__mascot--grok {
- animation: mascot-pulse-grok 1.6s ease-in-out infinite;
-}
-
-@keyframes mascot-pulse-grok {
+/* Grok, gemini and opencode have no critter: their RUNNING indicator is the brand mark itself,
+ breathing. Deliberately NOT a sprite. For grok the glyph is an inline SVG painted in
+ `currentColor`, so the bloom is a drop-shadow of that same colour and needs no ink of its own —
+ that is what makes it correct in both themes: the halo is light-on-dark and dark-on-light, exactly
+ like the mark. A fixed glow colour would have vanished into one of the two backgrounds. The other
+ two are multi-colour ASSETS wrapped in a span, so their bloom is the badge's label colour rather
+ than their own ink — approximate, accepted, and cheaper than an ink table (see lib/brandPulse.ts).
+ Agent-neutral by design: no rule below names an agent. */
+.term-node__mascot--pulse {
+ animation: mascot-pulse-brand 1.6s ease-in-out infinite;
+}
+
+@keyframes mascot-pulse-brand {
0%,
100% {
opacity: 0.55;
@@ -1344,9 +1347,9 @@ body,
}
/* Same contract the presence chip follows: motion is decoration, the state must still read without
- it. Frozen at the lit end of the cycle, so a working grok node looks awake rather than dimmed. */
+ it. Frozen at the lit end of the cycle, so a working node looks awake rather than dimmed. */
@media (prefers-reduced-motion: reduce) {
- .term-node__mascot--grok {
+ .term-node__mascot--pulse {
animation: none;
opacity: 1;
filter: drop-shadow(0 0 1px currentColor);