feat: add dashboard ui view

This commit is contained in:
2026-07-14 23:38:54 +05:00
parent cbb97a99ce
commit 4bd3aa0cd1
8 changed files with 747 additions and 30 deletions
+10 -3
View File
@@ -15,8 +15,15 @@ export type TaskCommandDeps = {
repo: ITaskRepository;
config: IConfigProvider;
tree: TaskTreeProvider;
/** Refresh dashboard (and any other listeners) after task mutations. */
onTasksMutated?: () => void;
};
function notifyMutated(deps: TaskCommandDeps): void {
deps.tree.refresh();
deps.onTasksMutated?.();
}
export async function runCreateTask(deps: TaskCommandDeps): Promise<void> {
const title = await vscode.window.showInputBox({
prompt: "Task title",
@@ -37,7 +44,7 @@ export async function runCreateTask(deps: TaskCommandDeps): Promise<void> {
return;
}
deps.tree.refresh();
notifyMutated(deps);
void vscode.window.showInformationMessage(
`Task created: ${result.value.title}`,
);
@@ -98,7 +105,7 @@ export async function runDeleteTask(
return;
}
deps.tree.refresh();
notifyMutated(deps);
void vscode.window.showInformationMessage("Task deleted");
}
@@ -138,7 +145,7 @@ export async function runChangeStatus(
return;
}
deps.tree.refresh();
notifyMutated(deps);
void vscode.window.showInformationMessage(
`Status: ${TASK_STATUS_LABELS[result.value.status]}`,
);