Skip to content

refactor(avatars): drop dead runtimeAvatar allowlist#1236

Merged
tellaho merged 1 commit into
kennylopez-agent-avatar-plumbingfrom
tho/drop-dead-runtime-avatar
Jun 24, 2026
Merged

refactor(avatars): drop dead runtimeAvatar allowlist#1236
tellaho merged 1 commit into
kennylopez-agent-avatar-plumbingfrom
tho/drop-dead-runtime-avatar

Conversation

@tellaho

@tellaho tellaho commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Overview

Category: improvement
User Impact: None — removes never-wired dead code; no behavior change.
Problem: desktop/src/shared/lib/runtimeAvatar.ts is a hardcoded allowlist of 4 runtime avatar URLs (goose-docs, claude-code, chatgpt, buzz-agent) behind isKnownRuntimeAvatarUrl. 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 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 — another fragment of the never-built selectable-avatar-sets vision, same family as the app-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 is managed_agent_avatar_url in Rust, not this.

Reproduction Steps

  1. On the branch, grep for residuals: rg "runtimeAvatar|isKnownRuntimeAvatarUrl|RUNTIME_AVATAR_URLS" — returns nothing.
  2. Run suites: typecheck, lint, desktop-test, desktop-tauri-test, rust-tests — all green.
  3. Confirm the live runtime fallback still flows through 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.

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>
@tellaho tellaho marked this pull request as ready for review June 24, 2026 07:08
@tellaho tellaho merged commit 5cbdf9e into kennylopez-agent-avatar-plumbing Jun 24, 2026
18 checks passed
@tellaho tellaho deleted the tho/drop-dead-runtime-avatar branch June 24, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant