Repository navigation
fix(portal): avatar tiles follow the agent display label in header and sidebar - #4569
Conversation
…d sidebar PortalConversation and PortalSidebar passed the slug to PortalAvatar while the text beside it showed the display label, so the initials and tint disagreed with the briefing.
…ix (Abilityai#4518) merge-train: mechanical, per the merge-train note on the PR. Mounts the real PortalConversation and asserts the header and transcript avatar tiles take the display label; red with PortalConversation.vue reverted to dev. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
merge-train (2026-11-17): one commit pushed to this branch — a test only, no change to your code. The fix is right, but Pushed Not changed, for a follow-up: |
Fixes #4518
Description
An agent with a display name and no avatar image showed two different avatar tiles on one screen. The header's agent picker label used the display name ("Zeta Desk"), but its avatar and the sidebar row used the internal name, which gave different initials and a different colour.
PortalAvatarderives initials and tint from itsnameprop (portalUtils.js).PortalConversation(header picker, switcher list, message/ask/work-card avatars) andPortalSidebar(agent rows) passed the slugagent.name. Those call sites now pass the same label the text next to them already shows:agentDisplayName(agent)in the conversation, and the existingagentLabel(a)in the sidebar. Agents without a display label render exactly as before, and agents with an image are not affected.Related Issue
Fixes #4518
Journey Impact
Journey Impact: none: avatar initials/tint now use the same label as the adjacent text; no journey promise changes
Type of Change
Testing
tests/unit/portalSidebarAvatarDisplayLabel.mount.spec.jsmountsPortalSidebarwith an agent{ name: 'ap-abc-p105', display_label: 'Zeta Desk', avatar_url: null }. It asserts that the row's avatar getsname"Zeta Desk", renders "ZD". Thetests/unit/portal*specs pass. ThePortalConversation.vuecall sites get the same one-token change but have no mount test of their own. No theme-specific code is touched.Mutation: with
PortalSidebar.vuerestored to:name="a.name", the new test fails (the avatar gets the slug, not "Zeta Desk"). With the fix it passes.Checklist
Prepared with AI assistance.