E529 `select-notifications` - Add "Bots" selection by Copilot · Pull Request #8859 · refined-github/refined-github · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Copy link
Contributor
Copilot AI commented Jan 9, 2026

Adds a "Bots" option to the notification filter dropdown, allowing users to select all bot notifications (dependabot, renovate-bot, etc.) at once for bulk actions.

Changes

  • source/github-helpers/selectors.ts: Added botLinksNotificationSelectors that matches notifications where a bot is the primary author by targeting .AvatarStack-body a.avatar:last-child (last in DOM order, first in avatar list), reusing existing botAttributes pattern
  • source/features/select-notifications.tsx: Added "Bots" to Type category dropdown with HubotIcon

Test URLs

https://github.com/notifications

Screenshot

(Manual testing required - the filter appears in the "Select by" dropdown under Type category alongside Pull requests, Issues, and Others)

Original prompt

This section details on the original issue you should resolve

<issue_title>Add handle-bot-notitications feature</issue_title>
<issue_description>### Description

I receive lots of notifications caused by bots (dependabot in my case), and "real" notifications can get lost in the noise.

So here are two ideas:

  • It would be neat if those notifications could be dimmed (just like in the PR page).
  • It would also be nice to have a button which selects them all in order to quickly mark them as read.

Thanks for this extension by the way! ❤️

Screenshot

Two real notifications followed by bot noise:

image

(picture several pages worth of notifications 😞)

Example URLs

https://github.com/notifications</issue_description>

<agent_instructions>Add "bots" item to select-notifications feature.
selectors.ts has a list of bots and a selector that might already work here</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@fregante I think the most common approach here would be to:
  1. Select unread notifications by bots
  2. Mark them as done permanently (aka. unsubscribe)

Can this be turned into a single, very specific button?

Screen Shot Screen Shot

Our alternatives:

I think something like this was asked before.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 9, 2026 12:00
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
@fregante fregante changed the title [WIP] Add handle bot notifications feature select-notifications - Add "Bots" selection Jan 9, 2026
Copilot AI changed the title select-notifications - Add "Bots" selection Add "Bots" filter to select-notifications feature Jan 9, 2026
Copilot AI requested a review from fregante January 9, 2026 12:05
@fregante fregante closed this Jan 10, 2026
@fregante fregante reopened this Jan 10, 2026

export const botLinksNotificationSelectors = [
// Notification list items with bot avatars
`.notification-list-item-link a:is(${botAttributes})`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot This isn't selecting anything. The bots can be found in the avatar list. Only select them if the bot is the first in the list (last in DOM). DOM example:

<div class="d-flex flex-row flex-md-row-reverse">
      <p class="note m-0 d-md-block d-none color-fg-muted text-right pr-3 flex-shrink-0 notification-list-item-hide-on-hover" style="width: 140px; line-height: 20px;">
        <relative-time datetime="2025-11-10T21:12:40Z" class="no-wrap" title="Nov 11, 2025, 4:12 AM GMT+7">Nov 11, 2025</relative-time>
        <span class="text-center d-inline-block notification-is-starred-icon color-fg-severe ml-1" style="width:16px">
          <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bookmark v-align-middle">
    <path d="M3 2.75C3 1.784 3.784 1 4.75 1h6.5c.966 0 1.75.784 1.75 1.75v11.5a.75.75 0 0 1-1.227.579L8 11.722l-3.773 3.107A.751.751 0 0 1 3 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.91l3.023-2.489a.75.75 0 0 1 .954 0l3.023 2.49V2.75a.25.25 0 0 0-.25-.25Z"></path>
</svg>
        </span>
      </p>

          <div style="width: 70px; min-width: 70px;" class="AvatarStack AvatarStack--three-plus AvatarStack--right mr-0 mr-sm-3 mr-md-0 mr-lg-0 clearfix d-inline-block">
            <div class="AvatarStack-body">
                <a class="avatar avatar-user" data-hovercard-type="user" data-hovercard-url="/users/grahamlangford/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bro" aria-keyshortcuts="Alt+ArrowUp"><img class=" avatar-user" src="https://avatars.githubusercontent.com/u/3706330?s=40&amp;v=4" width="20" height="20" alt="@bro"></a>
                <a class="avatar avatar-user" href="/apps/github-actions"><img src="https://avatars.githubusercontent.com/in/15368?s=40&amp;v=4" width="20" height="20" alt="@github-actions"></a>
                <a class="avatar avatar-user" href="/apps/renovate"><img src="https://avatars.githubusercontent.com/in/2740?s=40&amp;v=4" width="20" height="20" alt="@renovate"></a>
            </div>
          </div>

        <span class="f6 flex-self-center ml-2 px-2 flex-shrink-0">manual</span>
    </div>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7ea8695. The selector now targets .AvatarStack-body a.avatar:last-child to only select notifications where the bot is the primary author (last in DOM order, first in the avatar list).

Use .AvatarStack-body a.avatar:last-child to select only notifications where the bot is the primary/first author (last in DOM order)

Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Copilot AI requested a review from fregante January 10, 2026 08:22
@fregante fregante changed the title Add "Bots" filter to select-notifications feature select-notifications - Add "Bots" selection Jan 10, 2026
@fregante fregante marked this pull request as ready for review January 10, 2026 08:31
@fregante
Copy link
Member
Screenshot

@fregante fregante merged commit 2161890 into main Jan 10, 2026
16 checks passed
@fregante fregante deleted the copilot/add-handle-bot-notifications branch January 10, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Add handle-bot-notitications feature

2 participants

0