select-notifications - Add "Bots" selection#8859
Merged
Conversation
Co-authored-by: fregante <[email protected]>
Co-authored-by: fregante <[email protected]>
select-notifications - Add "Bots" selection
Copilot
AI
changed the title
Add "Bots" filter to select-notifications feature
Jan 9, 2026
select-notifications - Add "Bots" selection
fregante
reviewed
Jan 10, 2026
source/github-helpers/selectors.ts
Outdated
|
|
||
| export const botLinksNotificationSelectors = [ | ||
| // Notification list items with bot avatars | ||
| `.notification-list-item-link a:is(${botAttributes})`, |
Member
There was a problem hiding this comment.
@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&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&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&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>
Contributor
Author
There was a problem hiding this comment.
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 <[email protected]>
select-notifications - Add "Bots" selection
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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: AddedbotLinksNotificationSelectorsthat 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 existingbotAttributespatternsource/features/select-notifications.tsx: Added "Bots" to Type category dropdown with HubotIconTest 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
handle-bot-notiticationsfeature #5780💡 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.