Notify thread participants about new replies - #1010
Merged
Merged
Conversation
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
force-pushed
the
thread-reply-notifications
branch
from
July 23, 2026 14:12
24b436f to
cbbb7ce
Compare
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
post_replies.root_post_iddenormalizes the thread root (threading is otherwise only a parent-pointer chain), recursively backfilled, nilified with the root. N-1-safe plain addition + index.Testing
mix precommitgreen (4392 tests).https://claude.ai/code/session_01NVLQEFVHydm1LWPJoLn4x4