Skip to content

fix(portal): avatar tiles follow the agent display label in header and sidebar - #4569

Merged
vybe merged 2 commits into
Abilityai:devfrom
pcbeingused333:fix/4518-portal-avatar-r3
Nov 17, 2026
Merged

vybe merged 2 commits into
Abilityai:devfrom
pcbeingused333:fix/4518-portal-avatar-r3

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

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.

PortalAvatar derives initials and tint from its name prop (portalUtils.js). PortalConversation (header picker, switcher list, message/ask/work-card avatars) and PortalSidebar (agent rows) passed the slug agent.name. Those call sites now pass the same label the text next to them already shows: agentDisplayName(agent) in the conversation, and the existing agentLabel(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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

  • I have tested this locally
  • New tests added (if applicable)
  • All existing tests pass
  • Every new test executes the changed path

tests/unit/portalSidebarAvatarDisplayLabel.mount.spec.js mounts PortalSidebar with an agent { name: 'ap-abc-p105', display_label: 'Zeta Desk', avatar_url: null }. It asserts that the row's avatar gets name "Zeta Desk", renders "ZD". The tests/unit/portal* specs pass. The PortalConversation.vue call sites get the same one-token change but have no mount test of their own. No theme-specific code is touched.

Mutation: with PortalSidebar.vue restored to :name="a.name", the new test fails (the avatar gets the slug, not "Zeta Desk"). With the fix it passes.

Checklist

  • My code follows the project's style guidelines
  • I have updated the documentation (if applicable): n/a, no docs affected
  • I have not committed any sensitive data (API keys, credentials, etc.)
  • I have added appropriate logging for new functionality: n/a, no new functionality

Prepared with AI assistance.

pcbeingused333 and others added 2 commits November 13, 2026 18:02
…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>
@vybe

vybe commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

merge-train (2026-11-17): one commit pushed to this branch — a test only, no change to your code.

The fix is right, but PortalConversation.vue (the header #4518 names, 8 of the 9 changed lines) had no executing test: with that file reverted to dev, the new sidebar spec and every other portal spec stayed green.

Pushed 6f500d8d3: src/frontend/tests/unit/portalConversationAvatarDisplayLabel.mount.spec.js. It mounts the real PortalConversation with one user and one assistant message and asserts that the header tile and every transcript tile take the display label. It passes at head and fails with PortalConversation.vue reverted (expected 'ap-abc-p105' to be 'Zeta Desk').

Not changed, for a follow-up: PortalAgentDetails.vue:22 and the other slug-keyed avatars (search rows, chat rows, agent picker, rooms, inbox) still derive the tile from the slug, so a labelled agent without an image can show two different tiles on one screen.

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

merge-train: batch validated on train/20261117-1746 (#4626)

@vybe
vybe merged commit 73f45c4 into Abilityai:dev Nov 17, 2026
25 checks passed
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.

3 participants