Daily use 13: honour mutes: unread, badges, hide muted, notifications, DND, mentions (#498) #564

Closed
charles wants to merge 0 commits from dailyuse-13-core-honour-mutes into dailyuse
Owner

Stacked on: dailyuse-12-core-notification-settings-mutes

What this builds (Daily use 13, spec §3.4 "Consumers", §6.2)

  • notif_settings::mentions_me as the original (MessageUtils.isMentioned + Notification.isMessageMentionLike): blocked author never; the user in mentions; @everyone/@here outside a 1:1 DM unless suppress_everyone or in a thread the user has not joined; a role of the user's unless suppress_roles; any message of a DM/group DM that is not muted.
  • notification_for follows feat/ui/state/Notification.ts:187-256, in order: own message, blocked author, chosen status DND (app.presence.me.chosen), SUPPRESS_NOTIFICATIONS (1 << 12) → none; threads: muted (membership mute, or parent muted at any level, isThreadMuted) → none, else notif_settings::thread_level (joined: member flags, Default = parent's effective level; unjoined: forum level for a post's first message, else ONLY_MENTIONS); other channels: muted at any level → none, NO_MESSAGES → none, ALL_MESSAGES → notify, ONLY_MENTIONS → mentions_me. Module header rewritten.
  • read_state::unread is false for a channel muted at any level; mention_count unchanged, so the guild rail (fluxer-ui model.rs) and DM rows follow with no UI change. New read_state::has_unread_messages keeps the mute-blind answer.
  • channel_tree: SidebarSection gains category_muted and muted (rows/category muted by their own override, dimmed as ChannelItem.tsx:242-273,546); with hide_muted_channels (or, without a settings entry, user_settings.default_hide_muted_channels()), channels muted by their own or their category's override are left out unless selected, connected or with a mention, and a category whose channels are all left out goes too (ChannelListVisibility.ts, ChannelListContent.tsx:381-500). notif_settings::hides_muted_channels(app, guild).
  • DmRowModel.muted from the @me override; is_muted on a thread = membership mute or parent muted at any level.
  • notif_settings::muted_until(&App, MuteTarget::Guild) for the rail tooltip already exists from Daily use 12; Daily use 30 draws it.

Tests

  • crates/fluxer-core/tests/notification_rules.rs: notification_decision_table (54 rows: DND × SUPPRESS_NOTIFICATIONS × mute guild/category/channel/DM/thread member × guild/category/channel level × suppress everyone/roles × mention user/everyone/role/other role × DM × joined/unjoined thread × forum post first/later message × blocked), own_message_never_notifies_even_at_all_messages.
  • crates/fluxer-core/tests/mute_consumers.rs: muted_channel_not_unread_mentions_still_count, guild_unread_ignores_muted_channels, sidebar_rows_carry_muted, hide_muted_channels_rules, hide_muted_default_from_user_settings_when_no_entry, all_hidden_category_hidden, selected_muted_channel_still_shown, dm_counts_as_mention_unless_muted, guild_mentions_follow_suppress_settings.
  • Fixtures: no new event or endpoint; settings are the existing fixtures/gateway/user_guild_settings_update.json with fields reset, threads shaped as fixtures/gateway/thread_create.json.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No desktop (FLUXER_DESKTOP_TESTS=1) tests involved.

Deviations and points for the reviewer

  • Category mute blocks notifications (plan and spec §6.2 "muted at any level"). The original's resolvesToNoMessages uses isGuildOrChannelMuted, which does not look at the parent category, so in Electron a muted category still notifies for its channels. Built as the plan says; flip to guild-or-channel in notifications::should_notify if parity is preferred.
  • Unread dot: the original's row hides the dot only for a directly muted channel (ChannelItem.tsx:273), the guild pill for any level. Here unread is false at any level for both, as the plan's interface says.
  • Default level: a guild without settings is at ALL_MESSAGES (the original's DEFAULT_GUILD_SETTINGS), so every guild message now notifies by default. tests/notifications.rs::guild_message_without_mention_does_not_notify now sets ONLY_MENTIONS first, and tests/messages.rs::message_create_in_a_channel_that_is_not_loaded_only_moves_the_unread_marker allows the notification effect. INHERIT/NULL at guild level still fall back to ALL_MESSAGES instead of the guild's default_message_notifications / ONLY_MENTIONS for large guilds: tracked in #558 (a server-created entry is INHERIT, GuildMemberOperationsService.ts:683-700).
  • Outside the Files list (one-line each): chat/navigation.rs (new_messages_bar) and chat/thread_admin.rs (thread menu "Mark as read") now read has_unread_messages, so a muted channel keeps its new-messages bar and a muted thread its "Mark as read" as in the original; lib.rs re-exports has_unread_messages.
  • The @everyone check no longer requires can_view (the original does not; the server only sets mention_everyone when allowed).
  • DND reads app.presence.me.chosen, which Daily use 14 fills; the table sets it directly (and user_settings.status = "dnd" in READY).

Closes #498

🤖 Generated with Claude Code

Stacked on: dailyuse-12-core-notification-settings-mutes ## What this builds (Daily use 13, spec §3.4 "Consumers", §6.2) - `notif_settings::mentions_me` as the original (`MessageUtils.isMentioned` + `Notification.isMessageMentionLike`): blocked author never; the user in `mentions`; `@everyone`/`@here` outside a 1:1 DM unless `suppress_everyone` or in a thread the user has not joined; a role of the user's unless `suppress_roles`; any message of a DM/group DM that is not muted. - `notification_for` follows `feat/ui/state/Notification.ts:187-256`, in order: own message, blocked author, chosen status DND (`app.presence.me.chosen`), `SUPPRESS_NOTIFICATIONS` (`1 << 12`) → none; threads: muted (membership mute, or parent muted at any level, `isThreadMuted`) → none, else `notif_settings::thread_level` (joined: member flags, Default = parent's effective level; unjoined: forum level for a post's first message, else ONLY_MENTIONS); other channels: muted at any level → none, NO_MESSAGES → none, ALL_MESSAGES → notify, ONLY_MENTIONS → `mentions_me`. Module header rewritten. - `read_state::unread` is false for a channel muted at any level; `mention_count` unchanged, so the guild rail (`fluxer-ui` `model.rs`) and DM rows follow with no UI change. New `read_state::has_unread_messages` keeps the mute-blind answer. - `channel_tree`: `SidebarSection` gains `category_muted` and `muted` (rows/category muted by their own override, dimmed as `ChannelItem.tsx:242-273,546`); with `hide_muted_channels` (or, without a settings entry, `user_settings.default_hide_muted_channels()`), channels muted by their own or their category's override are left out unless selected, connected or with a mention, and a category whose channels are all left out goes too (`ChannelListVisibility.ts`, `ChannelListContent.tsx:381-500`). `notif_settings::hides_muted_channels(app, guild)`. - `DmRowModel.muted` from the `@me` override; `is_muted` on a thread = membership mute or parent muted at any level. - `notif_settings::muted_until(&App, MuteTarget::Guild)` for the rail tooltip already exists from Daily use 12; Daily use 30 draws it. ## Tests - `crates/fluxer-core/tests/notification_rules.rs`: `notification_decision_table` (54 rows: DND × `SUPPRESS_NOTIFICATIONS` × mute guild/category/channel/DM/thread member × guild/category/channel level × suppress everyone/roles × mention user/everyone/role/other role × DM × joined/unjoined thread × forum post first/later message × blocked), `own_message_never_notifies_even_at_all_messages`. - `crates/fluxer-core/tests/mute_consumers.rs`: `muted_channel_not_unread_mentions_still_count`, `guild_unread_ignores_muted_channels`, `sidebar_rows_carry_muted`, `hide_muted_channels_rules`, `hide_muted_default_from_user_settings_when_no_entry`, `all_hidden_category_hidden`, `selected_muted_channel_still_shown`, `dm_counts_as_mention_unless_muted`, `guild_mentions_follow_suppress_settings`. - Fixtures: no new event or endpoint; settings are the existing `fixtures/gateway/user_guild_settings_update.json` with fields reset, threads shaped as `fixtures/gateway/thread_create.json`. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No desktop (`FLUXER_DESKTOP_TESTS=1`) tests involved. ## Deviations and points for the reviewer - **Category mute blocks notifications** (plan and spec §6.2 "muted at any level"). The original's `resolvesToNoMessages` uses `isGuildOrChannelMuted`, which does not look at the parent category, so in Electron a muted category still notifies for its channels. Built as the plan says; flip to guild-or-channel in `notifications::should_notify` if parity is preferred. - **Unread dot**: the original's row hides the dot only for a directly muted channel (`ChannelItem.tsx:273`), the guild pill for any level. Here `unread` is false at any level for both, as the plan's interface says. - **Default level**: a guild without settings is at ALL_MESSAGES (the original's `DEFAULT_GUILD_SETTINGS`), so every guild message now notifies by default. `tests/notifications.rs::guild_message_without_mention_does_not_notify` now sets ONLY_MENTIONS first, and `tests/messages.rs::message_create_in_a_channel_that_is_not_loaded_only_moves_the_unread_marker` allows the notification effect. INHERIT/NULL at guild level still fall back to ALL_MESSAGES instead of the guild's `default_message_notifications` / ONLY_MENTIONS for large guilds: tracked in #558 (a server-created entry is INHERIT, `GuildMemberOperationsService.ts:683-700`). - Outside the Files list (one-line each): `chat/navigation.rs` (`new_messages_bar`) and `chat/thread_admin.rs` (thread menu "Mark as read") now read `has_unread_messages`, so a muted channel keeps its new-messages bar and a muted thread its "Mark as read" as in the original; `lib.rs` re-exports `has_unread_messages`. - The `@everyone` check no longer requires `can_view` (the original does not; the server only sets `mention_everyone` when allowed). - DND reads `app.presence.me.chosen`, which Daily use 14 fills; the table sets it directly (and `user_settings.status = "dnd"` in READY). Closes #498 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every UserAction, CoreEvent, Effect, ApiRequest/ApiResult and chat::Confirm
variant of the Daily use plan (Task 11a), plus the menu types (menus::MenuModel,
MenuItem, MenuItemKind, MenuItemId, MenuModel::flatten). New actions and events
do nothing yet; the runtime answers each new request with 501 CLIENT_NOT_WIRED
and logs Effect::Window until Daily use 28. MessageUser and CloseDm take a
confirmed flag and act as before; Notification gains icon (always None).

Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #496

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
New domains notif_settings, social, invites, switcher, keynav and report with
their state, Default and stub reducers wired into App::apply; stub menu
builders (channel, category, guild, user, dm, mute::item); OwnPresence, profile
notes and modal state. Relationships move from chat::dms to app.social and are
read through social::relationship.

Refs #496

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings from READY, USER_GUILD_SETTINGS_UPDATE and the patch answers;
immediate menu mutes (guild scalars, whole channel_overrides map for
channels, categories and DMs in @me), mute_config in ms, local expiry
timers, 3 s debounced modal changes, revert on failure, selectors
is_muted / muted_until / level / guild_settings_modal, and the shared
mute menu row (MuteTargetMenuItem.tsx, MuteOptions.ts,
UserGuildSettings.ts, UserGuildSettingsCommands.ts).

Refs #497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
format_date_time shifted the end with to_offset, which panics when the
local date leaves year 9999 (a 9999-12-31T23:30Z end read east of UTC).
It now uses checked_to_offset and falls back to UTC. The
event_replaces_guild_settings test now checks the staff override is
really gone instead of an always-true assertion.

Refs #497

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Table tests for the notification decision (Notification.ts:187-256) and
tests for mute consumers: unread, guild pill, hide muted channels, DM
mentions. Stubs for SidebarSection.{category_muted,muted} and
notif_settings::hides_muted_channels so the tests compile.

Refs #498

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- notif_settings::mentions_me as MessageUtils.isMentioned and
  Notification.isMessageMentionLike: blocked author no, user mention,
  @everyone unless suppressed or in an unjoined thread, own role unless
  suppressed, unmuted DM.
- notification_for follows Notification.ts:187-256: own, blocked, DND,
  SUPPRESS_NOTIFICATIONS, then thread levels (member level, parent level,
  forum new-post level, else only mentions) or mute at any level and the
  effective level.
- read_state::unread is false for a muted channel (mention counts kept);
  has_unread_messages keeps the raw answer for the new-messages bar and
  the thread menu's Mark as read.
- channel_tree: category_muted and muted rows; hide muted channels per
  guild (default_hide_muted_channels without an entry), unless selected,
  connected or with a mention; all-hidden categories hidden.
- DmRowModel.muted from the @me override; a thread is muted by its
  membership or its parent at any level.

Refs #498

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Independent review: Daily use 13 (core honour mutes)

Reviewed cold: git diff 44794a88..origin/dailyuse-13-core-honour-mutes (61e2eba).

Plan tests (1): every test the plan's Step 1 names exists. notification_decision_table has 54 rows (the plan asks for at least 36) and covers DND × SUPPRESS_NOTIFICATIONS (1 << 12) × guild/category/channel/DM/thread-member mute × guild/category/channel level × suppress everyone/roles × user/everyone/role/other-role mention × DM × joined/unjoined thread × forum post first/later message × blocked author. The other tests are muted_channel_not_unread_mentions_still_count, guild_unread_ignores_muted_channels, hide_muted_channels_rules, hide_muted_default_from_user_settings_when_no_entry, all_hidden_category_hidden, selected_muted_channel_still_shown and dm_counts_as_mention_unless_muted, plus two extra tests. Thread member flag bits (1<<1, 1<<2, 1<<3) match packages/constants/src/ThreadConstants.ts:64-69.

Interfaces (2): these exist as the plan writes them: mentions_me, read_state::unread (false when the channel is muted at any level, mention_count unchanged), DmRowModel.muted, notif_settings::muted_until(&App, Guild) (from Daily use 12) and hides_muted_channels. The plan's "sidebar rows carry muted: bool" is built as SidebarSection { category_muted, muted: BTreeSet<Snowflake> }, because sidebar rows are plain Channels. Daily use 30 can read it as it is, so nothing breaks. The new has_unread_messages stays mute-blind, so the new-messages bar and the thread "Mark as read" item keep their behaviour.

Invariants (3): fluxer-core still has no forbidden imports and does no I/O. The change adds no fixtures: the tests reuse user_guild_settings_update.json and thread shapes taken from thread_create.json. Nothing new writes synced settings. Unknown notification levels fall through to the only-mentions path, so they cannot panic. No secrets or file paths.

Parity spot-checks (4) against the fork:

  • MessageUtils.isMentioned: @everyone is skipped for a 1:1 DM, when suppressed, or when ignoreEveryone is set; then the user mention; then a role check that suppressRoles turns off. The Rust port is equivalent, including the unjoined-thread ignoreEveryone from Notification.ts:191-197.
  • ThreadNotificationUtils.isThreadMuted / resolveThreadNotificationLevel and ForumNotificationUtils.resolveNewPostNotificationLevel (the first message of a post, parent isThreadOnly): ported exactly.
  • ChannelListVisibility.shouldShowChannelWhenHidingMutedChannels / shouldShowCategoryWhenHidingMutedChannels, and dimming only for isChannelDirectlyMuted (ChannelListContent.tsx:353,377-408): match. For a muted channel with unread badges off, hasVisibleUnread is mention-only (ChannelUnreadState.ts default branch), as implemented.
  • UserGuildSettings defaults: a guild without settings is at ALL_MESSAGES (DEFAULT_GUILD_SETTINGS), so the two adjusted existing tests are correct.

Review Focus 2 (5): the order follows validateNotificationData (own message, blocked, DND, SUPPRESS flag, then mute, then level), and a mention in a muted channel still adds to its badge (mention_count is untouched).

Findings

  1. minor (parity, spec-mandated): in a non-thread channel, a mute on the category blocks notifications. The original's resolvesToNoMessages checks only isGuildOrChannelMuted, not the category. Spec §3.4/§6.2 and the plan say "any level", so building it this way is right. The spec's parity claim is still wrong, though. Suggest a follow-up/question issue so Charles can choose.
  2. minor (parity, plan-mandated): unread hides the row dot for a mute at any level. The original's channel row and DMListItem.tsx:133 use isChannelDirectlyMuted. The guild pill does use any level. The plan asks for one unread, so this is acceptable. The difference would matter for a channel whose category or guild is muted: the original still shows its dot.
  3. minor: a DM in the @me scope is not muted by a muted: true at the scope level. The original's isGuildOrChannelMuted(null, id) also checks isWholeGuildMuted(null). This cannot be reached from any UI and is an edge case of the Daily use 12 is_muted, not this diff.
  4. minor: is_muted on a thread now means "parent muted at any level" (isThreadMuted), and the sidebar/unread consumers use it too. The original's sidebar uses isThreadMutedInSidebar (parent directly muted). Same any-level choice as finding 2.

No blocking findings.

Local gate (6): FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in the review worktree: green ("all steps passed", exit 0; livekit-interop skipped as usual).

Verdict: approve: no blocking findings and CI is green. The minor findings 1, 2 and 4 are the spec/plan's any-level choice and are worth a follow-up question to Charles.

## Independent review: Daily use 13 (core honour mutes) Reviewed cold: `git diff 44794a88..origin/dailyuse-13-core-honour-mutes` (61e2eba). **Plan tests (1):** every test the plan's Step 1 names exists. `notification_decision_table` has 54 rows (the plan asks for at least 36) and covers DND × `SUPPRESS_NOTIFICATIONS` (1 << 12) × guild/category/channel/DM/thread-member mute × guild/category/channel level × suppress everyone/roles × user/everyone/role/other-role mention × DM × joined/unjoined thread × forum post first/later message × blocked author. The other tests are `muted_channel_not_unread_mentions_still_count`, `guild_unread_ignores_muted_channels`, `hide_muted_channels_rules`, `hide_muted_default_from_user_settings_when_no_entry`, `all_hidden_category_hidden`, `selected_muted_channel_still_shown` and `dm_counts_as_mention_unless_muted`, plus two extra tests. Thread member flag bits (1<<1, 1<<2, 1<<3) match `packages/constants/src/ThreadConstants.ts:64-69`. **Interfaces (2):** these exist as the plan writes them: `mentions_me`, `read_state::unread` (false when the channel is muted at any level, `mention_count` unchanged), `DmRowModel.muted`, `notif_settings::muted_until(&App, Guild)` (from Daily use 12) and `hides_muted_channels`. The plan's "sidebar rows carry `muted: bool`" is built as `SidebarSection { category_muted, muted: BTreeSet<Snowflake> }`, because sidebar rows are plain `Channel`s. Daily use 30 can read it as it is, so nothing breaks. The new `has_unread_messages` stays mute-blind, so the new-messages bar and the thread "Mark as read" item keep their behaviour. **Invariants (3):** fluxer-core still has no forbidden imports and does no I/O. The change adds no fixtures: the tests reuse `user_guild_settings_update.json` and thread shapes taken from `thread_create.json`. Nothing new writes synced settings. Unknown notification levels fall through to the only-mentions path, so they cannot panic. No secrets or file paths. **Parity spot-checks (4)** against the fork: - `MessageUtils.isMentioned`: @everyone is skipped for a 1:1 DM, when suppressed, or when `ignoreEveryone` is set; then the user mention; then a role check that `suppressRoles` turns off. The Rust port is equivalent, including the unjoined-thread ignoreEveryone from `Notification.ts:191-197`. - `ThreadNotificationUtils.isThreadMuted` / `resolveThreadNotificationLevel` and `ForumNotificationUtils.resolveNewPostNotificationLevel` (the first message of a post, parent `isThreadOnly`): ported exactly. - `ChannelListVisibility.shouldShowChannelWhenHidingMutedChannels` / `shouldShowCategoryWhenHidingMutedChannels`, and dimming only for `isChannelDirectlyMuted` (`ChannelListContent.tsx:353,377-408`): match. For a muted channel with unread badges off, `hasVisibleUnread` is mention-only (`ChannelUnreadState.ts` default branch), as implemented. - `UserGuildSettings` defaults: a guild without settings is at ALL_MESSAGES (`DEFAULT_GUILD_SETTINGS`), so the two adjusted existing tests are correct. **Review Focus 2 (5):** the order follows `validateNotificationData` (own message, blocked, DND, SUPPRESS flag, then mute, then level), and a mention in a muted channel still adds to its badge (`mention_count` is untouched). ### Findings 1. **minor (parity, spec-mandated):** in a non-thread channel, a mute on the category blocks notifications. The original's `resolvesToNoMessages` checks only `isGuildOrChannelMuted`, not the category. Spec §3.4/§6.2 and the plan say "any level", so building it this way is right. The spec's parity claim is still wrong, though. Suggest a `follow-up`/`question` issue so Charles can choose. 2. **minor (parity, plan-mandated):** `unread` hides the row dot for a mute at any level. The original's channel row and `DMListItem.tsx:133` use `isChannelDirectlyMuted`. The guild pill does use any level. The plan asks for one `unread`, so this is acceptable. The difference would matter for a channel whose category or guild is muted: the original still shows its dot. 3. **minor:** a DM in the `@me` scope is not muted by a `muted: true` at the scope level. The original's `isGuildOrChannelMuted(null, id)` also checks `isWholeGuildMuted(null)`. This cannot be reached from any UI and is an edge case of the Daily use 12 `is_muted`, not this diff. 4. **minor:** `is_muted` on a thread now means "parent muted at any level" (`isThreadMuted`), and the sidebar/unread consumers use it too. The original's sidebar uses `isThreadMutedInSidebar` (parent directly muted). Same any-level choice as finding 2. No blocking findings. **Local gate (6):** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in the review worktree: green ("all steps passed", exit 0; livekit-interop skipped as usual). Verdict: **approve**: no blocking findings and CI is green. The minor findings 1, 2 and 4 are the spec/plan's any-level choice and are worth a follow-up question to Charles.
Author
Owner

Independent review: Daily use 13 (core honour mutes)

Reviewed git diff 44794a8..origin/dailyuse-13-core-honour-mutes (61e2eba) cold.

Local gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a fresh review worktree: all steps passed (exit 0).

Checks

  1. Plan tests: all present and asserting what the plan says: notification_decision_table (54 rows: DND × SUPPRESS_NOTIFICATIONS × mute guild/category/channel/DM/thread-member × level incl. overrides/INHERIT × suppress everyone/roles × mention user/everyone/role/other role × DM × joined/unjoined thread × forum post × blocked), muted_channel_not_unread_mentions_still_count, guild_unread_ignores_muted_channels, hide_muted_channels_rules, hide_muted_default_from_user_settings_when_no_entry, all_hidden_category_hidden, selected_muted_channel_still_shown, dm_counts_as_mention_unless_muted. There are also extras for the sidebar's muted flags and suppress settings.
  2. Interfaces: mentions_me, read_state::unread (false when muted, mention counts unchanged), notif_settings::muted_until(&App, MuteTarget::Guild), hides_muted_channels, thread_level, and notification_for in the plan's order are all present. The plan says "sidebar rows carry muted: bool". Sidebar rows are Channels here, so the flag lives on SidebarSection as muted: BTreeSet<Snowflake> plus category_muted: bool. Task 30 can read it with section.muted.contains(&id). See finding 1.
  3. Invariants: fluxer-core gains no I/O and no forbidden crate. There are no new fixtures (tests reuse ready.json / user_guild_settings_update.json). The thread → parent recursion in is_muted is guarded (the parent must be a different channel that is not a thread), so server data cannot loop it. No secrets.
  4. Parity spot-checks against the fork:
    • MessageUtils.isMentioned: @everyone only outside a DM, and not when suppressed or ignoreEveryone. Then the user is named. Then a role of the member, unless roles are suppressed. Native mentions_me matches, adding the blocked-author check that spec §6.2 asks for.
    • ThreadNotificationUtils: the ALL / ONLY / NO member-flag order, then the parent's effective level, else ONLY_MENTIONS. resolveNewPostNotificationLevel applies only when messageId === post.id. isThreadMuted is a membership mute (with end_time) or a parent muted at any level. Native thread_level and is_muted match.
    • ChannelListVisibility.ts and ChannelListContent.tsx:376-500: the selected / connected / not-muted / visible-unread rule. Category hiding needs hasChannels && !hasVisibleChannels. Rows and categories are dimmed only for their own override (isChannelDirectlyMuted), and a guild mute alone hides nothing. Native matches.
    • DEFAULT_GUILD_SETTINGS.message_notifications = ALL_MESSAGES (UserGuildSettings.ts:67), so a guild without an entry notifies every message. This matches, and explains the changes to tests/messages.rs and tests/notifications.rs.
  5. Review Focus 2: covered by the table. Mentions still badge in muted channels, DM-muted vs guild-muted is distinguished, and thread levels are included.

Findings

  1. minor: Interface wording. The plan names a per-row muted: bool, but the code has a per-section muted: BTreeSet<Snowflake> + category_muted. This is equivalent and documented in the README, and no consumer exists yet. Task 30's implementer should be told the actual shape.
  2. minor: Deliberate, listed deviations, both consistent with the plan's "muted at any level":
    • Non-thread notifications are blocked by a category mute, where the original uses isGuildOrChannelMuted.
    • A thread's unread is false when its parent is muted at any level, where the original's sidebar uses isThreadMutedInSidebar, which checks only a direct parent mute.
  3. minor: The ALL_MESSAGES fallback for a guild-level INHERIT/NULL, where the original uses guild.effectiveMessageNotifications, now has a visible effect. Such guilds notify on every message. The server writes INHERIT on join when "hide muted by default" is on (GuildMemberOperationsService.ts:683-698). This is already tracked in #558; worth prioritising before daily use.
  4. minor: is_private also counts DmPersonalNotes; the original's isPrivate covers only DM and group DM. Moot in practice, because only the user writes there.

No blocking findings.

Verdict: approve (0 blocking, CI green locally).

## Independent review: Daily use 13 (core honour mutes) Reviewed `git diff 44794a8..origin/dailyuse-13-core-honour-mutes` (61e2eba) cold. **Local gate:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a fresh review worktree: **all steps passed** (exit 0). ### Checks 1. **Plan tests:** all present and asserting what the plan says: `notification_decision_table` (54 rows: DND × `SUPPRESS_NOTIFICATIONS` × mute guild/category/channel/DM/thread-member × level incl. overrides/INHERIT × suppress everyone/roles × mention user/everyone/role/other role × DM × joined/unjoined thread × forum post × blocked), `muted_channel_not_unread_mentions_still_count`, `guild_unread_ignores_muted_channels`, `hide_muted_channels_rules`, `hide_muted_default_from_user_settings_when_no_entry`, `all_hidden_category_hidden`, `selected_muted_channel_still_shown`, `dm_counts_as_mention_unless_muted`. There are also extras for the sidebar's muted flags and suppress settings. 2. **Interfaces:** `mentions_me`, `read_state::unread` (false when muted, mention counts unchanged), `notif_settings::muted_until(&App, MuteTarget::Guild)`, `hides_muted_channels`, `thread_level`, and `notification_for` in the plan's order are all present. The plan says "sidebar rows carry `muted: bool`". Sidebar rows are `Channel`s here, so the flag lives on `SidebarSection` as `muted: BTreeSet<Snowflake>` plus `category_muted: bool`. Task 30 can read it with `section.muted.contains(&id)`. See finding 1. 3. **Invariants:** fluxer-core gains no I/O and no forbidden crate. There are no new fixtures (tests reuse `ready.json` / `user_guild_settings_update.json`). The thread → parent recursion in `is_muted` is guarded (the parent must be a different channel that is not a thread), so server data cannot loop it. No secrets. 4. **Parity spot-checks against the fork:** - `MessageUtils.isMentioned`: @everyone only outside a DM, and not when suppressed or `ignoreEveryone`. Then the user is named. Then a role of the member, unless roles are suppressed. Native `mentions_me` matches, adding the blocked-author check that spec §6.2 asks for. - `ThreadNotificationUtils`: the ALL / ONLY / NO member-flag order, then the parent's effective level, else ONLY_MENTIONS. `resolveNewPostNotificationLevel` applies only when `messageId === post.id`. `isThreadMuted` is a membership mute (with `end_time`) or a parent muted at any level. Native `thread_level` and `is_muted` match. - `ChannelListVisibility.ts` and `ChannelListContent.tsx:376-500`: the selected / connected / not-muted / visible-unread rule. Category hiding needs `hasChannels && !hasVisibleChannels`. Rows and categories are dimmed only for their own override (`isChannelDirectlyMuted`), and a guild mute alone hides nothing. Native matches. - `DEFAULT_GUILD_SETTINGS.message_notifications = ALL_MESSAGES` (`UserGuildSettings.ts:67`), so a guild without an entry notifies every message. This matches, and explains the changes to `tests/messages.rs` and `tests/notifications.rs`. 5. **Review Focus 2:** covered by the table. Mentions still badge in muted channels, DM-muted vs guild-muted is distinguished, and thread levels are included. ### Findings 1. **minor**: Interface wording. The plan names a per-row `muted: bool`, but the code has a per-section `muted: BTreeSet<Snowflake>` + `category_muted`. This is equivalent and documented in the README, and no consumer exists yet. Task 30's implementer should be told the actual shape. 2. **minor**: Deliberate, listed deviations, both consistent with the plan's "muted at any level": - Non-thread notifications are blocked by a category mute, where the original uses `isGuildOrChannelMuted`. - A thread's `unread` is false when its parent is muted at any level, where the original's sidebar uses `isThreadMutedInSidebar`, which checks only a direct parent mute. 3. **minor**: The ALL_MESSAGES fallback for a guild-level INHERIT/NULL, where the original uses `guild.effectiveMessageNotifications`, now has a visible effect. Such guilds notify on every message. The server writes INHERIT on join when "hide muted by default" is on (`GuildMemberOperationsService.ts:683-698`). This is already tracked in #558; worth prioritising before daily use. 4. **minor**: `is_private` also counts `DmPersonalNotes`; the original's `isPrivate` covers only DM and group DM. Moot in practice, because only the user writes there. No blocking findings. **Verdict: approve** (0 blocking, CI green locally).
Author
Owner

Merged into dailyuse at f7972c3 (combined merge of 23 Daily use tasks plus textchat).

Merged into `dailyuse` at f7972c3 (combined merge of 23 Daily use tasks plus `textchat`).
charles closed this pull request 2026-11-15 06:08:50 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.