Skip to content

make custom gloopies reusable across agents - #165

Merged
morgmart merged 3 commits into
mainfrom
morganm/gloopie-library
Aug 22, 2026
Merged

make custom gloopies reusable across agents#165
morgmart merged 3 commits into
mainfrom
morganm/gloopie-library

Conversation

@morgmart

Copy link
Copy Markdown
Collaborator

Category: improvement
User Impact: Custom gloopies now appear first in the Gloopies collection and can be reused across agents.
Problem: Custom animated gloopies were stored as attachments to individual agents, so they disappeared from reach after avatar changes and could not be selected for another agent.
Solution: Treat generated gloopies as durable local avatar-library assets, merge them into the existing Gloopies collection, and keep their lifecycle and identity independent from any one agent.

File changes

src-tauri/src/commands/avatars.rs
Enumerates valid local gloopie manifests into avatar-library snapshots, preserves newest-first ordering, and emits a library-change event after successful writes.

src/features/agents/hooks/tests/useAvatarLibrary.test.tsx
Covers startup loading, live invalidation, post-subscription reconciliation, and separation of custom media from bundled media.

src/features/agents/hooks/tests/usePersonas.test.ts
Updates lifecycle expectations so changing or deleting an agent preserves its gloopie in the library.

src/features/agents/hooks/useAvatarLibrary.ts
Loads custom gloopie IDs and media into a separate namespace and subscribes to both catalog and user-library invalidations.

src/features/agents/hooks/usePersonas.ts
Removes agent-owned garbage collection because custom gloopies are durable library assets.

src/features/agents/lib/avatarLibraryView.test.ts
Protects explicit collection-cover behavior and verifies equal bare IDs remain distinct across custom and bundled namespaces.

src/features/agents/lib/avatarLibraryView.ts
Builds the shared picker/gallery model, prepending custom gloopies and selecting the newest custom gloopie as the Gloopies cover.

src/features/agents/ui/AgentBuilderRail.tsx
Accepts full avatar references from the picker so agent creation can persist either bundled or custom avatars.

src/features/agents/ui/AgentDetailPage.tsx
Treats both bundled and custom refs as library selections and persists the full selected reference during editing.

src/features/agents/ui/AgentImageImportDialog.tsx
Preserves successfully imported gloopies even when subsequent agent creation fails.

src/features/agents/ui/AvatarCollectionOverlay.tsx
Renders the merged collection model and uses full refs for layout, hover, readiness, and selection identity.

src/features/agents/ui/AvatarLibraryPicker.tsx
Shows custom gloopies first in the existing collection and returns complete persisted refs when selected.

src/features/agents/ui/tests/AgentBuilderRail.test.tsx
Updates avatar-library fixtures for the separated custom-media state.

src/features/agents/ui/tests/AgentImageImportDialog.test.tsx
Verifies a failed agent import does not delete the committed gloopie.

src/features/agents/ui/tests/AgentsView.entry.test.tsx
Updates shared avatar-library fixtures for the new state contract.

src/features/agents/ui/tests/AvatarCollectionOverlay.test.tsx
Verifies overlay selection emits complete persisted references.

src/features/agents/ui/tests/AvatarLibraryPicker.test.tsx
Covers no-custom behavior, custom-first ordering, custom cover presentation, and custom selection.

src/shared/api/avatars.ts
Adds the renderer subscription for user-avatar-library changes.

src/shared/avatars/catalog.ts
Defines user-library constants and helpers for identifying library-owned avatar refs.

src/shared/i18n/locales/en/agents.json
Adds the English accessible label for custom gloopies.

src/shared/i18n/locales/es/agents.json
Adds the Spanish accessible label for custom gloopies.

Validation

  • just check
  • just tauri-check
  • 123 focused Vitest tests across avatar APIs, library state, picker/gallery surfaces, imports, and persona lifecycle

@morgmart
morgmart requested a review from a team August 21, 2026 22:27
johnmatthewtennant
johnmatthewtennant approved these changes Aug 22, 2026
@morgmart
morgmart merged commit 5c6a69d into main Aug 22, 2026
9 checks passed
@morgmart
morgmart deleted the morganm/gloopie-library branch August 22, 2026 06:40
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.

2 participants