Skip to content

fix: stop star notifications from people you mute - #797

Open
sulimanbenhalim wants to merge 2 commits into
dev-null-sh:productionfrom
sulimanbenhalim:fix/star-notification-respects-mutes
Open

sulimanbenhalim wants to merge 2 commits into
dev-null-sh:productionfrom
sulimanbenhalim:fix/star-notification-respects-mutes

Conversation

@sulimanbenhalim

@sulimanbenhalim sulimanbenhalim commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

muting someone is supposed to stop their notifications but a star from them still created one
CreateStarNotification was the only notification from another user that skipped the mute check
the row stayed hidden while muted and even marking everything read left it unread so it popped up as soon as you unmuted them

now it skips authors who mute the stargazer the same way CreateFollowNotification does
added a test that fails without the change and the full suite passes at 100% coverage

Summary by CodeRabbit

  • Bug Fixes
    • Star notifications are no longer sent to people who have muted the person who starred an item. The person who starred it also continues to be excluded from receiving a notification about their own action. This applies to notification recipients across commit and organization-member scenarios.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 78d7d476-95ae-45d6-9fa6-d4189061940f
Commits

Reviewing files that changed from the base of the PR and between 6a8dceb and bfc2a4d.

Files selected for processing: 2
  • app/Actions/CreateStarNotification.php
  • tests/Unit/Actions/CreateStarNotificationTest.php

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

Star notifications now exclude recipients who muted the stargazer. Tests cover muted commit authors and organization members.

Changes: Star notification mute filtering

Layer / File(s) Summary
Filter muted recipients
app/Actions/CreateStarNotification.php, tests/Unit/Actions/CreateStarNotificationTest.php
The recipient query excludes users who muted the stargazer. Tests check that a muted commit author receives no notification and that only the commit member receives a notification in the organization scenario.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related issues

  • dev-null-sh/dev-null.sh#740 — The issue concerns mute filtering for starred notifications, though it specifies muted-thread filtering rather than muted stargazers.

Possibly related PRs

Suggested reviewers: mnapoli, xheaven

Merge Risk: Minimal · up to bfc2a

The notification filtering change is ready to merge.

Security architecture risk: Minimal · up to bfc2a

The change prevents unwanted notifications without expanding access or weakening existing controls. No material security risk was found in the affected behavior.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed outcome is limited to notification rows for the starred commit's personal author or organization members. The predicate narrows that recipient set; it does not introduce another recipient source or greater authority.

Trust Boundaries and Controls

  • observed — The inspected web and API controllers pass the current user as the star actor. Their request authorization denies stars on owned commits and requires commit visibility. These callers and controls are unchanged by the PR; the public PHP method does not establish a newly exposed endpoint.

Resilience and Maintainability Implications

  • inferred — Recipient selection and insertion remain separate statements, so a mute can interleave between them. Existing query-time filtering still hides notifications from muted actors. A stored notification reappearing after unmute is pre-existing behavior, not a security regression introduced by this predicate.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: preventing star notifications from users who muted the recipient.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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