Skip to content

Let a member switch thread notifications off (#1025) - #1048

Merged
wintermeyer merged 1 commit into
mainfrom
issue-1025-thread-notif-optout
Jul 24, 2026
Merged

Let a member switch thread notifications off (#1025)#1048
wintermeyer merged 1 commit into
mainfrom
issue-1025-thread-notif-optout

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

Closes #1025.

Adds a per-member opt-out for the "thread" notification kind (#1010): a reply anywhere in a thread you wrote in. It is what makes a live discussion reach every participant, but a busy thread gets loud, so this gives each member one switch to turn it off.

What

  • New field users.thread_notifications? (boolean, default true) — an opt-out shaped exactly like cv_update_notifications? (Feature request: Propagate Profile Changes #980), the only other in-app kind a member can silence. Cast list + a <.toggle_form_card> on /settings/notifications.
  • Read side: an exists gate on the reader's flag inside Vutuv.Activity.thread_replies/1, which both thread_items/3 (feed) and count_thread_replies/2 (unread count) build on — one place, no extra round trip. Off → the events vanish from the feed and the tally.
  • Write side: Vutuv.Posts.notify_thread_participants/2 filters recipients by the flag before the live badge push, so a member who switched it off never gets a badge with nothing behind it.
  • Hint row: on /notifications the day's first thread row carries a quiet one-line hint ("You wrote in this thread. Turn this off ›") linking to the setting — once per Berlin-day section, so it stays a hint and not a banner.
  • Direct answers to your own post (the reply kind) are unaffected and stay always-on.
  • German copy added in Sie-form, no em-dashes.

Migration

Additive column with a default → N-1 safe for the blue/green window.

Tests

  • Read side: an opted-out member sees no thread events and they don't count (feed + unread count).
  • Write side: an opted-out participant gets no live push, while the directly-answered author still gets their reply.
  • UI: only the day's first thread row carries the opt-out hint; the settings toggle persists.
  • mix precommit green (4646 passed).

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

https://claude.ai/code/session_014VdhLKS68PKfE4NBcW1KD7

Since #1010 a reply anywhere in a thread a member wrote in reaches every
participant (the feed's "thread" kind). That is what makes a live
discussion reach everyone, but a busy thread can get loud with no way to
turn it off. This adds users.thread_notifications? (boolean, default
true), the second in-app kind a member can silence after the CV-update
opt-out (#980), shaped exactly like it.

Honored on both sides, so the switch never leaves a badge with nothing
behind it: an exists gate on the reader's flag inside thread_replies/1
suppresses the derived feed and the unread count in one place (both build
on it, no extra round trip), and the live push filters recipients by the
flag before broadcasting. Direct answers to your own post (the "reply"
kind) are unaffected and stay on.

On /notifications the day's first thread row carries a one-line hint
linking to the setting, once per Berlin-day section so it stays a hint and
not a banner.

Additive column with a default, N-1 safe for the blue/green window.

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_014VdhLKS68PKfE4NBcW1KD7
@wintermeyer
wintermeyer merged commit 9d18326 into main Jul 24, 2026
1 check passed
@wintermeyer
wintermeyer deleted the issue-1025-thread-notif-optout branch July 24, 2026 10:51
wintermeyer added a commit that referenced this pull request Jul 24, 2026
Four features landed on main from the 2026-07-24 issue-triage batch:
thread-notification opt-out (#1025/#1048), endorsers on the tag detail page
(#1008/#1049), the job board's multi-tag filter (#951/#1051) and the personal
content filters (#940/#1053). Minor bump for the new user-facing surface;
#940 ships a new content_filters table (additive, N-1 safe) and #1025 adds an
additive thread_notifications? column.

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_014VdhLKS68PKfE4NBcW1KD7
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.

Let a member switch thread notifications off

1 participant