Skip to content

release: member profile visibility + avatar image upload#99

Merged
haowei2000 merged 4 commits into
mainfrom
develop
Jul 7, 2026
Merged

release: member profile visibility + avatar image upload#99
haowei2000 merged 4 commits into
mainfrom
develop

Conversation

@haowei2000

Copy link
Copy Markdown
Collaborator

Promote developmain. Two user-profile features, both already merged to develop and CI-green.

#97 — Member profile visibility

  • Bio + status are now visible in-channel: clicking a member's avatar/name opens a ProfileHovercard (bio, status emoji/text).
  • Bots can read member bio via the channel members API (was already supported; the stale AGENT_BRIDGE_RESOURCE.md doc was corrected).
  • list_channel_members now returns bio / status_text / status_emoji (COALESCE user → bot fallback).

#98 — Avatar image upload (users + bots)

  • POST /api/v1/users/me/avatar (self) and POST /api/v1/bots/:bot_id/avatar (owner/admin) accept raw image bytes → object storage → avatar_url.
  • Public GET /api/v1/{users,bots}/:id/avatar/:file serves bytes inline with a 1-day cache; path validated to stay inside the avatars/ prefix.
  • Raster only (png/jpeg/webp/gif) ≤ 5 MiB; SVG rejected.
  • AvatarUpload UI (hover camera → picker → optimistic preview) in the profile editor and bot status editor.

Verification

Both merged into develop via green CI (Frontend Build, Gateway Check, Gateway Integration). Avatar flow additionally verified end-to-end against the local kind stack (upload → byte-perfect serve → persisted → renders after fresh reload; validation returns 400/401 as expected).

🤖 Generated with Claude Code

haowei2000 and others added 4 commits July 6, 2026 17:42
#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>
feat(chat): member profile hovercard — bio/status visible in channel (+ docs fix)
Add avatar image upload backed by object storage:
- POST /api/v1/users/me/avatar (self) and POST /api/v1/bots/:bot_id/avatar
  (owner/admin) accept raw image bytes, store to avatars/{kind}/{id}/{uuid}.{ext},
  and write the serving URL into the existing avatar_url column.
- Public GET /api/v1/{users,bots}/:id/avatar/:file serves the bytes with an
  inline content-disposition and 1-day cache (an <img src> can't send a Bearer
  token, and the path is validated to stay inside the avatars/ prefix).
- Only raster images (png/jpeg/webp/gif) up to 5 MiB; SVG is rejected because
  file_response forces it to download.

Frontend: AvatarUpload component (hover camera + file picker + optimistic
preview) wired into the profile editor and the bot status editor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(avatars): image upload for users and bots
@haowei2000
haowei2000 merged commit 7eca1d4 into main Jul 7, 2026
11 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.

1 participant