Skip to content

fix: show the active profile's avatar in chat (#679)#755

Open
histfuture wants to merge 1 commit into
fathah:mainfrom
histfuture:fix/chat-profile-avatar-routing
Open

fix: show the active profile's avatar in chat (#679)#755
histfuture wants to merge 1 commit into
fathah:mainfrom
histfuture:fix/chat-profile-avatar-routing

Conversation

@histfuture

@histfuture histfuture commented Jun 22, 2026

Copy link
Copy Markdown

Summary

Fixes #679. The chat always rendered the Hermes mark next to agent turns and on the empty state, regardless of the active profile. A profile's custom avatar — or just a named profile's coloured initial — never appeared in chat, even though the Profiles page rendered it correctly.

Changes

  • Add a small AgentAvatarContext and render the chat agent avatar through the shared ProfileAvatar component (custom image, or coloured initial for a named profile) in message rows, history/reasoning rows, the typing indicator and the empty state — matching the Profiles page. The default profile keeps the animated Hermes mark, so the recently-added loading animation is preserved.
  • Plumb each run's profile appearance from LayoutChat → the avatar context.
  • Pin a not-yet-started ("scratch") chat to the active profile via an effect, so launch-time restore of the persisted active profile also routes a fresh chat to the selected agent (complements the existing selectProfileRunTransition switch handling).

Notes

Rebased onto current main; the profile-switch routing added in the meantime (selectProfileRunTransition) is kept as-is — this PR layers the avatar rendering on top and adds a launch-restore safety net.

Testing

  • npm run typecheck passes; changed files lint clean.
  • Built and installed locally (Linux); verified the chat agent avatar and the empty-state icon follow the selected profile (coloured initial / custom image), while the default profile still shows the animated Hermes mark.

🤖 Generated with Claude Code

Chat always rendered the Hermes mark next to agent turns and on the empty
state, regardless of the active profile — so a profile's custom avatar
(or a named profile's coloured initial) never appeared in chat, even
though the Profiles page rendered it correctly. Closes fathah#679.

- Add AgentAvatarContext and render the chat agent avatar via the shared
  ProfileAvatar (custom image / coloured initial) in message rows, history
  rows, the typing indicator and the empty state, matching the Profiles
  page. The default profile keeps the animated Hermes mark. Profile
  appearance is plumbed Layout -> Chat -> the avatar context.
- Pin a not-yet-started chat to the active profile so launch-time restore
  of the persisted profile also routes a fresh chat to the selected agent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@histfuture histfuture force-pushed the fix/chat-profile-avatar-routing branch from daff2b0 to 598d745 Compare June 23, 2026 07:09
@histfuture histfuture changed the title fix: show active profile's avatar in chat and route chats to the active profile (#679) fix: show the active profile's avatar in chat (#679) Jun 23, 2026
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.

Changed profile avatar still shows as default in chat

1 participant