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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(grok): brand logo in the agent menus, walking mascot on the badge and notch
enes28b37165c656
diff --git a/docs/mascot-sprites.md b/docs/mascot-sprites.mdindex 479e0c384..aba481567 100644--- a/docs/mascot-sprites.md+++ b/docs/mascot-sprites.md@@ -28,6 +28,22 @@ Quadrant char → (UL, UR, LL, LR) sub-pixel bits:- **Walk**: frame index = `floor(t × 2.5) % 2` (≈ 2.5 steps/s).- **Bob**: vertical offset alternates with the frame (±0.5–1.5 px scaled to render size).+## Grok mascot (same machinery, original critter)++An ORIGINAL pixel critter — not a brand mark, and deliberately a different silhouette from the+Claude one (narrow head with two antenna pixels that swap sides, wider body, four alternating+feet), on the same 9×3 quadrant grid so the geometry and the walk are shared verbatim:++```+frame 0: "▘ ▐███▌ ▝" / " ▙█████▟ " / " ▘▘ ▝▝ "+frame 1: "▝ ▐███▌ ▘" / " ▙█████▟ " / " ▝▝ ▘▘ "+```++- Color: slate-300 `rgb(203, 213, 225)` — the node color (`#64748b`) is too dark to read at+ 16 px on the black canvas badge and on the notch strip.+- Both sprites go through `buildQuadrantSprite(frames, color)` in `src/renderer/lib/mascot.ts`+ and reuse `CLAUDE_FRAME_WIDTH/HEIGHT`, so they cannot drift on aspect ratio or smoothing.+## Codex pet (spritesheet asset)`pet-codex.webp` (checked into `resources/mascot/` here, `NodeTerm/Resources/Mascot/` on iOS):diff --git a/src/renderer/assets/grok.svg b/src/renderer/assets/grok.svgnew file mode 100644index 000000000..c0b09f145--- /dev/null+++ b/src/renderer/assets/grok.svg@@ -0,0 +1,13 @@+<!--+ PLACEHOLDER — this is NOT the official Grok / xAI mark.++ It is a neutral "G" monogram drawn in this app's own line-icon style (16x16 display, 24x24+ viewBox, 1.8 stroke, round caps — see src/renderer/components/icons.tsx). Replace it with the+ official Grok asset from an official press/brand page, kept at its published proportions, when+ one is available. Do not touch it up into something that resembles the official mark.++ Colour is explicit (slate-500, the same #64748b as AGENT_CONFIG.grok) rather than currentColor,+ because agentIcons.tsx loads this file as a URL into an <img>, where currentColor cannot+ inherit the surrounding text colour (claude.svg / opencode.svg carry explicit colours too).+-->+<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#64748b" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><title>Grok (placeholder monogram)</title><path d="M18 8.6A7 7 0 1 0 18 15.4V12h-4.4"/></svg>diff --git a/src/renderer/hud/hud.css b/src/renderer/hud/hud.cssindex 76b8d7294..df932312e 100644--- a/src/renderer/hud/hud.css+++ b/src/renderer/hud/hud.css@@ -140,7 +140,9 @@ body {image-rendering: pixelated;will-change: background-position, transform;}-.mascot--claude {+/* Claude + Grok share the quadrant-sprite geometry (see lib/mascot.ts) — one rule block. */+.mascot--claude,+.mascot--grok {width: var(--mascot-w);height: var(--mascot-h);background-size: calc(var(--mascot-w) * 2) var(--mascot-h);diff --git a/src/renderer/hud/main.ts b/src/renderer/hud/main.tsindex 6914417eb..0fdec61bd 100644--- a/src/renderer/hud/main.ts+++ b/src/renderer/hud/main.ts@@ -4,7 +4,7 @@// and row clicks to focus the node in nodeterm.import './hud.css'-import { CLAUDE_MASCOT, CODEX_MASCOT, DONE_BLOB } from '../lib/mascot'+import { CLAUDE_MASCOT, CODEX_MASCOT, DONE_BLOB, GROK_MASCOT } from '../lib/mascot'import { orderIndicatorAgents } from './indicator'import codexPet from '../assets/pet-codex.webp'@@ -130,14 +130,19 @@ function reltime(ts: number): string {const HUD_CLAUDE_H = 13const HUD_CODEX_H = 17-function claudeMascot(): HTMLElement {+/** A quadrant-block sprite mascot (claude, grok) — the sizing math is shared so the notch strip+ * and the canvas badge can never disagree about the geometry in lib/mascot.ts. */+function quadrantMascot(+ mascot: { src: string; frameWidth: number; frameHeight: number },+ variant: 'claude' | 'grok'+): HTMLElement {const el = document.createElement('span')- el.className = 'mascot mascot--claude'+ el.className = `mascot mascot--${variant}`const h = HUD_CLAUDE_H- const w = Math.round((h * CLAUDE_MASCOT.frameWidth) / CLAUDE_MASCOT.frameHeight)+ const w = Math.round((h * mascot.frameWidth) / mascot.frameHeight)el.style.setProperty('--mascot-w', `${w}px`)el.style.setProperty('--mascot-h', `${h}px`)- el.style.backgroundImage = `url(${CLAUDE_MASCOT.src})`+ el.style.backgroundImage = `url(${mascot.src})`return el}function codexMascot(): HTMLElement {@@ -153,7 +158,8 @@ function codexMascot(): HTMLElement {return el}function workingMascot(agentId?: string): HTMLElement {- if (agentId === 'claude' && CLAUDE_MASCOT.src) return claudeMascot()+ if (agentId === 'claude' && CLAUDE_MASCOT.src) return quadrantMascot(CLAUDE_MASCOT, 'claude')+ if (agentId === 'grok' && GROK_MASCOT.src) return quadrantMascot(GROK_MASCOT, 'grok')if (agentId === 'codex') return codexMascot()const dot = document.createElement('span')dot.className = 'mascot mascot--dot'diff --git a/src/renderer/lib/agentIcons.tsx b/src/renderer/lib/agentIcons.tsxindex 3cddeed12..ac7034f1b 100644--- a/src/renderer/lib/agentIcons.tsx+++ b/src/renderer/lib/agentIcons.tsx@@ -3,6 +3,7 @@ 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 grokIcon from '../assets/grok.svg'import { IconTerminal } from '../components/icons'// Brand logo per builtin agent; custom/unknown agents fall back to the terminal glyph.@@ -10,7 +11,9 @@ const AGENT_LOGO: Partial<Record<string, string>> = {claude: claudeIcon,codex: codexIcon,gemini: geminiIcon,- opencode: opencodeIcon+ opencode: opencodeIcon,+ // Placeholder monogram, not the official Grok mark — see the comment in assets/grok.svg.+ grok: grokIcon}export function AgentIcon({ agentId, size = 16 }: { agentId: AgentId; size?: number }): React.JSX.Element {diff --git a/src/renderer/lib/mascot.test.ts b/src/renderer/lib/mascot.test.tsindex e9fa1a0a6..4d6923b54 100644--- a/src/renderer/lib/mascot.test.ts+++ b/src/renderer/lib/mascot.test.ts@@ -2,6 +2,8 @@ import { describe, it, expect } from 'vitest'import {CLAUDE_FRAMES,CLAUDE_FRAME_ART,+ GROK_FRAME_ART,+ GROK_MASCOT,SUB_COLS,SUB_ROWS,decodeQuadrant,@@ -86,3 +88,29 @@ describe('walk frames', () => {expect(body0).toEqual(body1)})})++describe('grok mascot', () => {+ it('has two walk frames on the same sub-pixel grid as the others', () => {+ expect(GROK_FRAME_ART).toHaveLength(2)+ for (const frame of GROK_FRAME_ART) {+ const bmp = decodeFrame(frame)+ expect(bmp.width).toBe(SUB_COLS)+ expect(bmp.height).toBe(SUB_ROWS)+ }+ })++ it('alternates the feet, so it walks instead of sliding', () => {+ const [a, b] = GROK_FRAME_ART.map(decodeFrame)+ expect(a.pixels).not.toEqual(b.pixels)+ })++ it("is a DIFFERENT critter from claude's, not a recolor", () => {+ expect(GROK_FRAME_ART[0]).not.toEqual(CLAUDE_FRAME_ART[0])+ })++ it('exposes the geometry the CSS animation needs', () => {+ expect(GROK_MASCOT.frameCount).toBe(2)+ expect(GROK_MASCOT.frameWidth).toBeGreaterThan(0)+ expect(GROK_MASCOT.frameHeight).toBeGreaterThan(0)+ })+})diff --git a/src/renderer/lib/mascot.ts b/src/renderer/lib/mascot.tsindex 18487b2b9..6323a3dc4 100644--- a/src/renderer/lib/mascot.ts+++ b/src/renderer/lib/mascot.ts@@ -6,6 +6,10 @@// load onto an offscreen canvas → a data-URI spritesheet the RUNNING badge steps through with a// pure CSS `steps()` animation (a canvas can hold dozens of terminals — zero per-node JS timers).//+// The Grok critter is the same machinery with a different silhouette and color: its art goes+// through the shared `buildQuadrantSprite` and it reuses Claude's display geometry, so the two+// can never drift apart on aspect ratio or walk timing.+//// Codex uses a real spritesheet asset (pet-codex.webp) imported by the component; here we only// export its frame geometry so the CSS animation and the component agree on the numbers.@@ -87,20 +91,25 @@ export const CLAUDE_FRAME_HEIGHT = 16const RENDER_SUB_W = 4 // 4:8 = 1:2, and 3× the 1.333×2.667 display sub-pixelconst RENDER_SUB_H = 8-function buildClaudeSprite(): string {+/**+ * Paint a spritesheet from decoded quadrant frames (frames side by side, left to right).+ * Extracted from the former `buildClaudeSprite` so a second mascot cannot drift on aspect ratio+ * or smoothing — the two things that make a pixel critter look wrong.+ */+export function buildQuadrantSprite(frames: MascotBitmap[], color: string): string {// Guarded: the pure decode above is unit-tested under vitest's `node` environment, where// there is no DOM. The badge never renders there, so an empty src is harmless.if (typeof document === 'undefined') return ''const frameW = SUB_COLS * RENDER_SUB_Wconst frameH = SUB_ROWS * RENDER_SUB_Hconst canvas = document.createElement('canvas')- canvas.width = frameW * CLAUDE_FRAMES.length+ canvas.width = frameW * frames.lengthcanvas.height = frameHconst ctx = canvas.getContext('2d')if (!ctx) return ''ctx.imageSmoothingEnabled = false- ctx.fillStyle = CORAL- CLAUDE_FRAMES.forEach((frame, f) => {+ ctx.fillStyle = color+ frames.forEach((frame, f) => {const ox = f * frameWfor (let y = 0; y < frame.height; y++) {for (let x = 0; x < frame.width; x++) {@@ -116,12 +125,41 @@ function buildClaudeSprite(): string {/** Claude walk spritesheet (2 frames side by side) + one-frame display dimensions. */export const CLAUDE_MASCOT = {/** data: URI PNG, or '' outside a DOM (tests). */- src: buildClaudeSprite(),+ src: buildQuadrantSprite(CLAUDE_FRAMES, CORAL),frameWidth: CLAUDE_FRAME_WIDTH,frameHeight: CLAUDE_FRAME_HEIGHT,frameCount: CLAUDE_FRAMES.length}+// --- Grok critter ---------------------------------------------------------------------------++/** Slate-300. The node color (#64748b) is too dark to read at 16 px on the black canvas badge and+ * on the notch strip, which is the one thing this sprite has to do. */+export const GROK_COLOR = 'rgb(203, 213, 225)'++/**+ * Grok's two walk frames. A different silhouette from Claude's rounded blob — narrower body with+ * two raised antennae that swap sides between frames, so it bobs as it walks. Composed only from+ * the quadrant characters in QUADRANT_BITS (there is no half-block ▀/▄ in that table).+ */+export const GROK_FRAME_ART: readonly string[][] = [+ ['▘ ▐███▌ ▝', ' ▙█████▟ ', ' ▘▘ ▝▝ '],+ ['▝ ▐███▌ ▘', ' ▙█████▟ ', ' ▝▝ ▘▘ ']+]++/** The two decoded grok walk frames. */+export const GROK_FRAMES: MascotBitmap[] = GROK_FRAME_ART.map(decodeFrame)++/** Grok walk spritesheet — same grid and display geometry as Claude's, so the CSS `steps(2)`+ * walk animation and the HUD sizing math are shared verbatim. */+export const GROK_MASCOT = {+ /** data: URI PNG, or '' outside a DOM (tests). */+ src: buildQuadrantSprite(GROK_FRAMES, GROK_COLOR),+ frameWidth: CLAUDE_FRAME_WIDTH,+ frameHeight: CLAUDE_FRAME_HEIGHT,+ frameCount: GROK_FRAMES.length+}+// --- "Done, unseen" pixel blob (Notch HUD) -------------------------------------------------//// agent-notch draws a shimmering green blob on a 7×7 grid of crisp pixels for a finished-but-diff --git a/src/renderer/nodes/AgentMascot.tsx b/src/renderer/nodes/AgentMascot.tsxindex f201bbf83..9c54cfbd6 100644--- a/src/renderer/nodes/AgentMascot.tsx+++ b/src/renderer/nodes/AgentMascot.tsx@@ -1,11 +1,12 @@import type { CSSProperties } from 'react'import type { AgentId } from '@shared/agents/config'-import { CLAUDE_MASCOT, CODEX_MASCOT } from '../lib/mascot'+import { CLAUDE_MASCOT, CODEX_MASCOT, GROK_MASCOT } from '../lib/mascot'import codexPet from '../assets/pet-codex.webp'/*** The walking mascot shown inside the RUNNING badge (docs/mascot-sprites.md):* - claude → the runtime-drawn coral pixel critter (data-URI spritesheet, CSS `steps(2)` walk).+ * - grok → its own slate critter, same quadrant machinery and walk geometry.* - codex → pet-codex.webp, first-row walk cycle (CSS `steps(8)`).* - anything else (gemini/opencode/custom/plain) → the plain pulsing dot, unchanged.*@@ -23,6 +24,15 @@ export function AgentMascot({ agentId }: { agentId?: AgentId }): React.JSX.Elemereturn <span className="term-node__mascot term-node__mascot--claude" style={style} aria-hidden />}+ if (agentId === 'grok' && GROK_MASCOT.src) {+ const style = {+ '--mascot-w': `${GROK_MASCOT.frameWidth}px`,+ '--mascot-h': `${GROK_MASCOT.frameHeight}px`,+ backgroundImage: `url(${GROK_MASCOT.src})`+ } as CSSProperties+ return <span className="term-node__mascot term-node__mascot--grok" style={style} aria-hidden />+ }+if (agentId === 'codex') {const style = {'--cmascot-w': `${CODEX_MASCOT.frameWidth}px`,diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex d22d19920..8b4187234 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -1313,7 +1313,10 @@ body,/* Claude: coral pixel critter, 2-frame walk (~2.5 steps/s ⇒ 0.8s/cycle) + an alternating bob.steps(1) holds each keyframe's value across its segment, giving two discrete frame+bob states. */-.term-node__mascot--claude {+/* Claude and Grok are both quadrant-block sprites from lib/mascot.ts: same 2-frame sheet, same+ display geometry, so they share one rule block — the numbers must never be forked. */+.term-node__mascot--claude,+.term-node__mascot--grok {width: var(--mascot-w);height: var(--mascot-h);background-size: calc(var(--mascot-w) * 2) var(--mascot-h);