From 68f4ee49c170f4aae7329b91fa5acec39edc589f Mon Sep 17 00:00:00 2001 From: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co> Date: Wed, 24 Jun 2026 00:02:23 -0700 Subject: [PATCH] refactor(avatars): drop dead runtimeAvatar allowlist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runtimeAvatar.ts was a hardcoded allowlist of 4 known runtime avatar URLs (goose-docs, claude-code, chatgpt, buzz-agent) behind isKnownRuntimeAvatarUrl. It is dead on arrival: grepping the whole tree (desktop/mobile/web/tests) turns up zero consumers. The live Rust avatar path does not use it either — its runtime fallback is managed_agent_avatar_url (discovery.rs:570), a separate mechanism. This is a parallel, never-wired re-implementation of an idea the real code already handles elsewhere — another fragment of the never-built selectable-avatar-sets vision, same family as the app-avatar: orphan removed in #1235. Grew out of the #1202 avatar-plumbing review. See #1132 for the breadcrumb to re-add selectable avatar sets, where a real runtime-avatar registry would be wired up alongside the resolver. Co-authored-by: Taylor Ho Signed-off-by: Taylor Ho --- desktop/src/shared/lib/runtimeAvatar.ts | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 desktop/src/shared/lib/runtimeAvatar.ts diff --git a/desktop/src/shared/lib/runtimeAvatar.ts b/desktop/src/shared/lib/runtimeAvatar.ts deleted file mode 100644 index 3be2f3412..000000000 --- a/desktop/src/shared/lib/runtimeAvatar.ts +++ /dev/null @@ -1,13 +0,0 @@ -const RUNTIME_AVATAR_URLS = new Set([ - "https://goose-docs.ai/img/logo_dark.png", - "https://anthropic.gallerycdn.vsassets.io/extensions/anthropic/claude-code/2.1.77/1773707456892/Microsoft.VisualStudio.Services.Icons.Default", - "https://openai.gallerycdn.vsassets.io/extensions/openai/chatgpt/26.5313.41514/1773706730621/Microsoft.VisualStudio.Services.Icons.Default", - "https://raw.githubusercontent.com/block/buzz/refs/heads/main/crates/buzz-agent/buzz-agent.png", -]); - -export function isKnownRuntimeAvatarUrl( - avatarUrl: string | null | undefined, -): boolean { - const trimmed = avatarUrl?.trim(); - return trimmed ? RUNTIME_AVATAR_URLS.has(trimmed) : false; -}