Skip to content

feat(mentions): mentioning a person finally tells them - #775

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/mention-notifications
Aug 26, 2026
Merged

feat(mentions): mentioning a person finally tells them#775
github-actions[bot] merged 1 commit into
mainfrom
feat/mention-notifications

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

The mention notification type has existed since the notification config was written — copy, an icon case in NotificationItem.tsx, a place in the type union. Nothing has ever created one.

You could write @alice and she would never know. That makes the mention syntax decorative rather than social, and it has been that way the whole time.

Widening the pipeline instead of building a second one

Fixing it needs exactly what the Cat already uses: notice a mention on a post, resolve it properly, act, retry on failure. So the existing pipeline widens by one word.

before after
cat_mention_queue mention_queue
claim_cat_mentions claim_mentions
prefilter ~* '@cat' prefilter '@'

The Cat is one mentioned account among many, and the name should say so.

It is still a prefilter and still deliberately dumb. domain/mentions/parse.ts + services/mentions/resolve.ts remain the single authority on what counts as a mention. The worker discards what the trigger over-selects and marks it done, not failed — retrying a post that named nobody three times and then logging an error is noise about nothing.

One resolve now produces both outcomes: reply if the Cat was named, and tell the people who were. Two features, one query, one definition of what a mention is.

Mentions in private messages are deliberately not notified

This is a privacy decision, not an omission:

  • a participant already gets a new_message notification, so a second one for being named is noise
  • a non-participant must never be told at all — the notification would disclose that a conversation exists, who is in it, and through the preview part of what was said

Typing a friend's handle in a private chat is not publishing to them.

Details that decide whether it's welcome or noise

  • quotes the post rather than sending a bare "you were mentioned"
  • skips the author naming themselves
  • skips the Cat — it has no inbox
  • never throws: the post is already written by then, and losing a notification must not cost the Cat's reply

Verification

  • npm run verify — exit 0 (2384 tests)
  • 6 new notifier tests + 1 new worker test covering a post that names only people
  • migration dry-run on production inside BEGIN … ROLLBACK — table, function and trigger present in-transaction, old table restored after rollback

🤖 Generated with Claude Code

The `mention` notification type has existed since the notification
config was written. It has copy, an icon case in NotificationItem.tsx,
and a place in the type union. Nothing has EVER created one. You could
write @alice and she would never know — which makes the mention syntax
decorative rather than social, and it has been that way the whole time.

Fixing it needs exactly what the Cat already uses: notice a mention on a
post, resolve it properly, act, retry on failure. So rather than build a
second pipeline beside the first, the existing one widens by one word.
cat_mention_queue becomes mention_queue and claim_cat_mentions becomes
claim_mentions, because the Cat is one mentioned account among many and
the name should say so. The prefilter widens with it — from '@cat' to
'@' — since a post naming only @alice has to reach the worker too.

It is still a PREFILTER and still deliberately dumb.
domain/mentions/parse.ts and services/mentions/resolve.ts remain the
single authority on what counts as a mention; the worker discards
whatever the trigger over-selects, and marks it done rather than failed,
because retrying a post that named nobody three times and then logging an
error is noise about nothing.

One resolve now produces both outcomes: reply if the Cat was named, and
tell the people who were. Two features, one query, one definition of what
a mention is.

MENTIONS IN PRIVATE MESSAGES ARE DELIBERATELY NOT NOTIFIED, and that is a
privacy decision rather than an omission. A participant already gets a
new_message notification, so a second one for being named is noise. A
NON-participant must never be told at all: the notification would
disclose that a conversation exists, who is in it, and through the
preview part of what was said. Typing a friend's handle in a private chat
is not publishing to them.

The notification quotes the post rather than sending a bare "you were
mentioned", skips the author naming themselves, skips the Cat (it has no
inbox), and never throws — the post is already written by then, and
losing a notification must not cost the Cat's reply.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions
github-actions Bot merged commit 65fd95a into main Aug 26, 2026
9 checks passed
@github-actions
github-actions Bot deleted the feat/mention-notifications branch August 26, 2026 21:30
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