refactor(avatars): drop dead runtimeAvatar allowlist#1236
Merged
tellaho merged 1 commit intoJun 24, 2026
Conversation
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 <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Category: improvement
User Impact: None — removes never-wired dead code; no behavior change.
Problem:
desktop/src/shared/lib/runtimeAvatar.tsis a hardcoded allowlist of 4 runtime avatar URLs (goose-docs, claude-code, chatgpt, buzz-agent) behindisKnownRuntimeAvatarUrl. It's dead on arrival: grepping the whole tree (desktop/mobile/web/tests) turns up zero consumers. The live Rust avatar path doesn't use it either — its runtime fallback ismanaged_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 — another fragment of the never-built selectable-avatar-sets vision, same family as theapp-avatar:orphan removed in #1235.Solution: Delete the orphaned file so the codebase stays honest. Nothing imports it, so there's no live path to touch.
This cut grew out of the #1202 avatar-plumbing review.
Changes
File changes
desktop/src/shared/lib/runtimeAvatar.ts (deleted)
The whole dead allowlist module (
RUNTIME_AVATAR_URLS+isKnownRuntimeAvatarUrl). Zero importers; the live runtime fallback ismanaged_agent_avatar_urlin Rust, not this.Reproduction Steps
rg "runtimeAvatar|isKnownRuntimeAvatarUrl|RUNTIME_AVATAR_URLS"— returns nothing.managed_agent_avatar_url(discovery.rs:570), untouched by this delete.Re-adding later
See #1132 for the breadcrumb. When selectable avatar sets land, a real runtime-avatar registry gets wired up alongside the resolver — this allowlist would be rebuilt as part of that, not before it.