feat(bookmarks): show who wrote each saved message

Saved-message cards showed the room and time but not the author, so in a busy
room you couldn't tell who said it without jumping. Now each card shows
"{sender} - {time ago}":

- Bookmark gains optional senderId/senderName (snapshotted at save time in
  Message.tsx from the already-computed sender display name); optional so
  existing stored bookmarks stay valid.
- The panel re-resolves the author's current display name live from the event
  when the room is joined, falling back to the stored snapshot for left rooms.
- Search now also matches the author name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 15:37:12 -04:00
co-authored by Claude Opus 4.8
parent f9af363dd6
commit e01b87b214
4 changed files with 32 additions and 6 deletions
+5
View File
@@ -8,6 +8,11 @@ export type Bookmark = {
savedAt: number;
previewText: string;
roomName: string;
// Author of the saved message. Optional for backward compatibility with
// bookmarks stored before attribution was added; the panel resolves a live
// name when the room is joined and falls back to these snapshots otherwise.
senderId?: string;
senderName?: string;
};
const BOOKMARKS_KEY = 'io.lotus.bookmarks';