Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit b469eff

Browse files
committed
feat: allow deleting tasks from sidebar without archiving first
Fixes #3555
1 parent e02e0c1 commit b469eff

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

packages/core/src/context-menu/context-menu.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,18 @@ describe("ContextMenuService.showTaskContextMenu", () => {
142142
);
143143
});
144144

145+
it("offers Delete for active tasks and resolves without an inline confirm", async () => {
146+
const menu = new FakeContextMenu();
147+
// dialogReturning(0) would cancel any inline confirm; Delete must resolve
148+
// anyway because confirmation happens downstream in TaskDeletionService.
149+
const result = makeService(menu, dialogReturning(0)).showTaskContextMenu(
150+
baseTask,
151+
);
152+
await menu.shown;
153+
findItem(menu.lastItems, "Delete").click();
154+
expect(await result).toEqual({ action: { type: "delete" } });
155+
});
156+
145157
it("resolves to null when the menu is dismissed", async () => {
146158
const menu = new FakeContextMenu();
147159
const result = makeService(menu).showTaskContextMenu(baseTask);

packages/core/src/context-menu/context-menu.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ export class ContextMenuService {
185185
},
186186
},
187187
),
188+
// Confirmation is handled downstream by TaskDeletionService via
189+
// confirmDeleteTask (worktree-aware wording), so no inline confirm here.
190+
this.item("Delete", { type: "delete" }),
188191
]);
189192
}
190193

0 commit comments

Comments
 (0)