You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e2f29cc
Browse filesBrowse the repository at this point in the historyBrowse files
feat(messages): open the sender's profile from the byline name (#2253)
## Problem
In channels, DMs and threads, clicking a message's avatar opened the
sender's profile, but clicking their name did nothing. At the top of a
group of messages the name is the only identity element, so people click
it and nothing happens.
## Change
- The byline name (plus the robot mark for agents) is a `role="button"`
span that opens the same profile as the avatar, on click, Enter or
Space. It is interactive only where the avatar is clickable, and not on
stacked continuation rows. The status and the "X's agent" label stay
outside it.
- `tabIndex={-1}`, so the avatar stays the group's only tab stop. The
name has no hover preview; ProfilePeek stays on the avatar.
- At rest the name looks exactly as before. A fine pointer's hover or
keyboard `:focus-visible` adds an underline and the pointer cursor, and
focus also gets the shared focus ring.
- You can still start a text selection on the name, and copied text
stays plain. A click that ends a selection (a drag, or the second click
of a double-click) doesn't open the profile.
- On a short received message, the floating action bar covered the name.
It now moves to the side of the name that has room. A hover-clearance
band between the bubble and the bar keeps the bar reachable. Own
(mirrored) rows are unchanged.
- `docs/profiles.md` now lists the byline name as a way to open a
profile.
## Before and after
Left is before (`90ce5e37a`) and right is after (`c646f3707`), in
headless Chromium on the fixture app in light theme. Watch the pointer
hover and then click "Priya Shah": only the right side underlines the
name and opens the profile. Clicking the avatar opens it in both. The
pointer is drawn by an overlay.
https://github.com/user-attachments/assets/5a3d3f5c-0f57-4368-ace6-0e415ab940d0
<details>
<summary>Stills</summary>


</details>
## Testing
Local macOS, at `c646f3707`:
- **Vitest:** 2,351 tests in the messages suite pass, including the new
`MessageRow.test.tsx` cases for click, Enter and Space, selection, and
when the name is interactive.
- **Static checks:** typecheck, Biome lint and `design:check` are clean,
and the pre-push hooks passed.
- **Browser:** eight affected specs, run in Chromium and WebKit with
`--no-deps` (profiles, profile-channel-focus, message-avatar-stacking,
avatar-shapes, user-status, membership, message-actions-floating,
message-selection). 67 of 68 passed. The one failure was WebKit
`profiles.spec.mjs:121` ("Close before successor reply resolution…"),
which this branch doesn't touch. It passed 3 of 3 when rerun on its own.
- **New browser cases:** these need real layout, pointer paths or native
selection, which jsdom can't provide.
- `message-actions-floating.spec.mjs`: on the first message of a group,
a short received one, the bar sits beside the name, a slow diagonal
reaches both end buttons, and the name underneath still opens the
profile.
- `message-selection.spec.mjs`: a drag within the name selects it
without opening the profile, and a drag from the name into the body
selects both.
- **Not checked:** the native Tauri desktop app (WKWebView), and dark
theme, narrow widths and enlarged text in the app. This PR stays a draft
until a human has tried it.
## Design notes for reviewers
- **Design exception:** `.authorLink` in `Messages.module.css` is a
quiet link style local to this feature. It doesn't use
`InlineReference`'s `.link` because the shared style makes the first
byline of each group 3 px taller (16 → 19 px). A suggested follow-up is
a quiet variant in `InlineReference` that this byline could adopt.
- **Known edge:** if a row becomes a stacked continuation while its
profile tab is open, closing the tab has nothing to return focus to.
Other places in the app already behave this way, and the impact is low.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Signed-off-by: Matt Toohey <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
0 commit comments