Skip to content

show agent avatars in delegation activity - #278

Merged
tulsi-builder merged 2 commits into
mainfrom
tulsi/agent-delegation-avatars
Sep 3, 2026
Merged

show agent avatars in delegation activity#278
tulsi-builder merged 2 commits into
mainfrom
tulsi/agent-delegation-avatars

Conversation

@tulsi-builder

@tulsi-builder tulsi-builder commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Category: improvement
User Impact: Users can now recognize which agents are working from their avatars in delegation activity and active-agent summaries.
Problem: Delegated work was identified only by text, making parallel agent activity harder to scan and distinguish. Video-only custom avatars also needed a reliable compact representation in macOS WebKit.
Solution: Show agent identity avatars inline in delegation rows and as a capped facepile for active background work, with lifecycle-aware activity derivation, accessible localized labels, resilient static thumbnail capture, and initial fallbacks.

File changes

src/features/chat/ui/AgentIdentityAvatar.tsx
Adds the compact agent identity avatar and active-agent facepile, with canonical persona matching, ambiguity protection, and failed-image fallbacks.

src/features/chat/ui/AgentWorkPanel.tsx
Derives truthful active delegate identities from tool and background-task lifecycles, then shows them beside the previous-steps summary.

src/features/chat/ui/ToolCallAdapter.tsx
Composes delegated-agent avatars into localized tool titles and preserves them when results are hoisted into the header.

src/features/chat/ui/tests/AgentWorkPanel.test.tsx
Covers facepile limits, terminal task handling, and operations that must not be presented as active agent work.

src/features/chat/ui/tests/ToolCallAdapter.test.tsx
Covers inline avatars, localized title placement, ambiguous identity handling, result hoisting, and broken-image recovery.

src/shared/ui/avatar-static-media.tsx
Adds a shared static-thumbnail cache for video-only avatars, including single-decoder ownership, visible-frame verification, retries, timeout recovery, and owner transfer.

src/shared/ui/avatar-static-media.test.tsx
Protects decoder ownership transfer, bounded capture recovery, and never-ready timeout behavior.

src/shared/ui/avatar-visual.tsx
Exposes media load errors so compact identity surfaces can provide a consistent fallback.

src/shared/i18n/locales/en/chat.json
Adds English accessible labels for one or multiple active agents.

src/shared/i18n/locales/es/chat.json
Adds the corresponding Spanish accessible labels.

src/features/design-system/generated/componentManifest.ts
Updates the generated shared-component inventory for the new static avatar media primitive.

Architectural laws

  • Conforms to LAWS/CHAT.md: subagent activity remains visible with its known identity and delegated task, including across failed background-task waits.

Reproduction steps

  1. Run Berd and open or create a chat that delegates work to one or more named agents with configured avatars.
  2. Observe that each delegation row shows the matching agent avatar immediately before the agent name.
  3. Start enough parallel work to reveal the “previous steps” summary and confirm that active agents appear as a capped facepile with an overflow count.
  4. Complete or cancel a background task and confirm that its agent leaves the active facepile.
  5. Delegate to an agent with a video-only custom avatar, such as a generated gloopie, and confirm that an initial appears while loading and is replaced by a static avatar thumbnail.
  6. Verify that unmatched, ambiguous, or failed avatar sources use the agent’s initial rather than showing an incorrect or broken image.

Screenshots / demos

Validated in the macOS Tauri app with a live Queen Bee delegation, including its video-only custom avatar and the active-agent facepile.
Screenshot 2026-09-02 at 1 56 15 PM

@tulsi-builder
tulsi-builder requested a review from a team September 2, 2026 17:55

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

REQUEST_CHANGES: the active-agent lifecycle incorrectly treats a failed wait as task completion. Static review covered all changed flows and supplied GitHub evidence; checks were pending at capture time and remain a separate merge-readiness concern.

Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Comment thread src/features/chat/ui/AgentWorkPanel.tsx Outdated

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

APPROVE: the previously reported failed-wait lifecycle issue is fixed at this head, with a discriminating regression test. Fresh static review of the full exact comparison found no new publishable findings. All supplied GitHub checks completed successfully.

Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Pending checks: 1 check(s) are not complete.

This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.

@tulsi-builder
tulsi-builder merged commit 95d2aa5 into main Sep 3, 2026
10 checks passed
@tulsi-builder
tulsi-builder deleted the tulsi/agent-delegation-avatars branch September 3, 2026 16:52
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