Repository navigation
Commit 7f793e9
feat(messages): show "<author> in #<channel>" for message links (#1969)
## Summary
A raw Buzz message or thread link now names the message's author.
Before, it showed only the channel name (`Alpha`). Now it reads
`<author> in #<channel>` (`Alice Fixture in #Alpha`) in both the visible
label and the accessible name. The icon, styling, hover preview card,
menu, click behaviour and selection copy (which still yields the raw
URL) are unchanged.
### Before and after
Captured with the real-app browser fixture behind
`tests/browser/buzz-links.spec.mjs` (WebKit, 1280×800 at 2×). "Before"
is the merge base `9818f778e`. "After" is `76c5ffd75`; the only later
commit, `6576a15cc`, changes a comment.


<details>
<summary>Dark theme</summary>


</details>
### When the old label stays
The link keeps its previous channel presentation when:
- the message is in a DM, a Solo chat or an unlisted channel;
- the channel's membership is still loading from cache (it waits for the
relay to confirm membership before reading);
- the lookup cannot find or read the message (deleted, or not yet on the
replica that answered), or no reader is free;
- the link has custom (authored) link text;
- the link is in a composer draft or preview, which never reads;
- the author has no profile name, so the label never shows a key
fragment. An agent with a library name is still named.
A workflow's message reads `Workflow in #<channel>`, matching its row
header.
### How the author is found
1. **Local timeline row first.** If the channel's live timeline already
holds the message as a message row, the author comes from that row and
no reader is borrowed. Membership and huddle rows don't count; those
links take the exact read. A cached window (restored from disk, or
marked cached after a stream drop) skips this step and goes to the exact
read.
2. **Otherwise, one bounded exact read.** The link borrows the same
bounded exact thread reader the hover preview uses, then disposes it as
soon as the author is known. At most 4 lookups run at once, so open
threads and previews keep their capacity, and their reads take
background admission in the shared read scheduler: one label read runs
at a time, and opening or previewing a conversation reads ahead of them.
A lookup is cancelled when its last link unmounts.
3. **Remembered per session.** A found author is kept for the session,
so remounted (virtualized) links don't read again. It stays shown even
if the message is later deleted.
4. **Retried without looping.** A failed or unavailable read is retried
when the live stream connects again, or after every link to that message
has unmounted and one mounts again. Those are the only recovery paths;
it never retries in a loop.
Names resolve through the existing identity names, profile names and
workflow attribution. `BuzzLinkPreview` now shares its ready/stopped
check with the lookup. `docs/plugin-architecture.md` describes the new
label and the reader use.
### Commits
- `6ec71482f` feat(messages): name the author in message links
- `13cb363f4` fix(messages): keep message link authors named, local and
retryable
- `6c555884b` fix(messages): re-read unavailable message links and trust
only message rows
- `ca410f719` docs(messages): say a cached timeline window defers to the
exact reader
- `2f2a9d8f5` fix(messages): drop the message link's fragment guard the
names view now owns
- `f61cd574f` fix(messages): read message link authors in the background
### Validation
Run locally during development:
- typecheck, lint, format and `design:check`
- `src/features/conversation/linked-message.test.tsx` (new unit tests)
and the dependent Vitest files
- `src/features/relay/thread-target.test.ts`: the new
background-admission case fails when the thread view does not forward
its priority (fail-before run), and `threads`, `reader`, `thread-window`
and `traffic.integration` pass
- browser tests `buzz-links`, `nested-replies` and
`navigation-thread-history` in Chromium and WebKit
The branch was pushed with `--no-verify` because pre-push tests time out
under load on the author's machine. Hosted CI is the broad check.
### Known trade-offs
- **One read per distinct unloaded message.** Each distinct linked
message that isn't in its channel's live timeline costs one exact read
per session.
- **The label widens when the author arrives.** The link first shows the
channel name, then grows to `<author> in #<channel>`.
- **A found author persists after deletion.** Once found, the author
stays shown for the session even if the message is later deleted. Only a
message the lookup never found keeps the channel name.
- **Thread-panel replies still read.** A reply held only by an open
thread panel still takes the exact read. Reusing the panel's copy would
need a lookup in the FOUNDATION relay session, which is left for
explicit guidance.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Signed-off-by: Matt Toohey <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>1 parent ba600cc commit 7f793e9
11 files changed
Lines changed: 818 additions & 48 deletions
File tree
- docs
- src/features
- conversation
- relay
- tests/browser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
1502 | | - | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1503 | 1509 | | |
1504 | 1510 | | |
1505 | 1511 | | |
1506 | 1512 | | |
1507 | 1513 | | |
1508 | 1514 | | |
1509 | | - | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
1510 | 1519 | | |
1511 | 1520 | | |
1512 | 1521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 67 | + | |
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
| |||
85 | 82 | | |
86 | 83 | | |
87 | 84 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 85 | | |
102 | 86 | | |
103 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
155 | 164 | | |
156 | 165 | | |
| 166 | + | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
| |||
0 commit comments