Skip to content

feat(portal): agent avatar on chat-history rows (ent#186) - #1734

Merged
vybe merged 2 commits into
devfrom
feature/ent186-portal-titles-avatars
Jul 23, 2026
Merged

vybe merged 2 commits into
devfrom
feature/ent186-portal-titles-avatars

Conversation

@dolho

@dolho dolho commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Related to Abilityai/trinity-enterprise#186 (frontend half; the backend title-generation half is Abilityai/trinity-enterprise#194).

What

Client-portal history rows and cross-chat search results identified their agent with a 2px color dot, while the Agents section directly above rendered full PortalAvatar components. A client with several agents had to hover for the tooltip to learn whose conversation a thread was.

How

Both lists now render PortalAvatar at size=22 — the same component (avatar-URL-with-initials-fallback) already used in four other portal places.

  • The avatar URL is resolved from the roster already loaded at sign-in — an avatarByAgent computed map keyed by agent_name, built from the existing roster prop. No additional request per row, and no change to the sessions payload.
  • An agent with no generated avatar falls through to PortalAvatar's existing initials + deterministic tint — no new empty state.
  • Search rows move the snippet into the title column so history and search share one layout (previously an ml-4-indented sibling that assumed the dot's width).
  • agentColor is no longer imported directly by the sidebar (PortalAvatar still uses it internally for the tint).

Acceptance criteria

  • History rows show the conversation's agent avatar instead of the color dot
  • Search-result rows use the same treatment
  • Initials + color fallback works when the agent has no avatar
  • Row height / truncation hold at the sidebar's narrow width, on mobile, in dark mode — min-w-0 + truncate retained on both lines; PortalAvatar is shrink-0; no new colors (the avatar carries its own tint, dark-mode-agnostic)
  • No additional network request per row

Verification

@vue/compiler-sfc parse + compileScript + compileTemplate on the changed SFC → compiles clean. (A full npm run build fails on this machine for an unrelated reason — mermaid is in package.json but missing from the local node_modules, breaking AgentWorkspace.vue; untouched by this PR.)

🤖 Generated with Claude Code

dolho and others added 2 commits July 22, 2026 10:18
History and search rows identified their agent with a 2px color dot, so a
client with several agents had to hover for the tooltip. Render the
conversation's PortalAvatar (size 22) instead — the same component the
Agents section above already uses.

The avatar URL is resolved from the roster already loaded at sign-in
(avatarByAgent map keyed by agent_name), so there is no per-row request
and no change to the sessions payload. Agents without a generated avatar
fall through to PortalAvatar's existing initials + deterministic tint.
Search rows move the snippet into the title column so both lists share
one layout.

Related to Abilityai/trinity-enterprise#186

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
PortalAvatar gated its background on `imgOk` alone. That ref starts true and
only flips on the <img>'s @error — which can never fire when avatarUrl is
null and no <img> is rendered at all. So an agent without a generated avatar
drew white initials on a transparent background.

Key both the <img> and the tint off one `showImage` computed
(avatarUrl && imgOk), so the two can no longer disagree.

Pre-existing since #138 and visible in the portal's Agents section; ent#186
puts the same component on every history and search row, and the initials +
color fallback is one of its acceptance criteria.

Related to Abilityai/trinity-enterprise#186

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

⚠️ Nightly unit-suite check skipped — merge conflict against dev.

Resolve by running git merge dev locally and pushing the result. The next nightly run will re-test once the conflict is gone.

@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.

Validated via /validate-pr: small focused UI change, reuses PortalAvatar + existing roster (no new requests), security clean. Cross-tracker ent#186 stays open (titles half pending) — noting for manual status bump.

@vybe
vybe merged commit 16d3936 into dev Jul 23, 2026
27 of 29 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.

2 participants