diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1b817f..bfdbc3d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@ Changes people using Tightbeam will notice. Add a line under **Unreleased** as t
## Unreleased
+- Replies, quotes and search show /me messages the way the conversation does ("Alex waves"), instead of the raw text. A quote of a deleted message says "Message deleted", as the message itself does.
- Send any file, not just pictures: pick files with the paperclip, or drop them on the window. Files up to 1 GB go straight from disk, so big ones don't slow the app down. Changing or moving the original afterwards doesn't affect what was sent. The other side needs version 0.7 or later.
- More kinds of received files open in their app with one click: PDFs, text and Office documents, audio and video, as well as pictures. Programs, scripts, web pages and archives can only be shown in their folder.
- After unpairing and pairing with someone new, they get only the messages written from then on. Before, they also received every message sent to the previous person. Editing or deleting those older messages stays on your computer.
diff --git a/GLOSSARY.md b/GLOSSARY.md
index 155bb40..61db358 100644
--- a/GLOSSARY.md
+++ b/GLOSSARY.md
@@ -44,6 +44,14 @@ _Avoid_: ignored entry, unknown entry
What the transcript shows for a message entry: its current text with later edits, deletes and reactions folded in.
_Avoid_: entry (when meaning the shown result), post
+**Action**:
+A message whose text starts with `/me`, shown as what its author does ("Alex waves") instead of as something said. A message with a file is never an action.
+_Avoid_: emote, me-message
+
+**Summary**:
+A message in one line, where it's quoted or listed rather than shown in full: its text or caption, what its file is, or that it's gone.
+_Avoid_: preview (that's a picture's), excerpt, snippet (that's a search match's)
+
**Transcript**:
The messages shown, in display order, as far back as they're loaded. Older ones load as the reader scrolls up, or when a search hit or a reply's quote reaches back to them.
_Avoid_: chat log, history (for what's shown), feed
diff --git a/README.md b/README.md
index 5f749fc..6e5d1e4 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,7 @@ ui/src/api.ts typed wrappers for the Rust commands, plus the shared
ui/src/store.ts app state (TanStack Store), fed by events from Rust; history paging
ui/src/transcript.ts the transcript: what a page, a live message or an update does to it
ui/src/people.ts whose name each message shows
+ui/src/reading.ts how a message reads: placeholders, actions, its summary
ui/src/commands.ts slash commands
ui/src/components/ the screens: Setup, Pair, Chat, Search, Files, PairDialog, Notice
ui/src/components/ui/ shadcn/ui components (generated; update with the shadcn CLI)
diff --git a/src-tauri/src/desktop.rs b/src-tauri/src/desktop.rs
index 3118f7d..244e9b1 100644
--- a/src-tauri/src/desktop.rs
+++ b/src-tauri/src/desktop.rs
@@ -108,7 +108,8 @@ pub fn on_message(app: &AppHandle, message: &Message) {
let unread = desktop.unread.fetch_add(1, Ordering::Relaxed) + 1;
show_unread(app, &window, unread);
if desktop.notifications() && !core.dnd() && !recently_notified(&desktop) {
- // A vanishing message's text would outlive it in the notification center.
+ // A vanishing message's text would outlive it in the notification center. The
+ // rest follows how the UI words a message (`ui/src/reading.ts`).
let text = match message.text.strip_prefix("/me ") {
_ if message.vanish.is_some() => "Vanishing message".to_string(),
Some(action) => format!("{} {action}", title(core.peer_name(), "They")),
diff --git a/ui/src/components/Chat.tsx b/ui/src/components/Chat.tsx
index be77a81..1909d53 100644
--- a/ui/src/components/Chat.tsx
+++ b/ui/src/components/Chat.tsx
@@ -16,7 +16,7 @@ import { memo, useEffect, useMemo, useRef, useState } from 'react'
import { api, type Message as ChatMessage, type Quote, type Reaction } from '@/api'
import { type Command, parse, suggest } from '@/commands'
-import { describeFile, FileView, StagedFiles, Viewer } from '@/components/Files'
+import { FileView, StagedFiles, Viewer } from '@/components/Files'
import { Linkified } from '@/components/Linkified'
import { NoteCard } from '@/components/Notice'
import { SearchBar, SearchResults } from '@/components/Search'
@@ -54,6 +54,7 @@ import { Spinner } from '@/components/ui/spinner'
import { Textarea } from '@/components/ui/textarea'
import { formatDuration, formatUntil } from '@/lib/duration'
import { namer, peopleKey } from '@/people'
+import { goneText, readingOf, summaryOf } from '@/reading'
import {
addMessage,
clearHistory,
@@ -71,7 +72,7 @@ import {
store,
unstageFile,
} from '@/store'
-import { indexOf, messageKey, targetOf } from '@/transcript'
+import { indexOf, messageKey, refOf, targetOf } from '@/transcript'
/** The reactions on offer. */
const EMOJI = ['👍', '❤️', '😂', '😮', '😢', '🎉']
@@ -405,11 +406,11 @@ const Row = memo(function Row({
const mine = receipt !== null
const align = mine ? 'end' : 'start'
const myReaction = message.reactions.find((r) => r.author === myId)?.emoji
+ // Who does an action: my name, not "You", so "Alex waves" reads as a sentence.
+ const actorOf = (author: string) => (author === myId ? myName : nameOf(author))
// Picking my current reaction again takes it back.
const react = (emoji: string) =>
- void run(
- api.react({ author: message.author, seq: message.seq }, emoji === myReaction ? '' : emoji),
- )
+ void run(api.react(refOf(message), emoji === myReaction ? '' : emoji))
const footer = groupEnd && (
{when.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' })}
@@ -417,7 +418,8 @@ const Row = memo(function Row({
)
- if (message.deleted) {
+ const reading = readingOf(message)
+ if (reading.kind === 'gone') {
return (