refactor(avatars): drop orphaned app-avatar: symbolic-ref machinery#1235
Merged
tellaho merged 1 commit intoJun 24, 2026
Merged
Conversation
The app-avatar:<id> symbolic pointer was meant to power curated, selectable avatar sets — users pick an agent avatar by symbolic ID instead of baking in one-off URLs. But the resolver half was never built / was removed in #1132 (the goose-set collections). What survived was only the parsing + plumbing half: parseGooseAppAvatarId was only ever called by its own validators, and no id->image map existed anywhere. The machinery stored and round-tripped an ID that nothing could render. This removes that orphaned plumbing: - delete the gooseAppAvatarRefs module (parser + validators + tests) - collapse the profile/hooks.ts skip-fetch guard to a plain snapshot - inline personaDialogState.ts import resolution to keep persistable http(s):/data:/blob: URLs only (byte-for-byte identical branch; symbolic refs now drop instead of round-trip — intended, nothing renders them) - retire the dead app-avatar: vocabulary in Rust test fixtures The Rust avatar_ref field stays: it is a generic opaque carrier of the avatar: frontmatter value (it holds real URLs), not specific to app-avatar:. See #1132 for the breadcrumb to re-add selectable avatar sets — that is where the resolver + picker UI should be rebuilt alongside this plumbing. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This was referenced Jun 24, 2026
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: No user-facing change — this removes dead internal plumbing for an avatar feature that was never finished, keeping the codebase honest.
Problem: The
app-avatar:<id>symbolic pointer was meant to power curated, selectable avatar sets — letting users pick an agent avatar by symbolic ID instead of baking in one-off URLs. That's the right primitive, but the resolver half was never built / was removed in #1132 (the goose-set collections). What survived was only the parsing + plumbing half:parseGooseAppAvatarIdwas only ever called by its own validators, and there's no id→image map anywhere in the tree. The machinery stored and round-tripped an ID that nothing could render — a half-bridge to nowhere that added two special-case branches for a capability that doesn't ship.Solution: Remove the orphaned parsing/plumbing module and collapse its two call sites back to their simple paths. The live persistable-URL import branch is preserved byte-for-byte, so real avatar URLs are untouched; only the dead symbolic-ref handling is dropped. The generic
avatar_refRust field stays — it's an opaque carrier of real URLs, not specific toapp-avatar:.This spike grew out of the #1202 avatar-plumbing review.
Changes
File changes
desktop/src/shared/avatars/gooseAppAvatarRefs.ts
Deleted the entire parser/validators module (
parseGooseAppAvatarId,isGooseAppAvatarRef,toGooseAppAvatarRef). It was an orphan — only ever called by its own validators, with no resolver anywhere to turn an ID into an image.desktop/src/shared/avatars/gooseAppAvatarRefs.test.mjs
Deleted alongside the module it covered.
desktop/src/features/profile/hooks.ts
Collapsed the skip-fetch guard from
isGooseAppAvatarRef(url) ? null : getAvatarSnapshotUrl(url)to a plaingetAvatarSnapshotUrl(url). Symbolic refs no longer dodge the snapshot path — nothing ships them anymore, so there's no live regression.desktop/src/features/agents/ui/personaDialogState.ts
Inlined a local
resolveImportedPersonaAvatarUrl+isPersistableAvatarUrl. The persistable-URL branch is byte-for-byte identical to the old module (same[avatarRef, avatarDataUrl]precedence, same^(?:https?:|data:image/|blob:)regex). Only the deadtoGooseAppAvatarRefkeep-as-is branch is gone; symbolic refs now drop instead of round-trip — intended, since nothing renders them.desktop/src-tauri/src/commands/personas.rs
Retired the dead
app-avatar:vocabulary in test fixtures (swapped to plain https URLs). Parser behavior unchanged —avatar_refstays an opaque passthrough of theavatar:frontmatter value.desktop/src-tauri/src/managed_agents/persona_card_tests.rs
Swapped
app-avatar:fixtures to plain https URLs and renamed dead-term tests. Theavatar_reffield is retained as a generic opaque carrier (it holds real URLs).Reproduction Steps
tho/drop-orphaned-app-avatar-refs(based onkennylopez-agent-avatar-plumbing).app-avatar/GooseAppAvatar— confirm zero residual references.desktop-test,typecheck,lint) and Rust suite (rust-tests,desktop-tauri-test) — all green.http(s):/data:image//blob:avatar URL — it's preserved exactly as before. A persona carrying a symbolicapp-avatar:<id>ref now drops the ref (no renderer existed for it).Re-adding later
See #1132 for the breadcrumb. When selectable avatar sets land, the resolver + id→image registry + picker UI get rebuilt alongside this plumbing.
+43 / −142 across 6 files.