Skip to content

Commit ae3b6da

Browse files
committed
Updating
1 parent 23e8e6e commit ae3b6da

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

src/github/tasksDashboard.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export class TasksDashboardManager extends Disposable implements vscode.WebviewP
2121

2222
private readonly statusBarItem: vscode.StatusBarItem;
2323

24-
private readonly disposables: vscode.Disposable[] = [];
25-
2624
private readonly viewTitle = vscode.l10n.t('Tasks Dashboard');
2725

2826
constructor(
@@ -41,10 +39,7 @@ export class TasksDashboardManager extends Disposable implements vscode.WebviewP
4139
this.statusBarItem.show();
4240

4341
// Register webview panel serializer for tasks dashboard
44-
this._register(vscode.window.registerWebviewPanelSerializer(
45-
TasksDashboardManager.viewType,
46-
this
47-
));
42+
this._register(vscode.window.registerWebviewPanelSerializer(TasksDashboardManager.viewType, this));
4843
}
4944

5045
public override dispose() {
@@ -99,10 +94,9 @@ export class TasksDashboardManager extends Disposable implements vscode.WebviewP
9994
}
10095
}));
10196

102-
// Listen for configuration changes
10397
disposables.push(vscode.workspace.onDidChangeConfiguration(e => {
10498
if (e.affectsConfiguration('githubIssues.taskDashboard.query')) {
105-
const newQuery = vscode.workspace.getConfiguration('githubIssues').get<string>('taskDashboard.query') ?? TasksDashboardManager.getDefaultIssueQuery();
99+
const newQuery = this.getIssueQuery();
106100
dashboardProvider.updateConfiguration(newQuery, undefined);
107101
}
108102
}));
@@ -128,12 +122,12 @@ export class TasksDashboardManager extends Disposable implements vscode.WebviewP
128122
this.restoreDashboard(newWebviewPanel);
129123
}
130124

131-
public getIssueQuery(): string {
125+
private getIssueQuery(): string {
132126
const config = vscode.workspace.getConfiguration('githubIssues');
133-
return config.get<string>('taskDashboard.query') ?? TasksDashboardManager.getDefaultIssueQuery();
127+
return config.get<string>('taskDashboard.query') ?? this.getDefaultIssueQuery();
134128
}
135129

136-
private static getDefaultIssueQuery(): string {
130+
private getDefaultIssueQuery(): string {
137131
return 'is:open assignee:@me milestone:"September 2025"';
138132
}
139133
}

webviews/dashboardView/app.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ function Dashboard() {
143143

144144
// Derived state from discriminated union
145145
const isGlobal = dashboardState?.isGlobal;
146-
const issueQuery = !isGlobal && dashboardState ? dashboardState.issueQuery || '' : '';
147-
const milestoneIssues = !isGlobal && dashboardState?.state === 'ready' && !dashboardState.isGlobal ? dashboardState.milestoneIssues : [];
146+
const issueQuery = dashboardState && !dashboardState.isGlobal ? (dashboardState.issueQuery || '') : '';
147+
const milestoneIssues = !dashboardState?.isGlobal && dashboardState?.state === 'ready' && !dashboardState.isGlobal ? dashboardState.milestoneIssues : [];
148148
const activeSessions = dashboardState?.state === 'ready' ? dashboardState.activeSessions : [];
149-
const recentProjects = isGlobal && dashboardState?.state === 'ready' && dashboardState.isGlobal ? dashboardState.recentProjects : [];
149+
const recentProjects = dashboardState?.isGlobal && dashboardState?.state === 'ready' && dashboardState.isGlobal ? dashboardState.recentProjects : [];
150150

151151
// For global dashboards, create a mixed array of sessions and projects
152152
const mixedItems = isGlobal ? (() => {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"jsx": "react",
5+
"lib": [
6+
"dom",
7+
"dom.iterable",
8+
"es2019"
9+
],
10+
"tsBuildInfoFile": "../../tsconfig.webviews.tsbuildinfo"
11+
}
12+
}

0 commit comments

Comments
 (0)