Skip to content

Review Request Type filter is applied to all notifications, not just review requestsΒ #3318

Description

@gndaniela

πŸ“ Description

The Review Request Type filter (Direct / Team) is evaluated against every notification rather than only against review requests. Checking Direct therefore hides everything that has no review-request data β€” @mentions, comments on threads I authored, assigned issues β€” leaving only direct review requests in the list.

Expected behaviour: the filter should narrow which review requests are shown and pass everything else through. "Direct" should mean "of my review requests, show only the ones aimed at me directly", not "show direct review requests and nothing else".

Likely cause, in src/renderer/utils/notifications/filters/:

  • filter.ts β†’ passesReviewRequestTypeFilter() runs unconditionally for every notification inside filterDetailedNotifications().
  • reviewRequestType.ts β†’ filterNotification() returns notification.subject?.reviewRequested?.includes(type) ?? false.
  • subject.reviewRequested is only populated by the pull request handler (getReviewRequestTypes() in handlers/pullRequest.ts), so it is undefined for issues, discussions and releases, and [] for PRs with no pending review requests. All of those fail the filter and get dropped.

A guard in passesReviewRequestTypeFilter() β€” return true unless the notification's reason is review_requested (or unless subject.reviewRequested is present) β€” would restore the expected behaviour.

πŸͺœ Steps To Reproduce

  1. Settings β†’ Notifications β†’ enable Fetch detailed notifications
  2. Have at least one unread notification that is not a review request β€” e.g. an issue where you were personally @mentioned
  3. Filters β†’ Review Request Type β†’ check Direct
  4. The @mention disappears; only direct review requests remain

πŸͺ΅ Log Excerpts

No response

Gitify Version

7.8.0

Operating System

macOS

Forge

GitHub

Forge Variant

No response

πŸ“Έ Screenshots

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions