Skip to content

Commit 23e8e6e

Browse files
committed
Add basic project wide dashboard
1 parent 6b6413a commit 23e8e6e

6 files changed

Lines changed: 159 additions & 278 deletions

File tree

package.json

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
"onFileSystem:githubcommit",
5959
"onFileSystem:review",
6060
"onWebviewPanel:IssueOverview",
61-
"onWebviewPanel:PullRequestOverview"
61+
"onWebviewPanel:PullRequestOverview",
62+
"onWebviewPanel:github-pull-request.tasksDashboard"
6263
],
6364
"browser": "./dist/browser/extension",
6465
"l10n": "./dist/browser/extension",
@@ -766,6 +767,11 @@
766767
"type": "boolean",
767768
"default": false,
768769
"description": "%githubIssues.alwaysPromptForNewIssueRepo.description%"
770+
},
771+
"githubIssues.taskDashboard.query": {
772+
"type": "string",
773+
"default": "is:open assignee:@me milestone:\"September 2025\"",
774+
"description": "The GitHub query to use for the task dashboard"
769775
}
770776
}
771777
},
@@ -872,17 +878,11 @@
872878
},
873879
"commands": [
874880
{
875-
"command": "pr.openDashboard",
876-
"title": "%command.pr.openDashboard.title%",
881+
"command": "pr.openTasksDashboard",
882+
"title": "%command.pr.openTasksDashboard.title%",
877883
"category": "%command.pull.request.category%",
878884
"icon": "$(dashboard)"
879885
},
880-
{
881-
"command": "pr.createDashboard",
882-
"title": "%command.pr.createDashboard.title%",
883-
"category": "%command.pull.request.category%",
884-
"icon": "$(new-file)"
885-
},
886886
{
887887
"command": "githubpr.remoteAgent",
888888
"title": "%command.githubpr.remoteAgent.title%",
@@ -1802,17 +1802,6 @@
18021802
"category": "%command.pull.request.category%"
18031803
}
18041804
],
1805-
"customEditors": [
1806-
{
1807-
"viewType": "github.tasksEditor",
1808-
"displayName": "%customEditor.github.tasks.displayName%",
1809-
"selector": [
1810-
{
1811-
"filenamePattern": "*.github-tasks"
1812-
}
1813-
]
1814-
}
1815-
],
18161805
"languages": [
18171806
{
18181807
"id": "json",
@@ -4354,4 +4343,4 @@
43544343
"string_decoder": "^1.3.0"
43554344
},
43564345
"license": "MIT"
4357-
}
4346+
}

package.nls.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
"view.github.active.pull.request.name": "Review Pull Request",
176176
"view.github.active.pull.request.welcome.name": "Active Pull Request",
177177
"command.pull.request.category": "GitHub Pull Requests",
178-
"command.pr.openDashboard.title": "Open Dashboard",
178+
"command.pr.openTasksDashboard.title": "Open Dashboard",
179179
"command.pr.createDashboard.title": "Create Dashboard",
180180
"customEditor.github.tasks.displayName": "GitHub Tasks Editor",
181181
"command.githubpr.remoteAgent.title": "Remote agent integration",
@@ -416,4 +416,4 @@
416416
"languageModelTools.github-pull-request_openPullRequest.description": "Get information about the open GitHub pull request. This information includes: comments, files changed, pull request title + description, pull request state, and pull request status checks/CI.",
417417
"languageModelTools.github-pull-request_copilot-coding-agent.displayName": "Copilot coding agent",
418418
"languageModelTools.github-pull-request_copilot-coding-agent.userDescription": "Completes the provided task using an asynchronous coding agent. Use when the user wants copilot continue completing a task in the background or asynchronously. Launch an autonomous GitHub Copilot agent to work on coding tasks in the background. The agent will create a new branch, implement the requested changes, and open a pull request with the completed work."
419-
}
419+
}

src/commands.ts

Lines changed: 4 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { PullRequestModel } from './github/pullRequestModel';
3232
import { PullRequestOverviewPanel } from './github/pullRequestOverview';
3333
import { chooseItem } from './github/quickPicks';
3434
import { RepositoriesManager } from './github/repositoriesManager';
35+
import { TasksDashboardManager } from './github/tasksDashboard';
3536
import { getIssuesUrl, getPullsUrl, isInCodespaces, ISSUE_OR_URL_EXPRESSION, parseIssueExpressionOutput, vscodeDevPrLink } from './github/utils';
3637
import { OverviewContext } from './github/views';
3738
import { isNotificationTreeItem, NotificationTreeItem } from './notifications/notificationItem';
@@ -212,6 +213,7 @@ export function registerCommands(
212213
telemetry: ITelemetry,
213214
tree: PullRequestsTreeDataProvider,
214215
copilotRemoteAgentManager: CopilotRemoteAgentManager,
216+
tasksDashboard: TasksDashboardManager,
215217
) {
216218
const logId = 'RegisterCommands';
217219
context.subscriptions.push(
@@ -1130,92 +1132,8 @@ export function registerCommands(
11301132
));
11311133

11321134
context.subscriptions.push(
1133-
vscode.commands.registerCommand('pr.openDashboard', async () => {
1134-
/* __GDPR__
1135-
"pr.openDashboard" : {}
1136-
*/
1137-
telemetry.sendTelemetryEvent('pr.openDashboard');
1138-
1139-
// Look for existing .github-tasks files in the workspace
1140-
const workspaceFolders = vscode.workspace.workspaceFolders;
1141-
if (workspaceFolders && workspaceFolders.length > 0) {
1142-
// Search for existing dashboard files
1143-
const dashboardFiles = await vscode.workspace.findFiles('**/*.github-tasks', '**/node_modules/**', 10);
1144-
1145-
if (dashboardFiles.length > 0) {
1146-
// If we found existing files, let user choose or open the first one
1147-
if (dashboardFiles.length === 1) {
1148-
const document = await vscode.workspace.openTextDocument(dashboardFiles[0]);
1149-
await vscode.window.showTextDocument(document);
1150-
return;
1151-
} else {
1152-
// Multiple files found, let user choose
1153-
const items = dashboardFiles.map(uri => ({
1154-
label: vscode.workspace.asRelativePath(uri),
1155-
uri: uri
1156-
}));
1157-
1158-
const selected = await vscode.window.showQuickPick(items, {
1159-
placeHolder: 'Select a dashboard file to open'
1160-
});
1161-
1162-
if (selected) {
1163-
const document = await vscode.workspace.openTextDocument(selected.uri);
1164-
await vscode.window.showTextDocument(document);
1165-
return;
1166-
}
1167-
}
1168-
}
1169-
}
1170-
1171-
// No existing files found or user didn't select one, create a new one
1172-
// Import here to avoid circular dependencies
1173-
const { GitHubTasksEditorProvider } = await import('./github/githubTasksEditorProvider');
1174-
1175-
const defaultContent = GitHubTasksEditorProvider.createDefaultDocument();
1176-
const saveUri = await vscode.window.showSaveDialog({
1177-
defaultUri: vscode.Uri.file('dashboard.github-tasks'),
1178-
filters: {
1179-
'GitHub Tasks': ['github-tasks'],
1180-
'All Files': ['*']
1181-
}
1182-
});
1183-
1184-
if (saveUri) {
1185-
const encoder = new TextEncoder();
1186-
await vscode.workspace.fs.writeFile(saveUri, encoder.encode(defaultContent));
1187-
const savedDocument = await vscode.workspace.openTextDocument(saveUri);
1188-
await vscode.window.showTextDocument(savedDocument);
1189-
}
1190-
})
1191-
);
1192-
1193-
context.subscriptions.push(
1194-
vscode.commands.registerCommand('pr.createDashboard', async () => {
1195-
/* __GDPR__
1196-
"pr.createDashboard" : {}
1197-
*/
1198-
telemetry.sendTelemetryEvent('pr.createDashboard');
1199-
1200-
// Import here to avoid circular dependencies
1201-
const { GitHubTasksEditorProvider } = await import('./github/githubTasksEditorProvider');
1202-
1203-
// Create a new dashboard file
1204-
const defaultContent = GitHubTasksEditorProvider.createDefaultDocument();
1205-
const saveUri = await vscode.window.showSaveDialog({
1206-
defaultUri: vscode.Uri.file('dashboard.github-tasks'),
1207-
filters: {
1208-
'GitHub Tasks': ['github-tasks'],
1209-
'All Files': ['*']
1210-
}
1211-
});
1212-
1213-
if (saveUri) {
1214-
const encoder = new TextEncoder();
1215-
await vscode.workspace.fs.writeFile(saveUri, encoder.encode(defaultContent));
1216-
const savedDocument = await vscode.workspace.openTextDocument(saveUri);
1217-
await vscode.window.showTextDocument(savedDocument);
1218-
}
1135+
vscode.commands.registerCommand('pr.openTasksDashboard', async () => {
1136+
tasksDashboard.showOrCreateDashboard();
12191137
})
12201138
);
12211139

src/extension.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import { createExperimentationService, ExperimentationTelemetry } from './experi
2626
import { CopilotRemoteAgentManager } from './github/copilotRemoteAgent';
2727
import { CredentialStore } from './github/credentials';
2828
import { FolderRepositoryManager } from './github/folderRepositoryManager';
29-
import { GitHubTasksEditorProvider } from './github/githubTasksEditorProvider';
3029
import { OverviewRestorer } from './github/overviewRestorer';
3130
import { RepositoriesManager } from './github/repositoriesManager';
31+
import { TasksDashboardManager } from './github/tasksDashboard';
3232
import { registerBuiltinGitProvider, registerLiveShareGitProvider } from './gitProviders/api';
3333
import { GitHubContactServiceProvider } from './gitProviders/GitHubContactServiceProvider';
3434
import { GitLensIntegration } from './integrations/gitlens/gitlensImpl';
@@ -230,21 +230,10 @@ async function init(
230230

231231
context.subscriptions.push(new PRNotificationDecorationProvider(tree.notificationProvider));
232232

233-
registerCommands(context, reposManager, reviewsManager, telemetry, tree, copilotRemoteAgentManager);
233+
const tasksDashboard = new TasksDashboardManager(context, reposManager, copilotRemoteAgentManager, telemetry);
234+
context.subscriptions.push(tasksDashboard);
234235

235-
// Register the GitHub Tasks custom editor provider
236-
const githubTasksEditorProvider = new GitHubTasksEditorProvider(context, reposManager, copilotRemoteAgentManager, telemetry);
237-
context.subscriptions.push(
238-
vscode.window.registerCustomEditorProvider(
239-
GitHubTasksEditorProvider.viewType,
240-
githubTasksEditorProvider,
241-
{
242-
webviewOptions: {
243-
retainContextWhenHidden: true,
244-
},
245-
}
246-
)
247-
);
236+
registerCommands(context, reposManager, reviewsManager, telemetry, tree, copilotRemoteAgentManager, tasksDashboard);
248237

249238
const layout = vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<string>(FILE_LIST_LAYOUT);
250239
await vscode.commands.executeCommand('setContext', 'fileListLayout:flat', layout === 'flat');

src/github/githubTasksEditorProvider.ts

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)