Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(desktop): confirm session and project deletes with a second click

vastsac91faad382f6
diff --git a/apps/desktop/src/components/Sidebar.tsx b/apps/desktop/src/components/Sidebar.tsx
index 97c7ad97f..9774eddb0 100644
--- a/apps/desktop/src/components/Sidebar.tsx
+++ b/apps/desktop/src/components/Sidebar.tsx
@@ -41,6 +41,7 @@ import {
sidebarSessionStatus,
type SidebarSessionStatus,
} from "../lib/sidebar-session-status";
+import { ErrorCodes } from "@pi-desktop/shared";
import type { SessionSummary } from "@pi-desktop/shared";
import type {
ProjectMeta,
@@ -55,6 +56,7 @@ import {
import { BrandLogo } from "./BrandLogo";
import { NotificationCenter } from "./NotificationCenter";
import { ProjectEditDialog } from "./ProjectEditDialog";
+import { useArmedDelete } from "../hooks/use-armed-delete";
import { ProjectDeleteDialog } from "./ProjectDeleteDialog";
import { SessionRenameDialog } from "./SessionRenameDialog";
import { useUpdateState } from "../hooks/use-update-state";
@@ -245,6 +247,7 @@ export function Sidebar({
const restoreSession = useAppStore((s) => s.restoreSession);
const renameSession = useAppStore((s) => s.renameSession);
const deleteSessionAction = useAppStore((s) => s.deleteSession);
+ const deleteProjectAction = useAppStore((s) => s.deleteProject);
const setSessionSort = useAppStore((s) => s.setSessionSort);
const moveSessionProject = useAppStore((s) => s.moveSessionProject);
const setSessionArchiveVisibility = useAppStore((s) => s.setSessionArchiveVisibility);
@@ -265,6 +268,8 @@ export function Sidebar({
const [renameFor, setRenameFor] = useState<SessionSummary | null>(null);
const [editProjectFor, setEditProjectFor] = useState<ProjectEntry | null>(null);
const [deleteProjectFor, setDeleteProjectFor] = useState<ProjectEntry | null>(null);
+ // Which row menu item is armed for its second, confirming click.
+ const { armed: armedDelete, setArmed: setArmedDelete } = useArmedDelete();
const [projectMenu, setProjectMenu] = useState<string | null>(null);
const [sectionMenu, setSectionMenu] = useState<"sessions" | "projects" | null>(null);
const [menuPosition, setMenuPosition] = useState<{
@@ -1155,6 +1160,53 @@ export function Sidebar({
}
};
+ /**
+ * Two-step delete for one row's menu item. The first click arms the item and
+ * relabels it; only the second click runs the delete, and the arm expires on
+ * its own. The menu stays open between the two clicks.
+ */
+ const requestDeleteSession = (session: SessionSummary) => {
+ if (armedDelete !== session.id) {
+ setArmedDelete(session.id);
+ return;
+ }
+ setArmedDelete(null);
+ void deleteSession(session);
+ };
+
+ /** Menu items of different surfaces never share an armed key. */
+ const projectDeleteKey = (entry: ProjectEntry) => `project:${entry.key}`;
+
+ /**
+ * Two-step delete for a project row that keeps the running-task safety. The
+ * second click deletes an idle project straight away; a project whose turn is
+ * still live opens the dialog that names those sessions and stops them.
+ */
+ const requestDeleteProject = async (entry: ProjectEntry) => {
+ const key = projectDeleteKey(entry);
+ if (armedDelete !== key) {
+ setArmedDelete(key);
+ return;
+ }
+ setArmedDelete(null);
+ closeMenus(false);
+ if (entry.sessions.some((session) => runningSessions[session.id] === true)) {
+ setDeleteProjectFor(entry);
+ return;
+ }
+ try {
+ await deleteProjectAction(entry.path);
+ showToast(t("project.deleted", { name: entry.name }), { variant: "success" });
+ } catch (error) {
+ // The host refuses a project whose task started after this render.
+ reportError(
+ (error as { errorCode?: unknown } | null)?.errorCode === ErrorCodes.CONFLICT
+ ? new Error(t("project.deleteRunningBlocked"))
+ : error,
+ );
+ }
+ };
+
const openProjectFolder = async (entry: ProjectEntry) => {
closeMenus(false);
try {
@@ -1912,12 +1964,15 @@ export function Sidebar({
<button
type="button"
role="menuitem"
- className="danger"
+ className={cx("danger", armedDelete === session.id && "is-armed")}
data-action="delete-session"
- onClick={() => void deleteSession(session)}
+ data-armed={armedDelete === session.id ? "true" : undefined}
+ onClick={() => requestDeleteSession(session)}
>
<IconX size={14} />
- {t("nav.deleteTask", { defaultValue: "Delete" })}
+ {armedDelete === session.id
+ ? t("nav.deleteTaskConfirm", { defaultValue: "Delete?" })
+ : t("nav.deleteTask", { defaultValue: "Delete" })}
</button>
) : null}
</>
@@ -1973,17 +2028,15 @@ export function Sidebar({
<button
type="button"
role="menuitem"
- className="danger"
+ className={cx("danger", armedDelete === projectDeleteKey(entry) && "is-armed")}
data-action="delete-project"
- onClick={() => {
- // Never refuse silently: the dialog names the running sessions
- // and asks for an explicit confirmation before it stops them.
- closeMenus(false);
- setDeleteProjectFor(entry);
- }}
+ data-armed={armedDelete === projectDeleteKey(entry) ? "true" : undefined}
+ onClick={() => void requestDeleteProject(entry)}
>
<IconTrash size={14} />
- {t("project.delete", { defaultValue: "Delete project" })}
+ {armedDelete === projectDeleteKey(entry)
+ ? t("project.deleteMenuConfirm", { defaultValue: "Delete?" })
+ : t("project.delete", { defaultValue: "Delete project" })}
</button>
{entry.open ? (
<button
diff --git a/apps/desktop/src/components/settings/AgentCapabilityLayout.tsx b/apps/desktop/src/components/settings/AgentCapabilityLayout.tsx
index 08ed3d5ae..c090cc110 100644
--- a/apps/desktop/src/components/settings/AgentCapabilityLayout.tsx
+++ b/apps/desktop/src/components/settings/AgentCapabilityLayout.tsx
@@ -27,9 +27,6 @@ export type AgentProjectOption = {
/** Which level the workbench is currently showing. */
export type CapabilityFilter = "all" | "global" | "project";
-/** How long an armed delete stays armed before it disarms itself. */
-const DELETE_CONFIRM_MS = 3200;
-
export function projectDisplayName(path: string, fallback?: string): string {
if (fallback?.trim()) return fallback.trim();
const parts = path.replaceAll("\\", "/").split("/").filter(Boolean);
@@ -103,19 +100,11 @@ export function useAgentProjects() {
}
/**
- * A delete that needs two clicks. The first click arms the action and the
- * caller relabels it; the arm expires on its own so a row never stays one
- * stray click away from losing a file.
+ * The two-click delete every capability row uses. The arm-and-expire rule is
+ * shared with the session and project rows, so the settings pages re-export it
+ * from the layout they already share instead of keeping a second copy.
*/
-export function useArmedDelete() {
- const [armed, setArmed] = useState<string | null>(null);
- useEffect(() => {
- if (!armed) return;
- const timer = setTimeout(() => setArmed(null), DELETE_CONFIRM_MS);
- return () => clearTimeout(timer);
- }, [armed]);
- return { armed, setArmed };
-}
+export { useArmedDelete } from "../../hooks/use-armed-delete";
/** Case-insensitive substring match across whichever fields a row exposes. */
export function matchesCapabilitySearch(
diff --git a/apps/desktop/src/hooks/use-armed-delete.ts b/apps/desktop/src/hooks/use-armed-delete.ts
new file mode 100644
index 000000000..dbaa765ef
--- /dev/null
+++ b/apps/desktop/src/hooks/use-armed-delete.ts
@@ -0,0 +1,20 @@
+import { useEffect, useState } from "react";
+
+/** How long an armed delete stays armed before it disarms itself. */
+export const ARMED_DELETE_MS = 3200;
+
+/**
+ * A delete that needs two clicks. The first click arms the action and the
+ * caller relabels it; the arm expires on its own so a surface never stays one
+ * stray click away from a permanent delete. The armed key is opaque to the
+ * hook, so a caller can arm either a row or one item of a row menu.
+ */
+export function useArmedDelete(timeoutMs: number = ARMED_DELETE_MS) {
+ const [armed, setArmed] = useState<string | null>(null);
+ useEffect(() => {
+ if (!armed) return;
+ const timer = setTimeout(() => setArmed(null), timeoutMs);
+ return () => clearTimeout(timer);
+ }, [armed, timeoutMs]);
+ return { armed, setArmed };
+}
diff --git a/apps/desktop/src/pages/ProjectsPage.tsx b/apps/desktop/src/pages/ProjectsPage.tsx
index bee1e48d3..566dd1c1f 100644
--- a/apps/desktop/src/pages/ProjectsPage.tsx
+++ b/apps/desktop/src/pages/ProjectsPage.tsx
@@ -1,6 +1,7 @@
import { useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import type { ProjectGroupRecord, SessionSummary } from "@pi-desktop/shared";
+import { ErrorCodes } from "@pi-desktop/shared";
import { useAppStore } from "../stores/app-store";
import { api } from "../lib/api";
import { Button, Tooltip, TooltipButton, cx } from "../components/ui";
@@ -36,6 +37,7 @@ import { ProjectMemoryDialog } from "../components/ProjectMemoryDialog";
import { ProjectEditDialog } from "../components/ProjectEditDialog";
import { ProjectDeleteDialog } from "../components/ProjectDeleteDialog";
import { SessionRenameDialog } from "../components/SessionRenameDialog";
+import { useArmedDelete } from "../hooks/use-armed-delete";
import { AnchoredMenu } from "../components/settings/AnchoredMenu";
const INITIAL_VISIBLE_SESSION_COUNT = 8;
@@ -127,6 +129,7 @@ export function ProjectsPage() {
const renameProject = useAppStore((s) => s.renameProject);
const toggleProjectPinned = useAppStore((s) => s.toggleProjectPinned);
const archiveProject = useAppStore((s) => s.archiveProject);
+ const deleteProjectAction = useAppStore((s) => s.deleteProject);
const restoreProject = useAppStore((s) => s.restoreProject);
const newSession = useAppStore((s) => s.newSession);
const selectSession = useAppStore((s) => s.selectSession);
@@ -143,6 +146,8 @@ export function ProjectsPage() {
const [expanded, setExpanded] = useState<Record<string, boolean>>({});
const [visibleSessionCounts, setVisibleSessionCounts] = useState<Record<string, number>>({});
const [menuFor, setMenuFor] = useState<string | null>(null);
+ // Which row menu item is armed for its second, confirming click.
+ const { armed: armedDelete, setArmed: setArmedDelete } = useArmedDelete();
const [renameFor, setRenameFor] = useState<SessionSummary | null>(null);
const [editProjectFor, setEditProjectFor] = useState<{
path: string;
@@ -397,6 +402,53 @@ export function ProjectsPage() {
}
};
+ /** Menu items of different surfaces never share an armed key. */
+ const projectDeleteKey = (path: string) => `project:${normalizeProjectPath(path)}`;
+
+ /**
+ * Two-step delete for an index row. The first click arms the menu item and
+ * relabels it; the second deletes an idle project straight away. A project
+ * with a live turn keeps the dialog that names those sessions and stops them
+ * before the delete.
+ */
+ const requestDeleteProject = async (project: ProjectIndexItem, totalSessions: number) => {
+ const key = projectDeleteKey(project.path);
+ if (armedDelete !== key) {
+ setArmedDelete(key);
+ return;
+ }
+ setArmedDelete(null);
+ setMenuFor(null);
+ const liveSessions = sessions.filter(
+ (session) =>
+ sessionMatchesIndexProject(session, project) && runningSessions[session.id] === true,
+ );
+ if (liveSessions.length > 0) {
+ setDeleteFor({
+ name: project.name,
+ path: project.path,
+ sessionCount: totalSessions,
+ roots: project.roots,
+ });
+ return;
+ }
+ try {
+ await deleteProjectAction(project.path);
+ setRecents(loadRecentProjects());
+ showToast(t("project.deleted", { name: project.name }), { variant: "success" });
+ } catch (error) {
+ // The host refuses a project whose task started after this render.
+ showToast(
+ (error as { errorCode?: unknown } | null)?.errorCode === ErrorCodes.CONFLICT
+ ? t("project.deleteRunningBlocked")
+ : error instanceof Error
+ ? error.message
+ : String(error),
+ { variant: "error" },
+ );
+ }
+ };
+
const toggleProjectArchive = async (project: (typeof items)[number]) => {
setMenuFor(null);
if (project.archived) {
@@ -811,23 +863,20 @@ export function ProjectsPage() {
<button
type="button"
role="menuitem"
- className="danger"
+ className={cx(
+ "danger",
+ armedDelete === projectDeleteKey(project.path) && "is-armed",
+ )}
data-action="delete-project"
- onClick={() => {
- setMenuFor(null);
- // Never refuse silently: the dialog names the
- // running sessions and asks for an explicit
- // confirmation before it stops them.
- setDeleteFor({
- name: project.name,
- path: project.path,
- sessionCount: totalSessions,
- roots: project.roots,
- });
- }}
+ data-armed={
+ armedDelete === projectDeleteKey(project.path) ? "true" : undefined
+ }
+ onClick={() => void requestDeleteProject(project, totalSessions)}
>
<IconTrash size={14} />
- {t("project.delete")}
+ {armedDelete === projectDeleteKey(project.path)
+ ? t("project.deleteMenuConfirm")
+ : t("project.delete")}
</button>
{retained ? (
<button
diff --git a/apps/desktop/src/styles/projects.css b/apps/desktop/src/styles/projects.css
index fea61a123..660088eb7 100644
--- a/apps/desktop/src/styles/projects.css
+++ b/apps/desktop/src/styles/projects.css
@@ -512,6 +512,11 @@
background: color-mix(in oklab, var(--ds-error) 12%, transparent);
}
+/* An armed delete item names its second click, so the swap stays obvious. */
+.projects-menu button.danger.is-armed {
+ background: color-mix(in oklab, var(--ds-error) 14%, transparent);
+}
+
/* Menu sections are separated by space, not a rule (D297). */
.projects-menu-sep {
height: 6px;
diff --git a/apps/desktop/src/styles/sessions.css b/apps/desktop/src/styles/sessions.css
index 0d41bb70e..23b2bb766 100644
--- a/apps/desktop/src/styles/sessions.css
+++ b/apps/desktop/src/styles/sessions.css
@@ -379,6 +379,11 @@
color: var(--ds-error);
}
+/* An armed delete item names its second click, so the swap stays obvious. */
+.sidebar-row-menu button.danger.is-armed {
+ background: color-mix(in oklab, var(--ds-error) 14%, transparent);
+}
+
.sidebar-row-menu button svg,
.sidebar-popover button svg {
flex: 0 0 auto;
diff --git a/apps/desktop/test/agent-capability-settings.test.mjs b/apps/desktop/test/agent-capability-settings.test.mjs
index 3187a11a6..5adcd1b8a 100644
--- a/apps/desktop/test/agent-capability-settings.test.mjs
+++ b/apps/desktop/test/agent-capability-settings.test.mjs
@@ -263,7 +263,10 @@ test("each capability page can create, edit, and delete without leaving settings
assert.match(source, /settings\.capabilityRemoveConfirm/);
assert.match(source, /danger: true/);
}
- assert.match(layout, /DELETE_CONFIRM_MS/);
+ // The arm and its expiry live in the shared hook the settings pages
+ // re-export from the layout, so one timeout covers every armed delete.
+ assert.match(layout, /export \{ useArmedDelete \} from "\.\.\/\.\.\/hooks\/use-armed-delete"/);
+ assert.match(read("../src/hooks/use-armed-delete.ts"), /ARMED_DELETE_MS/);
assert.match(styles, /\.agent-capability-menu button\.danger\s*\{/);
});
diff --git a/apps/desktop/test/project-delete.test.mjs b/apps/desktop/test/project-delete.test.mjs
index b3c31fdff..46ee02749 100644
--- a/apps/desktop/test/project-delete.test.mjs
+++ b/apps/desktop/test/project-delete.test.mjs
@@ -17,6 +17,7 @@ const DELETE_KEYS = [
"deleteRunning_other",
"deleteRunningConfirm",
"deleteConfirm",
+ "deleteMenuConfirm",
"deleteCancel",
"deleting",
"deleted",
@@ -82,6 +83,20 @@ function dialogProps(source) {
return rest.slice(0, end);
}
+/**
+ * The body of the two-step project delete, from its declaration to the closing
+ * brace at component indentation. The click handler of the menu item is checked
+ * separately, so this helper owns the second half of the flow.
+ */
+function requestBlock(source) {
+ const start = source.indexOf("const requestDeleteProject = async");
+ assert.ok(start >= 0, "the two-step delete handler is present");
+ const rest = source.slice(start);
+ const end = rest.indexOf("\n };");
+ assert.ok(end > 0, "the two-step delete handler closes");
+ return rest.slice(0, end);
+}
+
test("the delete dialog is a real confirmation backed by the store action", () => {
assert.match(dialogSource, /export function ProjectDeleteDialog/);
assert.match(dialogSource, /const deleteProject = useAppStore\(\(s\) => s\.deleteProject\)/);
@@ -123,7 +138,10 @@ test("both project menus expose a destructive delete action", () => {
["ProjectsPage", projectsSource],
["Sidebar", sidebarSource],
]) {
- assert.match(source, /className="danger"\s+data-action="delete-project"/, surface);
+ // The item keeps its destructive styling and adds the armed state on top.
+ // The item keeps its destructive styling and adds the armed state on top.
+ assert.match(source, /className=\{cx\(\s*"danger",/, surface);
+ assert.match(source, /data-action="delete-project"/, surface);
assert.match(source, /<ProjectDeleteDialog/, surface);
}
@@ -153,19 +171,59 @@ test("both project menus expose a destructive delete action", () => {
assert.match(sidebarSource, /onError=\{reportError\}/);
});
-test("both project menus reach the confirmation dialog while tasks run", () => {
+test("the menu item arms first and only a live task reaches the dialog", () => {
for (const [surface, source] of [
["ProjectsPage", projectsSource],
["Sidebar", sidebarSource],
]) {
const handler = deleteHandler(source);
- // The previous behaviour warned through a transient toast and returned
- // before the dialog state was touched, so a project with a live task could
- // never be deleted and the refusal disappeared with the toast.
+ // The item is now the first step of a two-click delete, so the running-task
+ // refusal can no longer live in the menu: the click only arms the row.
assert.doesNotMatch(handler, /deleteRunningBlocked/, `${surface} drops the toast refusal`);
assert.doesNotMatch(handler, /showToast/, `${surface} does not toast instead of confirming`);
- assert.doesNotMatch(handler, /runningSessions/, `${surface} keeps the guard out of the menu`);
- assert.match(handler, /setDelete(?:Project)?For\(/, `${surface} opens the dialog`);
+ assert.doesNotMatch(
+ handler,
+ /setDelete(?:Project)?For\(/,
+ `${surface} arms instead of opening the dialog`,
+ );
+ assert.match(
+ handler,
+ /requestDeleteProject\(/,
+ `${surface} routes the click through the two-step handler`,
+ );
+ assert.match(handler, /data-armed=/, `${surface} exposes the armed state`);
+ // The label has to name the second click while the item is armed.
+ assert.match(source, /project\.deleteMenuConfirm/, `${surface} relabels the armed item`);
+ assert.match(
+ source,
+ /t\("project\.delete"(?:, \{ defaultValue: "[^"]*" \})?\)/,
+ `${surface} keeps the plain label`,
+ );
+
+ const request = requestBlock(source);
+ assert.match(request, /if \(armedDelete !== key\) \{/, `${surface} arms on the first click`);
+ assert.match(request, /setArmedDelete\(key\)/, `${surface} records the armed key`);
+ assert.ok(
+ request.indexOf("deleteProjectAction(") > request.indexOf("setArmedDelete(key)"),
+ `${surface} deletes only after arming`,
+ );
+ // A project with a live turn still gets the dialog that stops it.
+ assert.match(request, /runningSessions\[session\.id\] === true/, `${surface} checks live turns`);
+ assert.match(
+ request,
+ /setDelete(?:Project)?For\(/,
+ `${surface} opens the dialog for a project with a live task`,
+ );
+ assert.match(
+ request,
+ /showToast\(t\("project\.deleted", \{ name: (?:entry|project)\.name \}\), \{ variant: "success" \}\)/,
+ `${surface} reports the idle delete`,
+ );
+ assert.match(
+ request,
+ /errorCode === ErrorCodes\.CONFLICT[\s\S]{0,90}project\.deleteRunningBlocked/,
+ `${surface} keeps the host refusal localized`,
+ );
// The dialog still has to learn which of the project's sessions are live.
const props = dialogProps(source);
diff --git a/apps/desktop/test/two-step-delete.test.mjs b/apps/desktop/test/two-step-delete.test.mjs
new file mode 100644
index 000000000..60800cc0d
--- /dev/null
+++ b/apps/desktop/test/two-step-delete.test.mjs
@@ -0,0 +1,148 @@
+/**
+ * The session and project rows delete in two clicks: the first click arms the
+ * menu item and relabels it, the second removes the row. The arm is the same
+ * one the settings capability rows use (`hooks/use-armed-delete.ts`), and it
+ * expires on its own so a row never stays one stray click away from a
+ * permanent delete.
+ */
+import assert from "node:assert/strict";
+import { readFile } from "node:fs/promises";
+import test from "node:test";
+
+const LOCALE_IDS = ["en", "zh-CN", "zh-TW", "de", "es", "fr", "ko", "tr"];
+
+/** The label every locale arms its delete item with. */
+const CONFIRM_LABELS = {
+ en: "Delete?",
+ "zh-CN": "确认删除?",
+ "zh-TW": "確認刪除?",
+ de: "Löschen?",
+ es: "¿Eliminar?",
+ fr: "Supprimer ?",
+ ko: "삭제할까요?",
+ tr: "Silinsin mi?",
+};
+
+const read = (path) => readFile(new URL(path, import.meta.url), "utf8");
+
+const [
+ hookSource,
+ sidebarSource,
+ projectsSource,
+ capabilityLayoutSource,
+ skillsPageSource,
+ ...localeSources
+] = await Promise.all([
+ read("../src/hooks/use-armed-delete.ts"),
+ read("../src/components/Sidebar.tsx"),
+ read("../src/pages/ProjectsPage.tsx"),
+ read("../src/components/settings/AgentCapabilityLayout.tsx"),
+ read("../src/components/settings/AgentSkillsPage.tsx"),
+ ...LOCALE_IDS.map((id) => read(`../../../packages/i18n/src/locales/${id}/index.ts`)),
+]);
+
+const catalogs = new Map(LOCALE_IDS.map((id, index) => [id, localeSources[index]]));
+
+/** A top-level catalog block, so a key lookup cannot match another namespace. */
+function catalogBlock(source, name, next) {
+ const start = source.search(new RegExp(`^ "?${name}"?: \\{`, "m"));
+ assert.ok(start >= 0, `${name} block starts`);
+ const rest = source.slice(start + 1);
+ const end = rest.search(new RegExp(`^ "?${next}"?: \\{`, "m"));
+ assert.ok(end > 0, `${name} block ends`);
+ return rest.slice(0, end);
+}
+
+function blockValue(block, key) {
+ const match = block.match(new RegExp(`^ "?${key}"?:\\s*"([^"]*)"`, "m"));
+ assert.ok(match, `${key} is defined in the block`);
+ return match[1];
+}
+
+/** The body of one two-step delete handler, up to its closing brace. */
+function handlerBlock(source, name) {
+ const start = source.indexOf(`const ${name} = `);
+ assert.ok(start >= 0, `${name} exists`);
+ const rest = source.slice(start);
+ const end = rest.indexOf("\n };");
+ assert.ok(end > 0, `${name} closes`);
+ return rest.slice(0, end);
+}
+
+test("the arm expires on its own and has a single owner", () => {
+ assert.match(hookSource, /export const ARMED_DELETE_MS = 3200/);
+ assert.match(hookSource, /const timer = setTimeout\(\(\) => setArmed\(null\), timeoutMs\)/);
+ assert.match(hookSource, /return \(\) => clearTimeout\(timer\)/);
+
+ // The settings capability rows keep importing the hook from their shared
+ // layout, and the layout re-exports the one implementation instead of
+ // carrying a second copy with its own timeout.
+ assert.match(capabilityLayoutSource, /export \{ useArmedDelete \} from "\.\.\/\.\.\/hooks\/use-armed-delete"/);
+ assert.doesNotMatch(capabilityLayoutSource, /export function useArmedDelete/);
+ assert.doesNotMatch(capabilityLayoutSource, /DELETE_CONFIRM_MS/);
+ assert.match(skillsPageSource, /useArmedDelete\(\)/);
+});
+
+test("the session and project rows share that arm", () => {
+ for (const [surface, source] of [
+ ["Sidebar", sidebarSource],
+ ["ProjectsPage", projectsSource],
+ ]) {
+ assert.match(
+ source,
+ /import \{ useArmedDelete \} from "\.\.\/hooks\/use-armed-delete"/,
+ surface,
+ );
+ assert.match(source, /const \{ armed: armedDelete, setArmed: setArmedDelete \} = useArmedDelete\(\)/);
+ }
+});
+
+test("the session menu deletes on the second click, not the first", () => {
+ assert.match(sidebarSource, /data-action="delete-session"/);
+ assert.match(sidebarSource, /onClick=\{\(\) => requestDeleteSession\(session\)\}/);
+ // The item shows which click it is on, for the pointer and for the tests.
+ assert.match(sidebarSource, /data-armed=\{armedDelete === session\.id \? "true" : undefined\}/);
+ assert.match(
+ sidebarSource,
+ /className=\{cx\("danger", armedDelete === session\.id && "is-armed"\)\}/,
+ );
+ assert.match(
+ sidebarSource,
+ /\{armedDelete === session\.id\s*\?\s*t\("nav\.deleteTaskConfirm", \{ defaultValue: "Delete\?" \}\)\s*:\s*t\("nav\.deleteTask", \{ defaultValue: "Delete" \}\)\}/,
+ );
+ // The session ids are the armed keys of the sidebar's session items, and the
+ // project items namespace theirs so the two menus can never share an arm.
+ assert.match(sidebarSource, /const projectDeleteKey = \(entry: ProjectEntry\) => `project:\$\{entry\.key\}`/);
+
+ const request = handlerBlock(sidebarSource, "requestDeleteSession");
+ assert.match(request, /if \(armedDelete !== session\.id\) \{/);
+ assert.match(request, /setArmedDelete\(session\.id\);\s*return;/);
+ assert.match(request, /setArmedDelete\(null\);\s*void deleteSession\(session\);/);
+ assert.ok(
+ request.indexOf("deleteSession(session)") > request.indexOf("setArmedDelete(session.id)"),
+ "the delete runs only behind the arm",
+ );
+ // Nothing closes the menu on the first click, so the second one can land on
+ // the very same item.
+ assert.doesNotMatch(request, /closeMenus/);
+});
+
+test("both delete labels ship in every catalog and read the same", () => {
+ for (const id of LOCALE_IDS) {
+ const source = catalogs.get(id);
+ const expected = CONFIRM_LABELS[id];
+ assert.equal(blockValue(catalogBlock(source, "nav", "sessionCollaboration"), "deleteTaskConfirm"), expected, id);
+ assert.equal(blockValue(catalogBlock(source, "project", "pulls"), "deleteMenuConfirm"), expected, id);
+ if (id !== "en") {
+ assert.notEqual(expected, CONFIRM_LABELS.en, `${id} is translated`);
+ }
+ }
+
+ // The armed label states the same action in the settings rows the pattern is
+ // copied from, so the two surfaces never disagree about what a second click
+ // does.
+ assert.equal(
+ blockValue(catalogBlock(catalogs.get("zh-CN"), "settings", "project"), "capabilityRemoveConfirm"),
+ "再点一次删除",
+ );
+});
diff --git a/docs/spec/04-ux/09-interaction-patterns.md b/docs/spec/04-ux/09-interaction-patterns.md
index d93ad1420..554675fe5 100644
--- a/docs/spec/04-ux/09-interaction-patterns.md
+++ b/docs/spec/04-ux/09-interaction-patterns.md
@@ -217,6 +217,14 @@ may be retained while exactly one workspace supplies the visible shell context.
- **Archive** is non-destructive. Archived rows are hidden by default,
available through Show archived, and restorable. Archiving does not cancel
a turn or delete a transcript.
+- **Delete** removes a session or a project permanently and takes two clicks:
+ the first arms the overflow item and relabels it (`nav.deleteTaskConfirm` /
+ `project.deleteMenuConfirm`), and only the second click removes the row. The
+ arm expires on its own, so a row never stays one stray click away from a
+ permanent delete, and the folder on disk is never touched. A project whose
+ turn is still live still opens the confirmation dialog that names those
+ sessions and stops them first; an idle project is removed on that second
+ click.
- **Create branch** snapshots an idle conversation's complete active
transcript into an independent session in the same project/Temporary scope.
The command is disabled while the source runs. Success selects the child and
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index f046b1597..1fe1fa0a5 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -7453,6 +7453,7 @@ identify the platform validation still needed.
| D — Workspace (project delete) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
| F — Persistence (project delete) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
| Quality (project delete) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
+| Quality (two-click delete) | E2E-SESSION-two-click-delete-arms-first |
| Security (plugin real-time capabilities) | E2E-PLUGIN-global-shortcut-owns-only-its-own-command, E2E-PLUGIN-permission-gate-for-real-time-capabilities, E2E-PLUGIN-background-audio-and-realtime-connection |
| C — Conversation & stream (disclosure reading position) | E2E-CHAT-disclosure-toggle-keeps-reading-position |
| E — Tools & permissions (disclosure reading position) | E2E-CHAT-disclosure-toggle-keeps-reading-position |
@@ -7483,6 +7484,7 @@ identify the platform validation still needed.
| Post-MVP remote control | E2E-221, E2E-222, E2E-223, E2E-224, E2E-225, E2E-226, E2E-227, E2E-228, E2E-229, E2E-230, E2E-231, E2E-232 |
| Trusted extensions (R7 v1) | E2E-241, E2E-242, E2E-TRUSTED-EXTENSION-custom-agent-stream-and-binding, E2E-243, E2E-244, E2E-245, E2E-PLUGIN-imported-pi-package-skills, E2E-PLUGIN-import-extension-installs-dependencies, E2E-PLUGIN-import-extension-reports-missing-dependency, E2E-PLUGIN-declared-provider-appears-in-the-native-provider-list |
| M6+ (Project delete) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
+| M6+ (Two-click delete) | E2E-SESSION-two-click-delete-arms-first |
| C — Conversation & stream (model fallback) | E2E-SUBAGENT-ordered-model-fallback-preserves-work |
| Quality (model fallback isolation) | E2E-SUBAGENT-ordered-model-fallback-preserves-work |
| C — Conversation & stream (legacy subagent turn limit) | E2E-SUBAGENT-legacy-turn-limit-frontmatter-is-ignored |
@@ -8090,12 +8092,14 @@ This test plan spec is accepted when:
active workspace; C a root of a stored two-folder project group.
- **Steps**: open Settings → Project archive, open A's row menu, choose Delete
project, and confirm in the dialog. Then repeat the same action from the
- sidebar project menu for B while B is the active workspace. Then attempt the
- same action for C, then for a path the host no longer knows, and finally for a
+ sidebar project menu for B while B is the active workspace: the item arms on
+ the first click and only the second click removes B. Then attempt the same
+ action for C, then for a path the host no longer knows, and finally for a
fourth project D while one of D's tasks is still running.
- **Expected**: the dialog names the project, states that the project and its
sessions with their transcripts are removed permanently, and states that the
- folder on disk is not deleted; nothing is removed before the confirmation.
+ folder on disk is not deleted; nothing is removed before the confirmation, and
+ an armed item that is left alone disarms itself and removes nothing.
After confirming, the durable project row, that project's sessions, their
transcripts, scratch and review files, and its durable project memory are
gone, while the folder on disk is untouched. The deleted project disappears
@@ -8155,6 +8159,31 @@ This test plan spec is accepted when:
ids, the dialog's running-session line and stop-and-delete label, the abort
loop running before `deleteProject`, the `CONFLICT` fallback, and the new
copy in every shipped catalog; the end-to-end journey remains Draft
+
+### E2E-SESSION-two-click-delete-arms-first
+
+- **Preconditions**: a project with one idle session and one running session,
+ both reachable from the sidebar session menu, the sidebar project menu, and
+ the Projects index.
+- **Steps**: open the session menu of the idle session, press Delete once, and
+ leave the item armed until the arm expires before pressing it again to confirm
+ the removal. Repeat for a project row from the sidebar menu and from the
+ Projects index.
+- **Expected**: the first press removes nothing and relabels the item to
+ `nav.deleteTaskConfirm` / `project.deleteMenuConfirm` ("Delete?" / "确认删除?")
+ with `data-armed="true"`; the menu stays open, and an outside press, Escape, or
+ the expiry clears the arm without removing anything. Only the second press
+ removes the session with its transcript and its row, and only the second press
+ on a project row removes an idle project. A session and a project never share
+ an arm. Deleting a project whose turn is live still opens the dialog that names
+ those sessions and stops them (see
+ E2E-PROJECT-delete-running-sessions-are-named-and-stopped).
+- **Specs linked**: `04-ux/09-interaction-patterns.md` §1.6, D421, D431, D437
+- **Acceptance criterion**: Quality
+- **Milestone**: M6+
+- **Status**: Partially automated — `apps/desktop/test/two-step-delete.test.mjs`
+ pins the shared arm and its expiry, both labels in every shipped catalog, and
+ that the first press only arms; the end-to-end journey remains Draft
### US-UI-59 Session-rooted background tools
- Start a visible turn in project A, switch to project B while it runs, and
inspect both sidebar status indicators.
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 6fbea634d..1afd05158 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -5653,3 +5653,34 @@ that was sitting at the bottom — including after the turn had finished.
- See ADR 0272, `05-security/01-security.md` §4.1,
`03-runtime/09-logging-and-observability.md`, and
`06-delivery/04-e2e-test-plan.md` E2E-SKILL-MARKET-NET-BOUNDARY.
+
+## 2026-09-17 — Session and project rows delete on the second click (D437)
+
+- The sidebar's session item and both project menus (sidebar and Projects index)
+ removed the row on the first click of Delete. Every other destructive row
+ action — the settings provider rows, vendor accounts, and the capability
+ tables — arms first and relabels the control, so the two most destructive
+ actions were the only ones that fired on a single click.
+- `hooks/use-armed-delete.ts` now owns that pattern for the whole renderer: one
+ `ARMED_DELETE_MS` (3200ms) expiry and one `useArmedDelete()`. The capability
+ pages keep importing it from `AgentCapabilityLayout`, which re-exports the
+ shared hook instead of holding a second copy with a timeout of its own, so the
+ pattern cannot drift between the settings rows and the two menus.
+- A session item arms on `session.id`; both project menus arm on a
+ `project:`-prefixed key, so a session and a project can never share an arm. An
+ armed item carries `data-armed="true"`, a danger wash, and the label
+ `nav.deleteTaskConfirm` / `project.deleteMenuConfirm` ("Delete?" / "确认删除?")
+ in all eight catalogs. The menu stays open between the two clicks, and an
+ outside press, Escape, or the expiry clears the arm without removing anything.
+- Amends D431 for the idle case: a project whose turn is still live still opens
+ `ProjectDeleteDialog`, which names those sessions and stops them before it
+ deletes, and the host's 1008 / `CONFLICT` refusal is still mapped to
+ `project.deleteRunningBlocked` on both paths. A project with no live turn is
+ removed by the same store action the dialog used, with the same success toast,
+ so its second click is the confirmation the user already gave.
+- Renderer only: no protocol, storage, host, permission, or migration change,
+ and no new default. The folder on disk is still never touched. See
+ `04-ux/09-interaction-patterns.md`, D421, D431,
+ `06-delivery/04-e2e-test-plan.md`
+ E2E-PROJECT-delete-removes-project-and-owned-sessions, and
+ `apps/desktop/test/two-step-delete.test.mjs`.
diff --git a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
index d15d43277..90910104b 100644
--- a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
+++ b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
@@ -176,6 +176,11 @@
- **存档**是非破坏性的。默认情况下,存档的行是隐藏的,
可通过显示已存档且可恢复。存档不会取消
转动或删除成绩单。
+- **删除**会永久移除会话或项目,并且需要点击两次:第一次点击武装该溢出菜单项并改写其
+ 标签(`nav.deleteTaskConfirm` / `project.deleteMenuConfirm`),只有第二次点击才会移除
+ 该行。武装会在几秒后自行失效,因此一行永远不会停留在“再点一次就永久删除”的状态,磁盘
+ 上的文件夹也永远不会被触碰。仍有运行中轮次的项目依然会打开确认对话框,由它指明这些会话
+ 并先将其停止;空闲的项目在第二次点击时即被移除。
- **创建分支**快照空闲对话的完整活动状态
转录到同一 project/Temporary 范围内的独立会话中。
当源运行时该命令被禁用。成功选择了孩子
diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index 4c2b25b64..23bea7406 100644
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@ -4960,6 +4960,7 @@ IPC 请求无法关闭。
| D — 工作区(删除项目) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
| F — 持久化(删除项目) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
| 品质(删除项目) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
+| 品质(两步删除) | E2E-SESSION-two-click-delete-arms-first |
| Security (plugin real-time capabilities) | E2E-PLUGIN-global-shortcut-owns-only-its-own-command、E2E-PLUGIN-permission-gate-for-real-time-capabilities、E2E-PLUGIN-background-audio-and-realtime-connection |
| C — 对话与流式(展开详情保持阅读位置) | E2E-CHAT-disclosure-toggle-keeps-reading-position |
| E — 工具与权限(展开详情保持阅读位置) | E2E-CHAT-disclosure-toggle-keeps-reading-position |
@@ -4990,6 +4991,7 @@ IPC 请求无法关闭。
| MVP 后远程控制 | E2E-221、E2E-222、E2E-223、E2E-224、E2E-225、E2E-226、E2E-227、E2E-228、E2E-229、E2E-230、E2E-231、E2E-232 |
| 受信任扩展(R7 v1) | E2E-241、E2E-242、E2E-243、E2E-244、E2E-245、E2E-PLUGIN-imported-pi-package-skills、E2E-PLUGIN-import-extension-installs-dependencies、E2E-PLUGIN-import-extension-reports-missing-dependency、E2E-PLUGIN-declared-provider-appears-in-the-native-provider-list |
| M6+(删除项目) | E2E-PROJECT-delete-removes-project-and-owned-sessions |
+| M6+(两步删除) | E2E-SESSION-two-click-delete-arms-first |
| C — 对话和直播(模型回退) | E2E-SUBAGENT-ordered-model-fallback-preserves-work |
| 品质(模型回退隔离) | E2E-SUBAGENT-ordered-model-fallback-preserves-work |
| C — 对话和直播(旧版子代理回合上限) | E2E-SUBAGENT-legacy-turn-limit-frontmatter-is-ignored |
@@ -5512,14 +5514,16 @@ IPC 请求无法关闭。
- **前提条件**:三个持久项目 A、B 和 C,每个都至少有一个带转录本的会话;A 已归档并作为
侧边栏选项卡保留;B 是活动工作区;C 是一个已存储双文件夹项目组的根目录。
- **步骤**:打开设置 → 项目存档,打开 A 的行菜单,选择删除项目,并在对话框中确认。然后
- 从侧边栏项目菜单对正处于活动工作区的 B 重复同一操作。接着对 C 尝试同一操作,然后对一个
- 宿主已不再知晓的路径尝试,最后在 D 的某个任务仍在运行时尝试删除 D。
+ 从侧边栏项目菜单对正处于活动工作区的 B 重复同一操作:第一次点击只是武装该项,只有第二次
+ 点击才会移除 B。接着对 C 尝试同一操作,然后对一个宿主已不再知晓的路径尝试,最后在 D 的
+ 某个任务仍在运行时尝试删除 D。
- **预期**:对话框会指明项目名称,说明该项目及其会话与转录本会被永久移除,并说明磁盘上的
- 文件夹不会被删除;确认之前不会移除任何内容。确认后,持久项目行、该项目的会话、其转录本、
- scratch 和 review 文件以及该项目的持久记忆均已消失,而磁盘上的文件夹保持原样。被删除的
- 项目会立即从设置 → 项目存档和侧边栏中消失,重新加载后依然如此:没有保留的选项卡、没有
- 最近项目条目、没有由会话推导的行,也没有残留的 pin、archive 或 order 偏好。其他所有项目
- 的会话与转录本不受影响。当被删除的项目曾是活动工作区时,工作区回退到另一个已打开的项目
+ 文件夹不会被删除;确认之前不会移除任何内容,被武装后放置不管的项会自行解除武装、不会移除
+ 任何东西。确认后,持久项目行、该项目的会话、其转录本、scratch 和 review 文件以及该项目的
+ 持久记忆均已消失,而磁盘上的文件夹保持原样。被删除的项目会立即从设置 → 项目存档和侧边栏
+ 中消失,重新加载后依然如此:没有保留的选项卡、没有最近项目条目、没有由会话推导的行,也没有
+ 残留的 pin、archive 或 order 偏好。其他所有项目的会话与转录本不受影响。当被删除的项目曾是
+ 活动工作区时,工作区回退到另一个已打开的项目
或 Temporary,且下次启动不会重新打开已删除的路径。磁盘上文件夹已被移动或删除的项目仍可
移除。删除 C 会被拒绝并给出提示消息,该组保持不变;宿主已无持久行的路径仍会从项目存档与
侧边栏中移除,不会报出缺少项目的错误。当 D 的任务仍在运行时删除 D 会打开确认对话框,而不是给出
@@ -5557,6 +5561,24 @@ IPC 请求无法关闭。
先于 `deleteProject` 执行、`CONFLICT` 兜底路径,以及所有已发布语言包中的新文案;端到端旅程仍为
草稿
+### E2E-SESSION-two-click-delete-arms-first
+
+- **前提条件**:一个包含一个空闲会话和一个运行中会话的项目,二者都可从侧边栏会话菜单、侧边栏
+ 项目菜单以及项目索引到达。
+- **步骤**:打开空闲会话的会话菜单,按一次删除,并让该项保持武装直到武装超时,然后再按一次以
+ 确认移除。对来自侧边栏菜单与项目索引的项目行重复该操作。
+- **预期**:第一次按下不会移除任何东西,并把该项标签改为 `nav.deleteTaskConfirm` /
+ `project.deleteMenuConfirm`("Delete?" / "确认删除?")且带 `data-armed="true"`;菜单保持
+ 打开,点击外部、按 Escape 或武装超时都会解除武装且不移除任何内容。只有第二次按下才会移除
+ 该会话及其转录本和该行,也只有对项目行的第二次按下才会移除空闲项目。会话与项目永远不会共用
+ 一次武装。删除仍有运行中轮次的项目时,仍会打开指明这些会话并停止它们的对话框(见
+ E2E-PROJECT-delete-running-sessions-are-named-and-stopped)。
+- **链接规格**:`04-ux/09-interaction-patterns.md` §1.6、D421、D431、D437
+- **验收**:品质
+- **里程碑**:M6+
+- **状态**:部分自动化 —— `apps/desktop/test/two-step-delete.test.mjs` 固定了共享的武装与它的
+ 超时、所有已发布语言包中的两个标签,以及第一次按下只做武装;端到端旅程仍为草稿
+
### US-UI-59 基于会话的后台工具
- 在项目 A 中启动可见轮次,在项目 B 运行时切换到项目 B,并且
检查两个侧边栏状态指示器。
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index 59d66c4e1..1febe037a 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -4279,3 +4279,11 @@ that amendment are retired by ADR 0268; the upstream work-panel lifecycle stays.
- 拒绝与市场的 `failureDetails` 现在都带 `route`,因此「直连线路上的 fake-IP 拒绝」与「读不出线路的拒绝」在诊断里可以区分。
- MCP 市场仍使用自己的地址钉定 Node HTTPS 守卫(ADR 0245),本次不变;fake-IP 环境下它的源仍会被拒绝。
- 见 ADR 0272、`05-security/01-security.md` §4.1、`03-runtime/09-logging-and-observability.md` 与 `06-delivery/04-e2e-test-plan.md` 的 E2E-SKILL-MARKET-NET-BOUNDARY。
+
+## 2026-09-17 —— 会话与项目行在第二次点击时才删除(D437)
+
+- 侧边栏的会话菜单项与两个项目菜单(侧边栏与项目索引)此前在第一次点击「删除」时就移除该行。应用内其他所有破坏性行操作 —— 设置里的模型服务行、厂商账户行以及能力表格 —— 都先武装再改写控件标签,于是最不能撤销的两个动作反而是唯一单击即生效的。
+- 这一模式现在由 `hooks/use-armed-delete.ts` 为整个渲染层拥有:同一个 `ARMED_DELETE_MS`(3200ms)失效时间与同一个 `useArmedDelete()`。能力页面继续从 `AgentCapabilityLayout` 导入它,而该布局改为再导出这个共享 hook,不再保留一份带自己超时的副本,因此这一模式不会在设置行与两个菜单之间漂移。
+- 会话菜单项以 `session.id` 作为武装键;两个项目菜单则以 `project:` 前缀的键武装,因此会话与项目永远不会共用一次武装。被武装的菜单项带 `data-armed="true"`、危险色淡底,并在八种语言里都把标签换成 `nav.deleteTaskConfirm` / `project.deleteMenuConfirm`("Delete?" / "确认删除?")。两次点击之间菜单保持打开;点击外部、按 Escape 或武装超时都会解除武装且不移除任何内容。
+- 这是对 D431 在空闲场景下的修订:仍有运行中轮次的项目依然打开 `ProjectDeleteDialog`,由它指明这些会话并先停止它们再删除;宿主的 1008 / `CONFLICT` 拒绝在两条路径上仍映射为 `project.deleteRunningBlocked`。没有运行中轮次的项目由对话框原本使用的同一个 store 动作移除,并发出同样的成功 toast,因此它的第二次点击就是用户已经给出的确认。
+- 仅渲染层:无协议、存储、宿主、权限或迁移改动,也没有新增默认值。磁盘上的文件夹仍永远不被触碰。见 `04-ux/09-interaction-patterns.md`、D421、D431、`06-delivery/04-e2e-test-plan.md` 的 E2E-PROJECT-delete-removes-project-and-owned-sessions,以及 `apps/desktop/test/two-step-delete.test.mjs`。
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index 2834cf9b3..4ed9cc294 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -155,6 +155,7 @@ export const de = {
"createBranch": "Verzweigung von hier aus",
"branchTitle": "{{title}} (Verzweigung)",
"deleteTask": "Löschen",
+ "deleteTaskConfirm": "Löschen?",
"copyConversationId": "Gesprächs-ID kopieren",
"openSessionPath": "Sitzungspfad öffnen",
"timeGroupYesterday": "Gestern",
@@ -1144,6 +1145,7 @@ sklm: {
"archive": "Projekt archivieren",
"restore": "Projekt wiederherstellen",
"delete": "Projekt löschen",
+ "deleteMenuConfirm": "Löschen?",
"deleteTitle": "Projekt löschen",
"deleteDescription": "{{name}} wird dauerhaft entfernt und kann nicht wiederhergestellt werden.",
"deleteSessions_one": "{{count}} gespeicherte Sitzung wird mit ihren Verläufen dauerhaft gelöscht.",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index 885592f9b..c8d5fb928 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -162,6 +162,7 @@ export const en = {
createBranch: "Branch from here",
branchTitle: "{{title}} (branch)",
deleteTask: "Delete",
+ deleteTaskConfirm: "Delete?",
copyConversationId: "Copy conversation ID",
openSessionPath: "Open session path",
timeGroupYesterday: "Yesterday",
@@ -1160,6 +1161,7 @@ sklm: {
archive: "Archive project",
restore: "Restore project",
delete: "Delete project",
+ deleteMenuConfirm: "Delete?",
deleteTitle: "Delete project",
deleteDescription: "This permanently removes {{name}} and cannot be undone.",
deleteSessions_one: "{{count}} saved session and its transcripts is deleted permanently.",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index d8a9fc543..58dc564fd 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -155,6 +155,7 @@ export const es = {
"createBranch": "Rama desde aquí",
"branchTitle": "{{title}} (rama)",
"deleteTask": "Eliminar",
+ "deleteTaskConfirm": "¿Eliminar?",
"copyConversationId": "Copiar ID de conversación",
"openSessionPath": "Abrir ruta de sesión",
"timeGroupYesterday": "Ayer",
@@ -1144,6 +1145,7 @@ sklm: {
"archive": "Archivar proyecto",
"restore": "Restaurar proyecto",
"delete": "Eliminar proyecto",
+ "deleteMenuConfirm": "¿Eliminar?",
"deleteTitle": "Eliminar proyecto",
"deleteDescription": "{{name}} se eliminará de forma permanente y no se puede deshacer.",
"deleteSessions_one": "{{count}} sesión guardada se eliminará de forma permanente junto con sus transcripciones.",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index 2c743a09b..3a9b0d455 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -155,6 +155,7 @@ export const fr = {
"createBranch": "Brancher à partir d'ici",
"branchTitle": "{{title}} (branche)",
"deleteTask": "Supprimer",
+ "deleteTaskConfirm": "Supprimer ?",
"copyConversationId": "Copier l'ID de conversation",
"openSessionPath": "Ouvrir le chemin de la session",
"timeGroupYesterday": "Hier",
@@ -1144,6 +1145,7 @@ sklm: {
"archive": "Archiver le projet",
"restore": "Restaurer le projet",
"delete": "Supprimer le projet",
+ "deleteMenuConfirm": "Supprimer ?",
"deleteTitle": "Supprimer le projet",
"deleteDescription": "{{name}} sera supprimé définitivement, sans possibilité d'annulation.",
"deleteSessions_one": "{{count}} session enregistrée sera supprimée définitivement avec ses transcriptions.",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 295895a41..01e35f22d 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -164,6 +164,7 @@ export const ko = {
createBranch: "여기서 브랜치 만들기",
branchTitle: "{{title}} (브랜치)",
deleteTask: "삭제",
+ deleteTaskConfirm: "삭제할까요?",
copyConversationId: "대화 ID 복사",
openSessionPath: "세션 경로 열기",
timeGroupYesterday: "어제",
@@ -1161,6 +1162,7 @@ sklm: {
archive: "프로젝트 보관",
restore: "프로젝트 복원",
delete: "프로젝트 삭제",
+ deleteMenuConfirm: "삭제할까요?",
deleteTitle: "프로젝트 삭제",
deleteDescription: "{{name}}을(를) 영구적으로 삭제하며 되돌릴 수 없습니다.",
deleteSessions_one: "{{count}}개의 저장된 세션이 대화 기록과 함께 영구적으로 삭제됩니다.",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 6194ba453..d9caedb39 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -164,6 +164,7 @@ export const tr = {
createBranch: "Buradan dal oluştur",
branchTitle: "{{title}} (dal)",
deleteTask: "Sil",
+ deleteTaskConfirm: "Silinsin mi?",
copyConversationId: "Konuşma kimliğini kopyala",
openSessionPath: "Oturum yolunu aç",
timeGroupYesterday: "Dün",
@@ -1161,6 +1162,7 @@ sklm: {
archive: "Projeyi arşivle",
restore: "Projeyi geri yükle",
delete: "Projeyi sil",
+ deleteMenuConfirm: "Silinsin mi?",
deleteTitle: "Projeyi sil",
deleteDescription: "{{name}} kalıcı olarak silinir ve bu işlem geri alınamaz.",
deleteSessions_one: "{{count}} kayıtlı oturum, konuşma dökümleriyle birlikte kalıcı olarak silinir.",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index 8cb6faac8..cd2494c07 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -157,6 +157,7 @@ export const zhCN = {
createBranch: "从此处分支",
branchTitle: "{{title}}(分支)",
deleteTask: "删除",
+ deleteTaskConfirm: "确认删除?",
copyConversationId: "复制对话 ID",
openSessionPath: "打开会话路径",
timeGroupYesterday: "昨天",
@@ -1147,6 +1148,7 @@ sklm: {
archive: "归档项目",
restore: "恢复项目",
delete: "删除项目",
+ deleteMenuConfirm: "确认删除?",
deleteTitle: "删除项目",
deleteDescription: "将永久删除 {{name}},此操作无法撤销。",
deleteSessions_one: "{{count}} 个会话及其对话记录将被永久删除。",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index c454520ab..61a5f9074 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -157,6 +157,7 @@ export const zhTW = {
createBranch: "從此處分支",
branchTitle: "{{title}}(分支)",
deleteTask: "刪除",
+ deleteTaskConfirm: "確認刪除?",
copyConversationId: "複製對話 ID",
openSessionPath: "開啟會話路徑",
timeGroupYesterday: "昨天",
@@ -1147,6 +1148,7 @@ sklm: {
archive: "歸檔專案",
restore: "恢復專案",
delete: "刪除專案",
+ deleteMenuConfirm: "確認刪除?",
deleteTitle: "刪除專案",
deleteDescription: "將永久刪除 {{name}},此操作無法復原。",
deleteSessions_one: "{{count}} 個會話及其對話記錄將被永久刪除。",