Skip to content

feat(chat): member profile hovercard — bio/status visible in channel (+ docs fix)#97

Merged
haowei2000 merged 1 commit into
developfrom
feat/member-profile-visibility
Jul 6, 2026
Merged

feat(chat): member profile hovercard — bio/status visible in channel (+ docs fix)#97
haowei2000 merged 1 commit into
developfrom
feat/member-profile-visibility

Conversation

@haowei2000

Copy link
Copy Markdown
Collaborator

Covers optimization #2 (a member's bio in a channel: visible to people, readable by bots).

#2a — bio/status now visible to people

A member's bio/status lived in the DB but was never surfaced. Now clicking a member's avatar or name (in a message, or the Members list) opens a profile card: avatar · name · @handle · status (emoji+text) · bio · role.

  • server channels.rs: list_channel_members now returns bio (COALESCE(users.bio, bot_accounts.description)) + status_text/status_emoji, mirroring the bot-facing server/src/resource/members.rs.
  • frontend: new ProfileHovercard (context provider + body-portaled card; outside-click/Esc close; viewport-clamped; flips above near the bottom). MemberItem gains bio/status_*; ChannelView holds the member map; MessageItem avatar/name and MembersPopover rows open the card.

#2b — bots could ALREADY read member bios

The list_members / channel.members resource already returns the bio as info. This was only a stale doc: AGENT_BRIDGE_RESOURCE.md now documents info/status_* and drops the never-returned avatar_url/role.

Verification

  • cargo build + frontend tsc/vite build pass.
  • End-to-end (redeployed gateway + headless Chrome): set a member's bio/status via PATCH /users/me, confirmed the members API returns them, and the card renders 🛠️ heads-down on infra + bio from both the member list and a message avatar.

Not in this PR

Avatar image upload (optimization #1) — follow-up PR feat/avatar-upload.

🤖 Generated with Claude Code

#2a — a channel member's bio/status was in the DB but never surfaced to people.
Now clicking a member's avatar/name (in a message or the Members list) opens a
profile card with avatar, name, @handle, status (emoji+text), bio, and role.

- server: list_channel_members now returns bio (COALESCE(users.bio,
  bot_accounts.description)) + status_text/status_emoji, mirroring the bot-facing
  resource handler (server/src/resource/members.rs).
- frontend: new ProfileHovercard (context provider + body-portaled card,
  outside-click/Esc close, viewport-clamped, flips above near the bottom).
  MemberItem gains bio/status; ChannelView holds the member map and provides it;
  MessageItem avatar/name and MembersPopover rows open the card.

#2b — bots can ALREADY read member bios via the list_members / channel.members
resource (returns `info` = the same bio). Only the docs were stale: fixed
AGENT_BRIDGE_RESOURCE.md to document `info`/status_* and drop the never-returned
avatar_url/role.

Verified: cargo build + frontend typecheck/build; redeployed the gateway and
confirmed end-to-end via headless Chrome — set a bio/status on a member, then
the card renders it from both the member list and a message avatar.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@haowei2000
haowei2000 merged commit 4bd0ad0 into develop Jul 6, 2026
10 checks passed
@haowei2000
haowei2000 deleted the feat/member-profile-visibility branch July 6, 2026 09:59
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.

1 participant