Skip to content

Commit f3906b9

Browse files
matt2eclaude
andcommitted
fix(links): stop a message preview claiming a deletion it never saw
A well-formed message link whose ID wasn't in a readable channel said "This message was deleted." readTarget in threads.ts returns `unavailable` as soon as the exact read has no matching event, before it reads any tombstone, and threadFailure maps that to `not-found`. A nonexistent ID, or a message ID paired with the wrong channel, got the same definite deletion claim as a deleted message. The not-found text is now "This message isn't available. It may have been deleted." No reader path tells an observed deletion apart from an empty read: a tombstone that hides the target also ends as `targetStatus: unavailable`. So no case keeps the definite wording, and the reader is unchanged. MessageLink's tooltip uses only the withheld text, and ThreadPanel passes the reason code to navigation, whose page already says "This message isn't available.", so neither changes. buzz-help follows. The preview test for a readable channel without the message now checks the wording itself. It fails with the old text. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Matt Toohey <[email protected]>
1 parent f3a29f3 commit f3906b9

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎docs/buzz-help.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ the interface unless an available tool actually supports that action.
5656
different channel access. A link alone never grants access.
5757
- **Message link previews** appear when you hover or focus a Buzz message link.
5858
When the message can't be shown, the card says why: the channel is private,
59-
gone or in another community; the message was deleted; or the preview
60-
couldn't load. Links don't record their community, so one from another
61-
community looks like a private or missing channel. The card still opens the
62-
link.
59+
gone or in another community; the message isn't available, and may have
60+
been deleted; or the preview couldn't load. Links don't record their
61+
community, so one from another community looks like a private or missing
62+
channel. The card still opens the link.
6363
- **Manage members** shows **General** access first in the member list. **Public**
6464
lets people in the community read and new people participate; **View only**
6565
lets them read; **Private** limits access to people added to the channel.

‎src/features/conversation/BuzzLinkPreview.test.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,17 @@ it("says why each stopped read fails instead of loading forever, and that the ca
173173
expect(text(setup(purged).tree)).toBe(previewFailures.unavailable);
174174
const exhausted = setup({ ...base, status: "ready", root: undefined });
175175
expect(text(exhausted.tree)).toBe(previewFailures["not-found"]);
176-
// A readable channel without the message names the channel.
176+
// A readable channel without the message names the channel. An empty exact
177+
// read isn't evidence of a deletion, so the card doesn't claim one.
177178
const missing = setup(
178179
{ ...base, status: "ready", targetStatus: "unavailable" },
179180
root.id,
180181
undefined,
181182
open,
182183
);
183-
expect(text(missing.tree)).toBe(previewFailures["not-found"]);
184+
expect(text(missing.tree)).toBe(
185+
"This message isn’t available. It may have been deleted.",
186+
);
184187
expect(missing.tree.querySelector("strong")?.textContent).toBe("open");
185188
expect(missing.tree.textContent).toContain("Public channel · Not joined");
186189
expect(missing.tree.textContent).toContain("Open link");

‎src/features/conversation/BuzzLinkPreview.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { namedChannel, useChannelReference } from "./channel-reference";
2525
export const previewFailures = {
2626
withheld:
2727
"Private channel. You aren’t a member, it no longer exists, or the link is from another community.",
28-
"not-found": "This message was deleted.",
28+
"not-found": "This message isn’t available. It may have been deleted.",
2929
unavailable: "Couldn’t load this preview.",
3030
} as const;
3131
type FoundChannel = Extract<ChannelReference, { state: "found" }>;

0 commit comments

Comments
 (0)