Skip to content

Notify thread participants about new replies - #1010

Merged
wintermeyer merged 1 commit into
mainfrom
thread-reply-notifications
Jul 23, 2026
Merged

Notify thread participants about new replies#1010
wintermeyer merged 1 commit into
mainfrom
thread-reply-notifications

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

Why

In the last 48 hours, three answers in an active thread went completely unseen: a reply only ever notified the author of the post it directly answered, so an answer to a third participant was invisible to everyone else in the thread (no badge, no feed entry, no email). Verified against a production copy: the thread had 11 replies over two days, and exactly the three that answered other participants produced no indicator.

What

A new derived notification kind "thread": once a member writes in a thread (rooted it or replied in it), every later reply anywhere in that thread shows up in their notifications and bell badge.

  • Data: post_replies.root_post_id denormalizes the thread root (threading is otherwise only a parent-pointer chain), recursively backfilled, nilified with the root. N-1-safe plain addition + index.
  • Rules: direct answers to you stay the "reply" kind (an event is always exactly one of the two); replies from before you joined the thread, your own replies and blocked members never surface.
  • UI: same-day events of one thread merge into one grouped row ("Anna and Ben replied in a thread you posted in."), quoting and linking the newest reply; ⤷ kind badge; part of the Posts filter tab. Live badge push to every participant on reply creation. German copy in Sie-form.
  • Feed is retroactive by design, so older missed answers surface too (read-marker rules unchanged).

Testing

  • 15 new tests (derived feed rules, write-side pushes, root stamping, grouping, rendering, filter tab); mix precommit green (4392 tests).
  • Migration + backfill run against the production copy: 90/90 replies rooted; the derived feed for the affected member surfaces exactly the three missed answers.
  • Browser smoke test (German, dark mode) on real data: grouped row renders, links resolve.

https://claude.ai/code/session_01NVLQEFVHydm1LWPJoLn4x4

A reply only ever notified the author of the post it directly answered,
so an answer to a *third* participant in a thread was invisible to
everyone else who had written there: no badge, no feed entry, nothing.
Exactly this made three answers in one active thread go unseen over the
last 48 hours (verified against the production copy, where the new
derived feed surfaces precisely those three).

New derived notification kind "thread": once a member writes in a
thread (rooted it or replied in it), every later reply anywhere in that
thread notifies them. Direct answers stay the "reply" kind - an event
is always exactly one of the two. Replies from before the member joined
the thread, own replies and blocked members never surface. Threading is
only a parent-pointer chain, so each post_replies row now denormalizes
its thread root (root_post_id, recursively backfilled, nilified with the
root; N-1-safe plain addition) to make "all replies of this thread"
one indexed lookup. Same-day events of one thread merge into one grouped
row naming the actors; rows link to and quote the new reply; the write
side pushes the event live to every participant's badge. German copy in
Sie-form, matching the other notification rows.

Rebased onto the notifications page as it stands after the numbered-pages
and formatted-quote reworks: the thread count joins the kind_counts list
that feeds the pager's per-tab totals, and the row's quote rides the
page's Markdown rendering (a block with a stretched permalink link)
instead of the plain excerpt link this was originally written against.

An AI agent wrote this text in my name, unreviewed by me. The work behind
it is mine; I only delegated the writing.

Claude-Session: https://claude.ai/code/session_01QHGen5qwvjhPEETHPWjPHm
@wintermeyer
wintermeyer force-pushed the thread-reply-notifications branch from 24b436f to cbbb7ce Compare July 23, 2026 14:12
@wintermeyer
wintermeyer merged commit fcd65d0 into main Jul 23, 2026
1 check passed
@wintermeyer
wintermeyer deleted the thread-reply-notifications branch July 23, 2026 14:21
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