Skip to content

refactor: one place that says how a message reads - #8

Merged
nerdstep merged 3 commits into
mainfrom
message-reading
Nov 26, 2026
Merged

nerdstep merged 3 commits into
mainfrom
message-reading

Conversation

@nerdstep

Copy link
Copy Markdown
Owner

Summary

How a message reads is decided in one place, ui/src/reading.ts. Before, the transcript, quotes, the reply bar and search each worked it out on their own, and they disagreed.

 ui/src/
+├── reading.ts   # readingOf: gone (deleted · vanished · missing) | action | said
+│                # summaryOf: the one line for quotes and the reply bar
+│                # actionInSnippet: a search match on an action
 ├── transcript.ts  # + refOf, for the five { author, seq } literals
 └── components/
     ├── Chat.tsx    # Row lays out readingOf; QuoteButton and the reply bar use summaryOf
     └── Search.tsx  # an action match reads "Alex waves"
before after
quote of /me waves * waves Alex waves
reply bar, replying to /me waves /me waves Alex waves
search match on /me waves /me waves Alex waves
quote of a deleted message Deleted message Message deleted
quote of a file captioned /me waves * waves /me waves (as its bubble shows it)

Notifications stay worded in Rust (desktop::on_message), with a comment pointing to reading.ts. GLOSSARY.md gains Action and Summary.

Evidence

  • ui/src/reading.test.ts holds table-driven tests:
    • every reading: text, action, /me alone, a caption starting with /me, a file alone, deleted, vanished, and the three kinds of gone quote
    • the placeholders, for my messages and the peer's
    • every summary
    • search snippets: an action with its highlights kept, one cut mid-message, and a non-action
  • Commit 2 is a refactor: it changes only the edge in the last row of the table. The expected strings change in commit 3.
  • Checks: each commit passes bun run check, bun run test and bun run build. cargo fmt --check and clippy pass; the Rust side only gained a comment.
  • Not tried in the app.

Merge Danger

Door: two-way

There's no wire, schema or Rust behaviour change.

Blast Radius: wording

Only how messages read in the transcript, quotes, the reply bar and search.

🤖 Generated with Claude Code

nerdstep and others added 3 commits November 25, 2026 17:26
Commands take a message's author and sequence number alone. refOf builds that
in one place, instead of five { author, seq } literals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ui/src/reading.ts turns a message, or a reply's quote of one, into what it reads
as: a placeholder (deleted, vanished, not on this computer), an action, or what was
said with its file. The transcript lays that out; a quote shows its summary. The
wording stays as it was, with one edge brought in line with the bubble: a quoted
file whose caption starts with /me reads as its caption, not as an action.

Adds Action and Summary to the glossary. Notifications stay worded in Rust, with a
pointer to the UI's rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An action's summary is now "Alex waves", as the transcript shows it, instead of
"* waves" in a quote and the raw "/me waves" in the reply bar. A search match on an
action reads the same way. A quote of a deleted message says "Message deleted", as
the message itself does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nerdstep
nerdstep merged commit 89817ef into main Nov 26, 2026
3 checks passed
@nerdstep
nerdstep deleted the message-reading branch November 26, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant