From 267fe2c08ac6544d835351c066fa56a161bc49d8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:41:16 +0000 Subject: [PATCH 1/7] Initial plan From fd1e0ddd07a91d8421726f13f5646decf5295dfe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:45:29 +0000 Subject: [PATCH 2/7] Initial plan for notification marking issue Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/@types/vscode.proposed.chatParticipantAdditions.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts index 71520fa1ec..aa7001a3d2 100644 --- a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts +++ b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts @@ -105,6 +105,7 @@ declare module 'vscode' { isComplete?: boolean; toolSpecificData?: ChatTerminalToolInvocationData; fromSubAgent?: boolean; + presentation?: 'hidden' | 'hiddenAfterComplete' | undefined; constructor(toolName: string, toolCallId: string, isError?: boolean); } From e32262210b251c4fef2883461b02234cda92f28d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:51:35 +0000 Subject: [PATCH 3/7] Add support for merged events and bot filtering in notifications - Add EventType.Merged as a meaningful event in _getMeaningfulEventTime - Filter out bot accounts (AccountType.Bot) from meaningful events - Filter out users with [bot] suffix or vs-code-engineering username - This fixes the issue where merged PRs by the current user don't get marked as done Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/notifications/notificationsManager.ts | 26 +++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/notifications/notificationsManager.ts b/src/notifications/notificationsManager.ts index 86fdfcaeab..dc988602b7 100644 --- a/src/notifications/notificationsManager.ts +++ b/src/notifications/notificationsManager.ts @@ -13,7 +13,7 @@ import { NOTIFICATION_SETTING, NotificationVariants, PR_SETTINGS_NAMESPACE } fro import { EventType, TimelineEvent } from '../common/timelineEvent'; import { toNotificationUri } from '../common/uri'; import { CredentialStore } from '../github/credentials'; -import { NotificationSubjectType } from '../github/interface'; +import { AccountType, NotificationSubjectType } from '../github/interface'; import { IssueModel } from '../github/issueModel'; import { issueMarkdown } from '../github/markdownUtils'; import { PullRequestModel } from '../github/pullRequestModel'; @@ -332,21 +332,39 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP } }; + // Helper to check if a user is a bot + const isBot = (user: { login: string, accountType?: AccountType }): boolean => { + // Check if accountType indicates this is a bot + if (user.accountType === AccountType.Bot) { + return true; + } + // Check for common bot naming patterns + if (user.login.endsWith('[bot]') || user.login === 'vs-code-engineering') { + return true; + } + return false; + }; + if (event.event === EventType.Committed) { - if (userCheck(event.author.login)) { + if (!isBot(event.author) && userCheck(event.author.login)) { return new Date(event.committedDate); } } else if (event.event === EventType.Commented) { - if (userCheck(event.user?.login)) { + if (event.user && !isBot(event.user) && userCheck(event.user.login)) { return new Date(event.createdAt); } } else if (event.event === EventType.Reviewed) { // We only count empty reviews as meaningful if the user is the current user if (isCurrentUser || (event.comments.length > 0 || event.body.length > 0)) { - if (userCheck(event.user?.login)) { + if (event.user && !isBot(event.user) && userCheck(event.user.login)) { return new Date(event.submittedAt); } } + } else if (event.event === EventType.Merged) { + // Merging a PR is a meaningful event + if (userCheck(event.user.login)) { + return new Date(event.createdAt); + } } } From 55385efbc6cb08bd7ca18010014aed59efa6e332 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:53:37 +0000 Subject: [PATCH 4/7] Add bot filtering for merge events - Check login patterns for merge events to filter out bots - MergedEvent.user is IActor (not IAccount), so we only check name patterns Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/notifications/notificationsManager.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/notifications/notificationsManager.ts b/src/notifications/notificationsManager.ts index dc988602b7..30f692bef0 100644 --- a/src/notifications/notificationsManager.ts +++ b/src/notifications/notificationsManager.ts @@ -362,7 +362,10 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP } } else if (event.event === EventType.Merged) { // Merging a PR is a meaningful event - if (userCheck(event.user.login)) { + // Note: MergedEvent.user is IActor (not IAccount), so we check login patterns + const login = event.user.login; + const isBotByName = login.endsWith('[bot]') || login === 'vs-code-engineering'; + if (!isBotByName && userCheck(login)) { return new Date(event.createdAt); } } From 05dce559f126a2d2258d690d9d6e9f596f7a1e9b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:55:32 +0000 Subject: [PATCH 5/7] Extract isBot helper as private method for reusability - Move isBot logic to a private method _isBot - Simplify merge event handling to use _isBot - Improve code organization and testability Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/notifications/notificationsManager.ts | 37 +++++++++++------------ 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/notifications/notificationsManager.ts b/src/notifications/notificationsManager.ts index 30f692bef0..fa4b1999cc 100644 --- a/src/notifications/notificationsManager.ts +++ b/src/notifications/notificationsManager.ts @@ -323,6 +323,18 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP } } + private _isBot(user: { login: string, accountType?: AccountType }): boolean { + // Check if accountType indicates this is a bot + if (user.accountType === AccountType.Bot) { + return true; + } + // Check for common bot naming patterns + if (user.login.endsWith('[bot]') || user.login === 'vs-code-engineering') { + return true; + } + return false; + } + private _getMeaningfulEventTime(event: TimelineEvent, currentUser: string, isCurrentUser: boolean): Date | undefined { const userCheck = (testUser?: string) => { if (isCurrentUser) { @@ -332,40 +344,25 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP } }; - // Helper to check if a user is a bot - const isBot = (user: { login: string, accountType?: AccountType }): boolean => { - // Check if accountType indicates this is a bot - if (user.accountType === AccountType.Bot) { - return true; - } - // Check for common bot naming patterns - if (user.login.endsWith('[bot]') || user.login === 'vs-code-engineering') { - return true; - } - return false; - }; - if (event.event === EventType.Committed) { - if (!isBot(event.author) && userCheck(event.author.login)) { + if (!this._isBot(event.author) && userCheck(event.author.login)) { return new Date(event.committedDate); } } else if (event.event === EventType.Commented) { - if (event.user && !isBot(event.user) && userCheck(event.user.login)) { + if (event.user && !this._isBot(event.user) && userCheck(event.user.login)) { return new Date(event.createdAt); } } else if (event.event === EventType.Reviewed) { // We only count empty reviews as meaningful if the user is the current user if (isCurrentUser || (event.comments.length > 0 || event.body.length > 0)) { - if (event.user && !isBot(event.user) && userCheck(event.user.login)) { + if (event.user && !this._isBot(event.user) && userCheck(event.user.login)) { return new Date(event.submittedAt); } } } else if (event.event === EventType.Merged) { // Merging a PR is a meaningful event - // Note: MergedEvent.user is IActor (not IAccount), so we check login patterns - const login = event.user.login; - const isBotByName = login.endsWith('[bot]') || login === 'vs-code-engineering'; - if (!isBotByName && userCheck(login)) { + // Note: MergedEvent.user is IActor (not IAccount), so accountType is undefined + if (!this._isBot(event.user) && userCheck(event.user.login)) { return new Date(event.createdAt); } } From 9ec2b9401614328f6cfdb73d69a52955c893aaa3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:58:34 +0000 Subject: [PATCH 6/7] Move automated users to configuration constant - Extract 'vs-code-engineering' to AUTOMATED_USERS constant - Improve maintainability by making it easy to add/remove automated users - Add documentation for the constant Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/notifications/notificationsManager.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/notifications/notificationsManager.ts b/src/notifications/notificationsManager.ts index fa4b1999cc..f6d91759fa 100644 --- a/src/notifications/notificationsManager.ts +++ b/src/notifications/notificationsManager.ts @@ -35,6 +35,9 @@ export enum NotificationsSortMethod { export class NotificationsManager extends Disposable implements vscode.TreeDataProvider { private static ID = 'NotificationsManager'; + // List of automated users that should be ignored when determining meaningful events + private static readonly AUTOMATED_USERS = ['vs-code-engineering']; + private _onDidChangeTreeData: vscode.EventEmitter = this._register(new vscode.EventEmitter()); readonly onDidChangeTreeData: vscode.Event = this._onDidChangeTreeData.event; @@ -329,7 +332,11 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP return true; } // Check for common bot naming patterns - if (user.login.endsWith('[bot]') || user.login === 'vs-code-engineering') { + if (user.login.endsWith('[bot]')) { + return true; + } + // Check for specific automated users + if (NotificationsManager.AUTOMATED_USERS.includes(user.login)) { return true; } return false; From 446d1df69d2d45664af55b77feecf966e461b751 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:51:29 +0100 Subject: [PATCH 7/7] Ignore mege --- src/notifications/notificationsManager.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/notifications/notificationsManager.ts b/src/notifications/notificationsManager.ts index f6d91759fa..9a5678935f 100644 --- a/src/notifications/notificationsManager.ts +++ b/src/notifications/notificationsManager.ts @@ -366,12 +366,6 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP return new Date(event.submittedAt); } } - } else if (event.event === EventType.Merged) { - // Merging a PR is a meaningful event - // Note: MergedEvent.user is IActor (not IAccount), so accountType is undefined - if (!this._isBot(event.user) && userCheck(event.user.login)) { - return new Date(event.createdAt); - } } }