Repository navigation
Description
What happens
Agents added to config/agents.json after the initial ship — Hermes, Pi, Amp, Fx (Factory), Qwen, Grok — show the TerminalSquare fallback glyph instead of their logo across the UI (NewSessionMenu, AgentTabs, DynamicIsland, Automations, BroadcastDialog, etc.). The original nine (agy, claude, cline, codex, copilot, cursor, gemini, goose, opencode) render correctly.
Root cause
Icons for the later-added agents were only committed to config/agent-icons/ in the repo. They were never:
- Copied into
src/assets/agent-icons/(the Vite-imported bundle directory). - Registered in
ICON_ASSETSinsrc/lib/agentRegistry.ts:30-40.
The manifest field "icon" for these agents is a filename (e.g. "hermes.svg", "amp.svg"), whereas the original nine use a plain key (e.g. "claude", "gemini"). agentRegistry.ts handles the two shapes differently:
- Plain key → resolved via
ICON_ASSETS[icon]→ Vite-imported SVG data URL, bundled into the app, works offline instantly. - Filename → falls through
remoteIconUrl()→https://cdn.jsdelivr.net/gh/tempestai-dev/tempest@main/config/agent-icons/<filename>→ fetched at runtime, cached tolocalStorageundertempest-agent-icon:<id>.
So the later icons only render when all of the following hold:
- Network is available on first launch (or later, when the manifest fetch retries).
- jsDelivr has cached the file for
@main(can lag hours after commit). - The
fetch()inremoteAgents.ts:32succeeds and the blob is ≤512 KB. localStoragewrite succeeds (setIconDataUrl).
Any failure at first launch, and the icon stays as the TerminalSquare fallback until a subsequent successful fetch. Users behind restrictive networks, offline first-runs, or before jsDelivr propagation see no logos for the newer agents.
Steps to reproduce
- Open Tempest 0.1.22 with cleared localStorage (or a fresh install with no network).
- Open the NewSessionMenu — the newer agents render with
TerminalSquareinstead of their logo. localStorage.getItem('tempest-agent-icon:hermes')(orpi,amp,fx,qwen,grok) returnsnull.- Compare with Claude/Codex/etc. which render from bundled SVGs immediately, regardless of network.
Fix
Treat the newer icons the same way as the original nine — bundle them:
- Copy
hermes.svg,pi.svg,amp.svg,fx.svg,qwen.svg,grok.svgfromconfig/agent-icons/tosrc/assets/agent-icons/. - Add each as an import at the top of
src/lib/agentRegistry.ts. - Register in
ICON_ASSETS— key must match the manifest'siconfield. - Either:
- Change
config/agents.jsoniconvalues to plain keys ("hermes"instead of"hermes.svg"), or - Keep the filenames as keys in
ICON_ASSETS(map"hermes.svg"→hermesSrc). Less clean, avoids touching the signed manifest.
- Change
Once bundled, they render instantly, offline, on first launch — same guarantee as the original nine. The jsDelivr fallback stays for any FUTURE agents that ship via signed remote manifest between releases.
Follow-up
Add a build-time check in scripts/ that greps every "icon" value in config/agents.json and asserts either (a) it's a key in ICON_ASSETS, or (b) the corresponding file exists in config/agent-icons/. Prevents the same drift on the next new agent.
Tempest version
0.1.22
Operating system
All
Activity
fix(agents): bundle hermes/pi/amp/fx/qwen/grok icons