From d9b2c01fa8ef2a27ee74c9a64b54f776d5f7b092 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Jun 2026 09:40:30 +0000 Subject: [PATCH 1/3] Initial plan From 6d97d6d20d05d2076e3c3cedd42706423040cc2e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Jun 2026 09:45:17 +0000 Subject: [PATCH 2/3] Add githubIssues.showIssueNumberInTree setting to show issue number in tree Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- package.json | 5 +++++ package.nls.json | 1 + src/common/settingKeys.ts | 1 + src/issues/issuesView.ts | 13 +++++++++---- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index cde0edd92f..92ea5d5238 100644 --- a/package.json +++ b/package.json @@ -824,6 +824,11 @@ "default": "author", "description": "%githubIssues.issueAvatarDisplay.description%" }, + "githubIssues.showIssueNumberInTree": { + "type": "boolean", + "default": false, + "description": "%githubIssues.showIssueNumberInTree.description%" + }, "githubPullRequests.focusedMode": { "properties": { "oneOf": [ diff --git a/package.nls.json b/package.nls.json index ea64843094..3d0f267039 100644 --- a/package.nls.json +++ b/package.nls.json @@ -176,6 +176,7 @@ "githubIssues.issueAvatarDisplay.description": "Controls which avatar to display in the issue list.", "githubIssues.issueAvatarDisplay.author": "Show the avatar of the issue creator.", "githubIssues.issueAvatarDisplay.assignee": "Show the avatar of the first assignee (show GitHub icon if no assignees).", + "githubIssues.showIssueNumberInTree.description": "Shows the issue number in the tree view.", "githubPullRequests.focusedMode.description": "The layout to use when a pull request is checked out. Set to false to prevent layout changes.", "githubPullRequests.focusedMode.firstDiff": "Show the first diff in the pull request. If there are no changes, show the overview.", "githubPullRequests.focusedMode.overview": "Show the overview of the pull request.", diff --git a/src/common/settingKeys.ts b/src/common/settingKeys.ts index 0f5e64399b..a4bdae5352 100644 --- a/src/common/settingKeys.ts +++ b/src/common/settingKeys.ts @@ -67,6 +67,7 @@ export const IGNORE_MILESTONES = 'ignoreMilestones'; export const ALLOW_FETCH = 'allowFetch'; export const ALWAYS_PROMPT_FOR_NEW_ISSUE_REPO = 'alwaysPromptForNewIssueRepo'; export const ISSUE_AVATAR_DISPLAY = 'issueAvatarDisplay'; +export const SHOW_ISSUE_NUMBER_IN_TREE = 'showIssueNumberInTree'; export const EXPERIMENTAL_CHAT = 'experimental.chat'; export const EXPERIMENTAL_USE_QUICK_CHAT = 'experimental.useQuickChat'; export const EXPERIMENTAL_NOTIFICATIONS_PAGE_SIZE = 'experimental.notificationsViewPageSize'; diff --git a/src/issues/issuesView.ts b/src/issues/issuesView.ts index f43a04f15a..9628ad7ea8 100644 --- a/src/issues/issuesView.ts +++ b/src/issues/issuesView.ts @@ -8,7 +8,7 @@ import * as vscode from 'vscode'; import { issueBodyHasLink } from './issueLinkLookup'; import { IssueItem, QueryGroup, StateManager } from './stateManager'; import { commands, contexts } from '../common/executeCommands'; -import { ISSUE_AVATAR_DISPLAY, IssueAvatarDisplay, ISSUES_SETTINGS_NAMESPACE } from '../common/settingKeys'; +import { ISSUE_AVATAR_DISPLAY, IssueAvatarDisplay, ISSUES_SETTINGS_NAMESPACE, SHOW_ISSUE_NUMBER_IN_TREE } from '../common/settingKeys'; import { DataUri } from '../common/uri'; import { groupBy } from '../common/utils'; import { FolderRepositoryManager, ReposManagerState } from '../github/folderRepositoryManager'; @@ -65,7 +65,8 @@ export class IssuesTreeData // Listen for changes to the avatar display setting context.subscriptions.push( vscode.workspace.onDidChangeConfiguration(change => { - if (change.affectsConfiguration(`${ISSUES_SETTINGS_NAMESPACE}.${ISSUE_AVATAR_DISPLAY}`)) { + if (change.affectsConfiguration(`${ISSUES_SETTINGS_NAMESPACE}.${ISSUE_AVATAR_DISPLAY}`) + || change.affectsConfiguration(`${ISSUES_SETTINGS_NAMESPACE}.${SHOW_ISSUE_NUMBER_IN_TREE}`)) { this._onDidChangeTreeData.fire(); } }), @@ -87,7 +88,11 @@ export class IssuesTreeData } private async getIssueTreeItem(element: IssueItem): Promise { - const treeItem = new vscode.TreeItem(element.title, vscode.TreeItemCollapsibleState.None); + const showIssueNumber = vscode.workspace + .getConfiguration(ISSUES_SETTINGS_NAMESPACE, null) + .get(SHOW_ISSUE_NUMBER_IN_TREE, false); + const numberPrefix = showIssueNumber ? `#${element.number}: ` : ''; + const treeItem = new vscode.TreeItem(`${numberPrefix}${element.title}`, vscode.TreeItemCollapsibleState.None); const avatarDisplaySetting = vscode.workspace .getConfiguration(ISSUES_SETTINGS_NAMESPACE, null) @@ -133,7 +138,7 @@ export class IssuesTreeData // Escape any $(...) syntax to avoid rendering issue titles as icons. const escapedTitle = element.title.replace(/\$\([a-zA-Z0-9~-]+\)/g, '\\$&'); const label: vscode.TreeItemLabel2 = { - label: new vscode.MarkdownString(`$(check) ${escapedTitle}`, true) + label: new vscode.MarkdownString(`$(check) ${numberPrefix}${escapedTitle}`, true) }; treeItem.label = label as vscode.TreeItemLabel; treeItem.contextValue = 'currentissue'; From 7232b3202dd01561c69f6dc8897fa7f849badbfa Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:45:15 +0200 Subject: [PATCH 3/3] Respect number settings in notifications view --- src/notifications/notificationsManager.ts | 29 +++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/notifications/notificationsManager.ts b/src/notifications/notificationsManager.ts index 54e5dac295..7c8bea0289 100644 --- a/src/notifications/notificationsManager.ts +++ b/src/notifications/notificationsManager.ts @@ -9,7 +9,7 @@ import { NotificationsProvider } from './notificationsProvider'; import { commands, contexts } from '../common/executeCommands'; import { Disposable } from '../common/lifecycle'; import Logger from '../common/logger'; -import { NOTIFICATION_SETTING, NotificationVariants, PR_SETTINGS_NAMESPACE } from '../common/settingKeys'; +import { ISSUES_SETTINGS_NAMESPACE, NOTIFICATION_SETTING, NotificationVariants, PR_SETTINGS_NAMESPACE, SHOW_ISSUE_NUMBER_IN_TREE, SHOW_PULL_REQUEST_NUMBER_IN_TREE } from '../common/settingKeys'; import { EventType, TimelineEvent } from '../common/timelineEvent'; import { toNotificationUri } from '../common/uri'; import { CredentialStore } from '../github/credentials'; @@ -73,6 +73,10 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP this._startPolling(); } } + if (e.affectsConfiguration(`${ISSUES_SETTINGS_NAMESPACE}.${SHOW_ISSUE_NUMBER_IN_TREE}`) + || e.affectsConfiguration(`${PR_SETTINGS_NAMESPACE}.${SHOW_PULL_REQUEST_NUMBER_IN_TREE}`)) { + this._onDidChangeTreeData.fire(); + } })); this._register(PullRequestOverviewPanel.onVisible(e => { this.markPrNotificationsAsRead(e); @@ -116,7 +120,7 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP } private _resolveNotificationTreeItem(element: NotificationTreeItem): vscode.TreeItem { - const label = element.notification.subject.title; + const label = this._notificationLabel(element); const item = new vscode.TreeItem(label, vscode.TreeItemCollapsibleState.None); const notification = element.notification; const model = element.model; @@ -156,6 +160,27 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP return item; } + private _notificationLabel(element: NotificationTreeItem): string { + let setting: string | undefined; + let namespace: string | undefined; + if (element.notification.subject.type === NotificationSubjectType.Issue) { + setting = SHOW_ISSUE_NUMBER_IN_TREE; + namespace = ISSUES_SETTINGS_NAMESPACE; + } else if (element.notification.subject.type === NotificationSubjectType.PullRequest) { + setting = SHOW_PULL_REQUEST_NUMBER_IN_TREE; + namespace = PR_SETTINGS_NAMESPACE; + } + + if (setting !== undefined && namespace !== undefined) { + const showNumber = vscode.workspace.getConfiguration(namespace).get(setting, false); + if (showNumber) { + return `#${element.model.number}: ${element.notification.subject.title}`; + } + } + + return element.notification.subject.title; + } + private _resolveLoadMoreNotificationsTreeItem(): vscode.TreeItem { const item = new vscode.TreeItem(vscode.l10n.t('Load More Notifications...'), vscode.TreeItemCollapsibleState.None); item.command = {