Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(desktop): make the tasks badge and rows mirror live work
skyleraf68e1bd1a05
diff --git a/apps/desktop/src/components/TaskDock.tsx b/apps/desktop/src/components/TaskDock.tsxindex c13bcdb79..f20c29df3 100644--- a/apps/desktop/src/components/TaskDock.tsx+++ b/apps/desktop/src/components/TaskDock.tsx@@ -58,7 +58,7 @@ function TaskDockPanel({ sessionId }: { sessionId: string }) {// The container owns the todo read, so it hands the hook the todo side it// cannot read itself: one tab rule then decides both the visible panel and- // whether a new task needs a badge.+ // the badge on the tasks tab.const {tasks,activeTab,@@ -79,8 +79,8 @@ function TaskDockPanel({ sessionId }: { sessionId: string }) {} = useBackgroundTasks(sessionId, todos);// Presence, the live count, and the header count describe the rows the- // container can render. Host-core keeps a finished task in its registry after- // the row's grace window closes, so deriving them from the session's full+ // container can render. Host-core keeps a finished task in its registry as+ // history after its row leaves, so deriving them from the session's full// task list would leave a permanent "1 background tasks" header with no row// to stop, dismiss, or read.const hasTasks = tasks.length > 0;@@ -167,7 +167,7 @@ function TaskDockPanel({ sessionId }: { sessionId: string }) {{badge > 0 ? (<spanclassName="dock-tab-badge"- aria-label={t("taskDock.newTasks", { count: badge })}+ aria-label={t("taskDock.runningCount", { count: badge })}>{badgeText}</span>diff --git a/apps/desktop/src/features/chat/background-tasks/bar-visibility.ts b/apps/desktop/src/features/chat/background-tasks/bar-visibility.tsindex c48707846..1b2572472 100644--- a/apps/desktop/src/features/chat/background-tasks/bar-visibility.ts+++ b/apps/desktop/src/features/chat/background-tasks/bar-visibility.ts@@ -1,161 +1,29 @@import type { BackgroundTaskSummary } from "../../../lib/api";/**- * How long a finished task stays in the bar after the renderer watched it- * running. Long enough to read the exit code, short enough that a command that- * completed minutes ago does not become a permanent resident above the- * composer.- */-export const ENDED_VISIBLE_MS = 10_000;--/** Visibility bookkeeping owned by the renderer, never persisted or sent. */-export type BarVisibility = {- /** Tasks observed as running at least once in this renderer session. */- seenRunning: ReadonlySet<string>;- /** Subset of `seenRunning` that has finished since, with the observation time. */- endedAt: ReadonlyMap<string, number>;- /** Tasks the user closed from the bar. */- dismissed: ReadonlySet<string>;-};--export const EMPTY_VISIBILITY: BarVisibility = {- seenRunning: new Set(),- endedAt: new Map(),- dismissed: new Set(),-};--function pruneSet(source: ReadonlySet<string>, liveIds: ReadonlySet<string>): Set<string> {- const next = new Set<string>();- for (const id of source) {- if (liveIds.has(id)) next.add(id);- }- return next;-}--function pruneMap(- source: ReadonlyMap<string, number>,- liveIds: ReadonlySet<string>,-): Map<string, number> {- const next = new Map<string, number>();- for (const [id, at] of source) {- if (liveIds.has(id)) next.set(id, at);- }- return next;-}--/**- * Fold one registry snapshot into the visibility bookkeeping.+ * Which rows the tasks bar may render.*- * A task that is already finished the first time the renderer sees it is- * registry history — it may have ended before the window opened — so it never- * becomes visible. Only a task observed running gets the post-exit grace- * window. Entries for tasks the registry dropped are pruned, so the- * bookkeeping cannot grow across a long session.- *- * Returns the previous state when nothing changed, so callers can skip work.+ * The registry in host-core keeps every finished task as readable history; the+ * bar answers only to the live present: a task the session is still running,+ * or one whose continuation decision is still pending, plus the single row+ * whose output the user is reading, so an open log cannot vanish underneath+ * it (#2632).*/-export function observeTasks(- state: BarVisibility,- tasks: readonly BackgroundTaskSummary[],- now: number,-): BarVisibility {- const liveIds = new Set(tasks.map((task) => task.id));- const seenRunning = pruneSet(state.seenRunning, liveIds);- const endedAt = pruneMap(state.endedAt, liveIds);- const dismissed = pruneSet(state.dismissed, liveIds);- let changed =- seenRunning.size !== state.seenRunning.size ||- endedAt.size !== state.endedAt.size ||- dismissed.size !== state.dismissed.size;-- for (const task of tasks) {- if (task.state === "running" || task.continuation === "pending") {- if (!seenRunning.has(task.id)) {- seenRunning.add(task.id);- changed = true;- }- if (endedAt.delete(task.id)) changed = true;- continue;- }- if (seenRunning.has(task.id) && !endedAt.has(task.id)) {- endedAt.set(task.id, now);- changed = true;- }- }-- if (!changed) return state;- return { seenRunning, endedAt, dismissed };-}/**- * Tasks the bar may render right now: running ones always, finished ones only- * inside the grace window or while the user is reading their output- * (`pinnedId`), and never ones the user closed.+ * The rows the bar may render right now: live tasks — running, or waiting on a+ * continuation decision — always, plus the task whose output the user is+ * reading (`pinnedId`). A task that already ended when the renderer first+ * listed it is registry history and never gets a row.*/export function selectVisibleTasks(- state: BarVisibility,tasks: readonly BackgroundTaskSummary[],- now: number,pinnedId: string | null = null,): BackgroundTaskSummary[] {- return tasks.filter((task) => {- if (state.dismissed.has(task.id)) return false;- if (task.state === "running" || task.continuation === "pending") return true;- // Reading the log of a finished command must not be interrupted by the- // grace window expiring underneath it.- if (task.id === pinnedId) return true;- const ended = state.endedAt.get(task.id);- return ended !== undefined && now - ended < ENDED_VISIBLE_MS;- });-}--/**- * When the next grace window closes, or `null` when no visible row is about to- * expire. The caller schedules a single timer for this instant instead of- * polling for the bar to shrink.- */-export function nextExpiryAt(- state: BarVisibility,- tasks: readonly BackgroundTaskSummary[],- now: number,- pinnedId: string | null = null,-): number | null {- let earliest: number | null = null;- for (const task of selectVisibleTasks(state, tasks, now, pinnedId)) {- if (task.id === pinnedId || task.continuation === "pending") continue;- const ended = state.endedAt.get(task.id);- if (ended === undefined) continue;- const expiry = ended + ENDED_VISIBLE_MS;- if (earliest === null || expiry < earliest) earliest = expiry;- }- return earliest;-}--/**- * Hide one row from the bar. Runs nowhere near the process lifecycle.- *- * Removal is a view action, so it must never make a live task unreachable: a- * running task (including one already sent a stop signal, which is still- * `running` until the supervisor settles it) refuses removal here rather than- * relying on the caller not to render the control. `null` means the task is not- * in the current snapshot — nothing to remove, nothing to leak.- *- * Returns the previous state when the request is refused or already applied, so- * a stale snapshot cannot slip past the check.- */-export function dismissTask(- state: BarVisibility,- task: Pick<BackgroundTaskSummary, "id" | "state" | "continuation"> | null,-): BarVisibility {- if (!task) return state;- if (task.state === "running" || task.continuation === "pending") return state;- if (state.dismissed.has(task.id)) return state;- const dismissed = new Set(state.dismissed);- dismissed.add(task.id);- return { ...state, dismissed };-}--/** Whether the row may offer removal; the same rule `dismissTask` enforces. */-export function canDismiss(state: BarVisibility, task: Pick<BackgroundTaskSummary, "id" | "state" | "continuation">): boolean {- return task.state !== "running" && task.continuation !== "pending" && !state.dismissed.has(task.id);+ return tasks.filter(+ (task) =>+ task.state === "running" ||+ task.continuation === "pending" ||+ task.id === pinnedId,+ );}diff --git a/apps/desktop/src/features/chat/background-tasks/dock-state.ts b/apps/desktop/src/features/chat/background-tasks/dock-state.tsindex 527f2a8a2..30ec2ce90 100644--- a/apps/desktop/src/features/chat/background-tasks/dock-state.ts+++ b/apps/desktop/src/features/chat/background-tasks/dock-state.ts@@ -1,5 +1,3 @@-import type { BackgroundTaskSummary } from "../../../lib/api";-/*** View state for the shared Todo/background-task container.*@@ -18,14 +16,12 @@ export type DockTab = "todo" | "tasks";export type DockSessionState = {/** Tab the user last chose, or `null` while nothing was chosen yet. */readonly chosenTab: DockTab | null;- /** New tasks counted since the tasks tab was last entered (the badge). */- readonly newCount: number;/** Container-wide collapse; both tabs share it. */readonly collapsed: boolean;};export type DockViewState = Readonly<{- /** Per-session entry: the tab choice and the badge. */+ /** Per-session entry: the remembered tab choice. */sessions: Readonly<Record<string, DockSessionState>>;/** Container-wide collapse; independent of whichever session is on screen. */collapsed: boolean;@@ -36,7 +32,6 @@ export const EMPTY_DOCK_VIEW: DockViewState = { sessions: {}, collapsed: true };export const EMPTY_SESSION_DOCK: DockSessionState = {chosenTab: null,- newCount: 0,collapsed: EMPTY_DOCK_VIEW.collapsed,};@@ -62,7 +57,7 @@ function withSession(): DockViewState {const current = sessionDockState(view, sessionId);const session = { ...current, ...patch, collapsed: view.collapsed };- if (session.chosenTab === current.chosenTab && session.newCount === current.newCount) {+ if (session.chosenTab === current.chosenTab) {return view;}return { ...view, sessions: { ...view.sessions, [sessionId]: session } };@@ -111,59 +106,6 @@ export function resolveDockTabFor(state: DockSessionState, sides: DockSides): Do);}-/**- * Whether the background-task panel is the one on screen, which is the only- * condition under which a new task needs no badge. A collapsed container shows- * no panel at all, so it never counts as looking at the tasks.- *- * Shared with the hook so the badge rule has one definition instead of a copy- * that drifts from the render rule.- */-export function tasksPanelVisible(state: DockSessionState, sides: DockSides): boolean {- return !state.collapsed && resolveDockTabFor(state, sides) === "tasks";-}--/**- * Record a task list snapshot for one session.- *- * The badge counts tasks that appear for the first time while the tasks panel is- * not the one on screen: while it is visible a new row needs no announcement,- * and a collapsed container hides it too, so that case does count.- */-export function observeSessionTasks(- view: DockViewState,- sessionId: string,- tasks: readonly BackgroundTaskSummary[],- options: {- /** Task ids this session had already seen, before this snapshot. */- knownIds: ReadonlySet<string>;- /** Whether the tasks panel is currently the visible one. */- tasksVisible: boolean;- },-): { view: DockViewState; knownIds: Set<string> } {- const knownIds = new Set<string>();- let added = 0;- for (const task of tasks) {- knownIds.add(task.id);- if (options.knownIds.has(task.id)) continue;- if (task.state !== "running") continue;- if (!options.tasksVisible) added += 1;- }- if (added === 0) return { view, knownIds };- const current = sessionDockState(view, sessionId);- return {- view: withSession(view, sessionId, { newCount: current.newCount + added }),- knownIds,- };-}--/** The user entered the tasks tab: the badge has been seen. */-export function clearBadge(view: DockViewState, sessionId: string): DockViewState {- const current = sessionDockState(view, sessionId);- if (current.newCount === 0) return view;- return withSession(view, sessionId, { newCount: 0 });-}-/*** The user picked a tab. Only this writes the remembered choice, so a tab the* container chose on its own never overwrites what the user wanted.diff --git a/apps/desktop/src/features/chat/background-tasks/useBackgroundTasks.ts b/apps/desktop/src/features/chat/background-tasks/useBackgroundTasks.tsindex 0520bd0b4..709c766a1 100644--- a/apps/desktop/src/features/chat/background-tasks/useBackgroundTasks.ts+++ b/apps/desktop/src/features/chat/background-tasks/useBackgroundTasks.ts@@ -1,26 +1,16 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { api, type BackgroundTaskOutput, type BackgroundTaskSummary } from "../../../lib/api";-import {- type BarVisibility,- EMPTY_VISIBILITY,- dismissTask,- nextExpiryAt,- observeTasks,- selectVisibleTasks,-} from "./bar-visibility";+import { selectVisibleTasks } from "./bar-visibility";import {type DockSides,EMPTY_DOCK_VIEW,type DockTab,type DockViewState,badgeLabel,- clearBadge,- observeSessionTasks,pruneDockView,resolveDockTabFor,selectTab,sessionDockState,- tasksPanelVisible,toggleCollapsed,} from "./dock-state";import type { SessionTodo } from "@pi-desktop/shared";@@ -32,9 +22,9 @@ type Failure = "load" | "output" | "stop" | "remove";* Both sides of the container, described the way the tab rule expects.** The task side describes the rows the container can render, and the todo side- * comes from the caller, which owns that read. Both the render rule and the- * badge rule consume this one description, so they cannot disagree about which- * panel is on screen.+ * comes from the caller, which owns that read. The render rule and the badge+ * rule consume this one description, so they cannot disagree about which tasks+ * are live in the session.*/function sidesFor(rows: readonly BackgroundTaskSummary[],@@ -66,9 +56,7 @@ export function useBackgroundTasks(const [allTasks, setAllTasks] = useState<BackgroundTaskSummary[]>([]);// Renderer-local view state: which tasks the container may show. The registry// in host-core stays the source of truth for the processes themselves.- const [visibility, setVisibility] = useState<BarVisibility>(EMPTY_VISIBILITY);const [dockView, setDockView] = useState<DockViewState>(EMPTY_DOCK_VIEW);- const [clock, setClock] = useState(() => Date.now());const [expandedId, setExpandedId] = useState<string | null>(null);const [output, setOutput] = useState<BackgroundTaskOutput | null>(null);const [stoppingIds, setStoppingIds] = useState<Set<string>>(() => new Set());@@ -76,9 +64,6 @@ export function useBackgroundTasks(const mounted = useRef(false);const pendingStops = useRef(new Set<string>());const refreshList = useRef<(() => void) | null>(null);- // Ids already folded into the badge, per session, so a re-read of the same- // snapshot cannot count the same task twice.- const knownIds = useRef(new Map<string, Set<string>>());const sessionIdRef = useRef(sessionId);sessionIdRef.current = sessionId;@@ -99,30 +84,7 @@ export function useBackgroundTasks(try {const result = await api.backgroundTasksList();if (disposed) return;- const observedAt = Date.now();setAllTasks(result.tasks);- setVisibility((current) => observeTasks(current, result.tasks, observedAt));- setClock(observedAt);-- // Fold the snapshot into the badge for the session on screen. A task is- // "new" only while the tasks panel is not the one being looked at.- const currentSession = sessionIdRef.current;- if (currentSession) {- const sessionTasks = result.tasks.filter((task) => task.sessionId === currentSession);- const seen = knownIds.current.get(currentSession) ?? new Set<string>();- setDockView((current) => {- const state = sessionDockState(current, currentSession);- // The same description the render path uses: the rows the container- // can actually show decide whether its tasks panel is on screen.- const tasksVisible = tasksPanelVisible(state, sidesRef.current);- const folded = observeSessionTasks(current, currentSession, sessionTasks, {- knownIds: seen,- tasksVisible,- });- knownIds.current.set(currentSession, folded.knownIds);- return folded.view;- });- }setError((current) => current === "load" ? null : current);pollAgain = result.tasks.some((task) => task.state === "running");@@ -164,26 +126,16 @@ export function useBackgroundTasks([allTasks, sessionId],);- // Keep the per-session maps bounded as sessions come and go.+ // Keep the per-session view entries bounded as sessions come and go.useEffect(() => {const live = new Set(allTasks.map((task) => task.sessionId));if (sessionId) live.add(sessionId);setDockView((current) => pruneDockView(current, live));- for (const id of knownIds.current.keys()) {- if (!live.has(id)) knownIds.current.delete(id);- }}, [allTasks, sessionId]);- // Only what the container should render: running tasks, a finished task during- // its post-exit grace window, and the row whose output the user is reading.- const visibleTasks = selectVisibleTasks(visibility, sessionTasks, clock, expandedId);-- useEffect(() => {- const expiry = nextExpiryAt(visibility, sessionTasks, clock, expandedId);- if (expiry === null) return;- const timer = setTimeout(() => setClock(Date.now()), Math.max(0, expiry - clock));- return () => clearTimeout(timer);- }, [visibility, sessionTasks, clock, expandedId]);+ // Only what the container should render: the session's live tasks, plus the+ // row whose output the user is reading (#2632).+ const visibleTasks = selectVisibleTasks(sessionTasks, expandedId);const selectedState = sessionTasks.find((task) => task.id === expandedId)?.state;useEffect(() => {@@ -222,14 +174,13 @@ export function useBackgroundTasks(}, []);/**- * Enter the tasks tab: this is the only path that clears the badge.- *- * `selectTab` also expands the container, so a click on a tab while collapsed- * lands on a visible panel instead of appearing to do nothing.+ * Enter the tasks tab. `selectTab` also expands the container, so a click on+ * a tab while collapsed lands on a visible panel instead of appearing to do+ * nothing. The badge is derived from the rows, so no view action clears it.*/const openTasksTab = useCallback(() => {if (!sessionId) return;- setDockView((current) => clearBadge(selectTab(current, sessionId, "tasks"), sessionId));+ setDockView((current) => selectTab(current, sessionId, "tasks"));}, [sessionId]);const openTodoTab = useCallback(() => {@@ -244,7 +195,7 @@ export function useBackgroundTasks(}, []);/**- * Remove a row from the container.+ * Close the row the user removed.** The task is looked up here rather than trusting the caller's snapshot: a* running task — including one already stopping — is refused with `false` so@@ -256,7 +207,6 @@ export function useBackgroundTasks(setError("remove");return false;}- setVisibility((current) => dismissTask(current, task));setExpandedId((current) => current === id ? null : current);return true;}, [sessionTasks]);@@ -295,21 +245,20 @@ export function useBackgroundTasks(// that already left it cannot decide which panel is on screen.const sides = sidesFor(visibleTasks, todos);const activeTab: DockTab = resolveDockTabFor(dock, sides);- // The poll loop outlives a render, so it reads the container's description of- // itself through a ref rather than capturing one snapshot of it.- const sidesRef = useRef(sides);- sidesRef.current = sides;+ // The badge mirrors the session's live work: it rises when a task starts and+ // falls as tasks end, and no view action can change it (#2632).+ const badge = sides.runningTasks;return {- /** The session's rows the container may render: live, in grace, or pinned. */+ /** The session's rows the container may render: live, or being read. */tasks: visibleTasks,activeTab,openTasksTab,openTodoTab,collapsed: dock.collapsed,setCollapsed,- badge: dock.newCount,- badgeText: badgeLabel(dock.newCount),+ badge,+ badgeText: badgeLabel(badge),expandedId,output,stoppingIds,diff --git a/apps/desktop/test/background-tasks-bar-visibility.test.mjs b/apps/desktop/test/background-tasks-bar-visibility.test.mjsindex e847a8dc0..57a1339e0 100644--- a/apps/desktop/test/background-tasks-bar-visibility.test.mjs+++ b/apps/desktop/test/background-tasks-bar-visibility.test.mjs@@ -4,138 +4,58 @@ import test from "node:test";/** Background-tasks bar visibility. The registry in host-core keeps finished- * tasks as history; the bar must not turn that history into permanent rows- * above the composer. These tests pin the renderer-side rule with a controlled- * clock, so "did this row disappear yet" is decided by explicit timestamps- * instead of wall time.+ * tasks as history; the bar answers only to live work — a running task, or a+ * continuation decision still pending — plus the single row whose output the+ * user is reading, so an open log cannot vanish underneath it (#2632).*/register(new URL("./helpers/ts-import-hooks.mjs", import.meta.url));-const {- ENDED_VISIBLE_MS,- EMPTY_VISIBILITY,- canDismiss,- dismissTask,- nextExpiryAt,- observeTasks,- selectVisibleTasks,-} = await import("../src/features/chat/background-tasks/bar-visibility.ts");+const { selectVisibleTasks } = await import("../src/features/chat/background-tasks/bar-visibility.ts");-const task = (id, state, exitCode) => ({+const task = (id, state, extra = {}) => ({id,sessionId: "session-1",command: `cmd ${id}`,commandShellId: "bash",state,elapsedMs: 1_000,- exitCode,+ ...extra,});const ids = (tasks) => tasks.map((entry) => entry.id);-test("a task that is already finished when first observed never gets a row", () => {- const finished = [task("xcodebuild", "exited", 0), task("go-vet", "exited", 0)];- const state = observeTasks(EMPTY_VISIBILITY, finished, 1_000);-- assert.deepEqual(selectVisibleTasks(state, finished, 1_000), []);- assert.equal(nextExpiryAt(state, finished, 1_000), null);-});--test("a task observed running shows, keeps a grace window after exit, then leaves", () => {- const running = [task("a", "running")];- let state = observeTasks(EMPTY_VISIBILITY, running, 1_000);- assert.deepEqual(ids(selectVisibleTasks(state, running, 1_000)), ["a"]);-- const ended = [task("a", "exited", 0)];- state = observeTasks(state, ended, 5_000);- assert.deepEqual(ids(selectVisibleTasks(state, ended, 5_000)), ["a"]);- assert.deepEqual(ids(selectVisibleTasks(state, ended, 5_000 + ENDED_VISIBLE_MS - 1)), ["a"]);- assert.deepEqual(selectVisibleTasks(state, ended, 5_000 + ENDED_VISIBLE_MS), []);-});--test("a row the user removed stays removed across later snapshots", () => {- let state = observeTasks(EMPTY_VISIBILITY, [task("a", "running")], 0);- const ended = [task("a", "exited", 0)];- state = observeTasks(state, ended, 100);- assert.equal(selectVisibleTasks(state, ended, 100).length, 1);-- state = dismissTask(state, ended[0]);- assert.deepEqual(selectVisibleTasks(state, ended, 100), []);- state = observeTasks(state, ended, 200);- assert.deepEqual(selectVisibleTasks(state, ended, 200), []);-});--test("the row whose output is open is not pulled away by the grace window", () => {- let state = observeTasks(EMPTY_VISIBILITY, [task("a", "running")], 0);- const ended = [task("a", "exited", 0)];- state = observeTasks(state, ended, 100);- const muchLater = 100 + ENDED_VISIBLE_MS * 3;-- assert.deepEqual(ids(selectVisibleTasks(state, ended, muchLater, "a")), ["a"]);- assert.equal(nextExpiryAt(state, ended, muchLater, "a"), null);-});--test("running tasks never expire, and a running task cannot be removed", () => {- const running = [task("server", "running")];- const state = observeTasks(EMPTY_VISIBILITY, running, 0);- assert.equal(nextExpiryAt(state, running, 10 * ENDED_VISIBLE_MS), null);-- // Removal is a view action but must not make a live task unreachable: the- // state layer refuses it, so the row stays.- const afterRefusal = dismissTask(state, running[0]);- assert.equal(afterRefusal, state, "a refused removal must not change state");- assert.deepEqual(ids(selectVisibleTasks(afterRefusal, running, 0)), ["server"]);-});--test("removal is refused while a stopped task is still settling", () => {- // A task that has been signalled keeps `running` until the supervisor records- // the terminal state, so it must stay out of removal during that window.- const settling = [task("server", "running")];- const state = observeTasks(EMPTY_VISIBILITY, settling, 0);- assert.equal(canDismiss(state, settling[0]), false);- assert.equal(dismissTask(state, settling[0]), state);+test("a task that is already finished when first listed never gets a row", () => {+ const finished = [task("xcodebuild", "exited", { exitCode: 0 }), task("go-vet", "failed", { exitCode: 1 })];+ assert.deepEqual(selectVisibleTasks(finished), []);});-test("expiry reports the earliest deadline among the rows still visible", () => {- let state = observeTasks(EMPTY_VISIBILITY, [task("a", "running"), task("b", "running")], 0);- state = observeTasks(state, [task("a", "exited", 0), task("b", "running")], 1_000);- const both = [task("a", "exited", 0), task("b", "exited", 0)];- state = observeTasks(state, both, 2_000);+test("a running task keeps its row, and leaves as soon as its end state arrives", () => {+ const running = task("a", "running");+ assert.deepEqual(ids(selectVisibleTasks([running])), ["a"]);- assert.equal(nextExpiryAt(state, both, 2_000), 1_000 + ENDED_VISIBLE_MS);- assert.deepEqual(ids(selectVisibleTasks(state, both, 1_000 + ENDED_VISIBLE_MS)), ["b"]);- assert.equal(nextExpiryAt(state, both, 1_000 + ENDED_VISIBLE_MS), 2_000 + ENDED_VISIBLE_MS);+ // No post-exit grace window: the row goes the moment the registry reports+ // the task ended, even though the registry keeps it as history.+ const ended = { ...running, state: "exited", exitCode: 0 };+ assert.deepEqual(selectVisibleTasks([ended]), []);});-test("bookkeeping is pruned when the registry drops a task, so it cannot grow", () => {- let state = observeTasks(EMPTY_VISIBILITY, [task("a", "running"), task("b", "running")], 0);- // A terminal row may be removed; that is what puts an id into `dismissed`.- state = dismissTask(state, task("a", "exited", 0));- assert.deepEqual([...state.seenRunning].sort(), ["a", "b"]);- assert.deepEqual([...state.dismissed], ["a"]);+test("a pending continuation keeps its row until the decision is made", () => {+ const pending = task("a", "exited", { exitCode: 0, continuation: "pending" });+ assert.deepEqual(ids(selectVisibleTasks([pending])), ["a"]);- state = observeTasks(state, [task("b", "running")], 10);- assert.deepEqual([...state.seenRunning], ["b"]);- assert.deepEqual([...state.dismissed], []);- assert.equal(state.endedAt.size, 0);+ const settled = { ...pending, continuation: "started" };+ assert.deepEqual(selectVisibleTasks([settled]), []);});-test("an unchanged snapshot keeps the previous state object", () => {- const running = [task("a", "running")];- const state = observeTasks(EMPTY_VISIBILITY, running, 0);- assert.equal(observeTasks(state, running, 500), state);+test("the row whose output is being read stays until the reader closes it", () => {+ const ended = task("a", "exited", { exitCode: 0 });+ assert.deepEqual(ids(selectVisibleTasks([ended], "a")), ["a"]);+ // A different task's open preview does not pin this one.+ assert.deepEqual(selectVisibleTasks([ended], "b"), []);});--test("a pending continuation remains visible and cancellable after the process ends, including after reload", () => {- const pending = { id: "pending", sessionId: "s", state: "exited", continuation: "pending" };- const state = observeTasks(EMPTY_VISIBILITY, [pending], 0);- assert.deepEqual(selectVisibleTasks(state, [pending], ENDED_VISIBLE_MS * 10), [pending]);- assert.equal(canDismiss(state, pending), false);- assert.equal(dismissTask(state, pending), state);- assert.equal(nextExpiryAt(state, [pending], ENDED_VISIBLE_MS * 10), null);- const cancelled = { ...pending, continuation: "cancelled" };- const after = observeTasks(state, [cancelled], ENDED_VISIBLE_MS * 10);- assert.equal(canDismiss(after, cancelled), true);- assert.deepEqual(selectVisibleTasks(after, [cancelled], ENDED_VISIBLE_MS * 12), []);+test("a running task is visible whether or not its output is open", () => {+ const running = task("a", "running");+ assert.deepEqual(ids(selectVisibleTasks([running])), ["a"]);+ assert.deepEqual(ids(selectVisibleTasks([running], "a")), ["a"]);});diff --git a/apps/desktop/test/background-tasks-dock-render.test.mjs b/apps/desktop/test/background-tasks-dock-render.test.mjsindex aaf23f0ca..1b581a7e4 100644--- a/apps/desktop/test/background-tasks-dock-render.test.mjs+++ b/apps/desktop/test/background-tasks-dock-render.test.mjs@@ -12,11 +12,11 @@ import { fileURLToPath } from "node:url";* What the shared container shows once a task is over.** host-core keeps a finished task in its registry so its output stays readable- * and the renderer can show the exit code for the grace window; the entry is- * not deleted when the row leaves the container. The container must therefore- * answer to the rows it can render, never to the registry's full session list —- * otherwise a stopped or self-exited command leaves a permanent- * "1 background tasks" header with no row to stop, dismiss, or read.+ * by id; the entry is not deleted when the row leaves the container. The+ * container must therefore answer to the rows it can render, never to the+ * registry's full session list — otherwise a stopped or self-exited command+ * leaves a permanent "1 background tasks" header with no row to stop, dismiss,+ * or read.** Rendered through the real container, store, and locale with the task data* layer stubbed, so the assertion is what the user actually sees.@@ -146,10 +146,17 @@ test("an expanded task shows the complete multiline command above its output", a});});-test("a finished row inside its grace window still counts", async () => {+test("a finished row the container still shows raises no live count", async () => {await withDockRender(({ render }) => {+ // The hook keeps an ended row only while its output is being read (#2632);+ // the container renders whatever rows it is given with no rule of its own.const finished = task("t-grace", "exited", 0);- const html = render({ tasks: [finished], sessionTasks: [finished, task("t-hidden", "stopped")] });+ const html = render({+ tasks: [finished],+ sessionTasks: [finished],+ expandedId: "t-grace",+ output: { id: "t-grace", stdout: "", stderr: "", truncated: false },+ });assert.match(html, /1 background tasks/);assert.doesNotMatch(html, /running/, "a finished row raises no live count");assert.match(html, /pnpm dev t-grace/);diff --git a/apps/desktop/test/background-tasks-dock-state.test.mjs b/apps/desktop/test/background-tasks-dock-state.test.mjsindex 664c4bc84..e06fea61e 100644--- a/apps/desktop/test/background-tasks-dock-state.test.mjs+++ b/apps/desktop/test/background-tasks-dock-state.test.mjs@@ -4,9 +4,9 @@ import test from "node:test";/** The shared container's view state. These pin the rules a user can observe:- * which panel is on screen, when a new task raises a badge, and what a click on- * a tab does while the container is collapsed. All of it is plain renderer- * memory, so a controlled input decides every case.+ * which panel is on screen and what a click on a tab does while the container+ * is collapsed. All of it is plain renderer memory, so a controlled input+ * decides every case.*/register(new URL("./helpers/ts-import-hooks.mjs", import.meta.url));@@ -15,28 +15,16 @@ const {EMPTY_SESSION_DOCK,badgeLabel,chooseTab,- clearBadge,- observeSessionTasks,pruneDockView,resolveDockTab,resolveDockTabFor,selectTab,sessionDockState,- tasksPanelVisible,toggleCollapsed,} = await import("../src/features/chat/background-tasks/dock-state.ts");const SESSION = "session-1";-const task = (id, state = "running") => ({- id,- sessionId: SESSION,- command: `cmd ${id}`,- commandShellId: "bash",- state,- elapsedMs: 1_000,-});-/** A container the user has opened, with one session's state patched in. */const view = (patch) => ({sessions: { [SESSION]: { ...EMPTY_SESSION_DOCK, ...patch, collapsed: false } },@@ -80,13 +68,9 @@ test("clicking the already-active tab while collapsed still expands", () => {});test("only a user action writes the remembered tab", () => {- // Folding a snapshot into the badge must never overwrite what the user chose.+ // Tab selection must never overwrite what the user chose.const chosen = chooseTab(EMPTY_DOCK_VIEW, SESSION, "todo");- const afterBadge = observeSessionTasks(chosen, SESSION, [task("a")], {- knownIds: new Set(),- tasksVisible: false,- });- assert.equal(sessionDockState(afterBadge.view, SESSION).chosenTab, "todo");+ assert.equal(sessionDockState(chosen, SESSION).chosenTab, "todo");});test("the remember-chosen tab wins while its side has content", () => {@@ -120,81 +104,6 @@ test("one populated side renders alone, so the tab list is not rendered", () =>assert.equal(sides.hasTodo && sides.hasTasks, false);});-test("a collapsed container never counts as looking at the tasks panel", () => {- const sides = { hasTodo: true, hasTasks: true, runningTasks: 2, inProgressTodos: 0 };- const open = { ...EMPTY_SESSION_DOCK, collapsed: false };- assert.equal(tasksPanelVisible(open, sides), true);- assert.equal(tasksPanelVisible(EMPTY_SESSION_DOCK, sides), false);- // The todo panel on screen is not the tasks panel either.- const onTodo = { ...open, chosenTab: "todo" };- assert.equal(tasksPanelVisible(onTodo, sides), false);-});--test("the render rule and the badge rule share one tab decision", () => {- // Both read `resolveDockTabFor`, so they cannot disagree about which panel is- // on screen. This is the invariant the old duplicated call broke.- const sides = { hasTodo: true, hasTasks: true, runningTasks: 1, inProgressTodos: 1 };- const state = { ...EMPTY_SESSION_DOCK, collapsed: false };- assert.equal(resolveDockTabFor(state, sides), "tasks");- assert.equal(tasksPanelVisible(state, sides), true);-});--test("a new task raises the badge only while the tasks panel is not on screen", () => {- const seen = new Set();- const raised = observeSessionTasks(EMPTY_DOCK_VIEW, SESSION, [task("a"), task("b")], {- knownIds: seen,- tasksVisible: false,- });- assert.equal(sessionDockState(raised.view, SESSION).newCount, 2);- assert.deepEqual([...raised.knownIds].sort(), ["a", "b"]);-- const quiet = observeSessionTasks(EMPTY_DOCK_VIEW, SESSION, [task("a")], {- knownIds: new Set(),- tasksVisible: true,- });- assert.equal(sessionDockState(quiet.view, SESSION).newCount, 0);-});--test("the same snapshot re-read does not count a task twice", () => {- const first = observeSessionTasks(EMPTY_DOCK_VIEW, SESSION, [task("a")], {- knownIds: new Set(),- tasksVisible: false,- });- assert.equal(sessionDockState(first.view, SESSION).newCount, 1);-- const again = observeSessionTasks(first.view, SESSION, [task("a")], {- knownIds: first.knownIds,- tasksVisible: false,- });- assert.equal(sessionDockState(again.view, SESSION).newCount, 1);-});--test("a task that is already finished is not new work", () => {- const finished = observeSessionTasks(EMPTY_DOCK_VIEW, SESSION, [task("a", "exited")], {- knownIds: new Set(),- tasksVisible: false,- });- assert.equal(sessionDockState(finished.view, SESSION).newCount, 0);-});--test("entering the tasks tab is the only clear point for the badge", () => {- const raised = observeSessionTasks(EMPTY_DOCK_VIEW, SESSION, [task("a")], {- knownIds: new Set(),- tasksVisible: false,- });- // Re-reading the list with the panel still hidden keeps the badge.- const still = observeSessionTasks(raised.view, SESSION, [task("a")], {- knownIds: raised.knownIds,- tasksVisible: false,- });- assert.equal(sessionDockState(still.view, SESSION).newCount, 1);-- const cleared = clearBadge(chooseTab(still.view, SESSION, "tasks"), SESSION);- assert.equal(sessionDockState(cleared, SESSION).newCount, 0);- // The remembered tab survives the clear.- assert.equal(sessionDockState(cleared, SESSION).chosenTab, "tasks");-});-test("collapse is one container-wide condition, both tabs share it", () => {const opened = toggleCollapsed(EMPTY_DOCK_VIEW);assert.equal(opened.collapsed, false);diff --git a/apps/desktop/test/background-tasks.test.mjs b/apps/desktop/test/background-tasks.test.mjsindex 98533a02c..532c0ebf9 100644--- a/apps/desktop/test/background-tasks.test.mjs+++ b/apps/desktop/test/background-tasks.test.mjs@@ -144,32 +144,32 @@ test("the running/stopped/failed/exited labels are translated", () => {assert.match(i18nEn, /backgroundTasks: \{[^}]*running: "Running"/);});-test("the container shows only live work: a finished row expires and can be removed", async () => {+test("the container shows only live work: a finished row leaves as soon as it ends", async () => {const visibility = await readFile(new URL("../src/features/chat/background-tasks/bar-visibility.ts", import.meta.url),"utf8",);- // The grace window is a named constant, not a magic number in the component.- assert.match(visibility, /export const ENDED_VISIBLE_MS = 10_000;/);- assert.match(controller, /selectVisibleTasks\(visibility, sessionTasks, clock, expandedId\)/);- assert.match(controller, /observeTasks\(current, result\.tasks, observedAt\)/);+ // Live means running, or a continuation decision still pending; the row+ // being read is the only ended row that stays (#2632).+ assert.match(visibility, /task\.state === "running"/);+ assert.match(visibility, /task\.continuation === "pending"/);+ assert.match(visibility, /task\.id === pinnedId/);+ assert.match(controller, /selectVisibleTasks\(sessionTasks, expandedId\)/);// Removal is refused for a live task in the state layer, not just by hiding// the control.- assert.match(visibility, /task\.state === "running" \|\| task\.continuation === "pending"\) return state;/);assert.match(controller, /if \(!task \|\| task\.state === "running" \|\| task\.continuation === "pending"\)/);- assert.match(controller, /dismissTask\(current, task\)/);// A finished row offers removal instead of stopping.assert.match(bar, /\{t\("backgroundTasks\.dismiss"\)\}/);assert.match(bar, /onClick=\{\(\) => onRemove\(task\.id\)\}/);});-test("the container filters to the active session and badges new work", () => {+test("the container filters to the active session and badges its running work", () => {assert.match(controller, /task\.sessionId === sessionId/);// The wire contract stays session-agnostic.assert.match(controller, /api\.backgroundTasksList\(\)/);- // The badge clears only when the user enters the tasks tab.- assert.match(controller, /const openTasksTab = useCallback/);- assert.match(controller, /clearBadge\(selectTab\(current, sessionId, "tasks"\), sessionId\)/);+ // The badge is the running-row count, derived from the rows — never view+ // state a tab click can clear (#2632).+ assert.match(controller, /const badge = sides\.runningTasks/);});test("deleting a session signals its tasks from the shared cleanup path only", () => {diff --git a/apps/desktop/test/helpers/background-tasks-hook.stub.ts b/apps/desktop/test/helpers/background-tasks-hook.stub.tsindex 60c7f6480..875a9ebfa 100644--- a/apps/desktop/test/helpers/background-tasks-hook.stub.ts+++ b/apps/desktop/test/helpers/background-tasks-hook.stub.ts@@ -7,9 +7,8 @@ import type { BackgroundTaskOutput, BackgroundTaskSummary } from "../../src/lib/* static render, so the test installs the two lists the hook keeps apart:* `tasks` are the rows the container may render, `sessionTasks` are every* registry entry the host still lists for the session — including finished- * tasks it keeps as history after their grace window closed. Keeping both in- * the fixture is the point: the rendered container must answer only to- * `tasks`.+ * tasks it keeps as history after their rows left. Keeping both in the fixture+ * is the point: the rendered container must answer only to `tasks`.*/export type DockFixture = {tasks: BackgroundTaskSummary[];diff --git a/docs/spec/03-runtime/03-tools-and-permissions.md b/docs/spec/03-runtime/03-tools-and-permissions.mdindex 17cfab20a..f071176fb 100644--- a/docs/spec/03-runtime/03-tools-and-permissions.md+++ b/docs/spec/03-runtime/03-tools-and-permissions.md@@ -685,23 +685,25 @@ Host execution baseline:remembered tab whose side has become empty falls back to the other side. Thecontainer gates on an active session that allows local tools, the samecondition the todo dock already used.-- **A newly started task never steals the tab.** While the tasks panel is not the- one on screen, new tasks raise a count badge on its tab; entering that tab- clears the badge. Clicking a tab while collapsed also expands the container,- because otherwise the click would appear to do nothing.-- A finished background task is not permanent furniture. Its row lives for a- 10-second grace window after the renderer observed the task end, so the exit- code stays readable, then it leaves the container. A task that had already- finished when the renderer first loaded is registry history and never appears.- An open output preview pins its row so a log being read cannot vanish- underneath it.+- **A newly started task never steals the tab.** The tasks tab carries a count+ badge that mirrors the session's live work: it rises when a task starts and+ falls as tasks end, hiding at zero; entering a tab, collapsing the container,+ or switching to Todo never changes it (#2632). Clicking a tab while collapsed+ also expands the container, because otherwise the click would appear to do+ nothing.+- A finished background task leaves the container as soon as its end state+ arrives: the badge falls and the row goes, with no post-exit grace window.+ Only the row whose output preview is open stays on screen, so a log being read+ cannot vanish underneath it (#2632). A task that had already finished when+ the renderer first loaded is registry history and never appears.- **Removal is a view action with a live-task guard.** Only a terminal task- (`exited`, `failed`, `stopped`) can be removed; a running task — including one- already sent a stop signal, which stays `running` until the supervisor settles- it — refuses removal in the state layer, not merely by hiding the control. The- host task, its output, and its id are untouched, so the record stays readable- by id until the host's own retention drops it. Removal is remembered per- session and is not persisted.+ (`exited`, `failed`, `stopped`) can be removed — in practice the expanded row+ of a task that just ended, the only ended row the container still shows; a+ running task — including one already sent a stop signal, which stays+ `running` until the supervisor settles it — refuses removal in the state+ layer, not merely by hiding the control. Removing the row closes the open+ preview. The host task, its output, and its id are untouched, so the record+ stays readable by id until the host's own retention drops it.- **Deleting a session stops its running background tasks.** Archiving does not:archiving is a reversible marker, so killing its processes would be adestructive side effect. Deletion signals stop and returns — the deletion doesdiff --git a/docs/spec/04-ux/09-interaction-patterns.md b/docs/spec/04-ux/09-interaction-patterns.mdindex 1160ce260..8f7af7a1f 100644--- a/docs/spec/04-ux/09-interaction-patterns.md+++ b/docs/spec/04-ux/09-interaction-patterns.md@@ -2065,4 +2065,4 @@ command is visible as soon as the row expands, even when output is empty.## Background completion continuation-Agent behavior → Execution offers a default-off “Continue after background jobs” switch. Enabling it permits the assistant to arrange follow-up using the current permission mode, without separate per-job approval. The task dock labels running intents “Continue when finished” and finished intents “Waiting to resume”. Pending rows survive expiry and reload and expose “Cancel continuation”; they cannot be dismissed while still pending. Cancellation withdraws only continuation, leaving the process and log accessible. Other states distinguish started, received, cancelled and failed. Completion never switches the active conversation or steals focus.+Agent behavior → Execution offers a default-off “Continue after background jobs” switch. Enabling it permits the assistant to arrange follow-up using the current permission mode, without separate per-job approval. The task dock labels running intents “Continue when finished” and finished intents “Waiting to resume”. Pending rows survive reload and expose “Cancel continuation”; they cannot be dismissed while still pending. Cancellation withdraws only continuation, leaving the process and log accessible. Other states distinguish started, received, cancelled and failed. Completion never switches the active conversation or steals focus.diff --git a/docs/spec/06-delivery/e2e/tools-and-workspace.md b/docs/spec/06-delivery/e2e/tools-and-workspace.mdindex 324106caa..1cae3b9a6 100644--- a/docs/spec/06-delivery/e2e/tools-and-workspace.md+++ b/docs/spec/06-delivery/e2e/tools-and-workspace.md@@ -1271,8 +1271,10 @@ journeys cover successful reads, saves and directory browsing.The task header stays on one line. The expanded row shows the completecommand above the output, preserving whitespace and wrapping to fit evenbefore the task produces any output.- An ended task keeps its row only for a short grace window and can be closed- from the bar, so finished commands do not accumulate above the composer.+ An ended task's row leaves the bar as soon as its end state arrives — only+ the row whose output preview is open stays — and the tab badge falls with+ the running count, so finished commands do not accumulate above the+ composer (#2632).- **Specs linked**: `03-runtime/03-tools-and-permissions.md` (§5),`03-runtime/06-host-rpc-protocol.md` (§4)- **Acceptance criterion**: C, E, F@@ -1285,9 +1287,9 @@ journeys cover successful reads, saves and directory browsing.and 390px widths. Host tests cover exit-before-drain and shutdown under outputlock contention. The full agent-to-Desktop journey and an 83-minute paced100,000-line soak remain manual; the automated volume test is accelerated.- Renderer visibility (grace window, close action, pinned output preview) is- covered by `apps/desktop/test/background-tasks-bar-visibility.test.mjs` with a- controlled clock; the multi-second hand-off itself is not timed in Electron.)+ Renderer visibility (live rows, close action, pinned output preview) is+ covered by `apps/desktop/test/background-tasks-bar-visibility.test.mjs`; the+ multi-second hand-off itself is not timed in Electron.)## E2E-REVIEW-append-state: Rolling back a historical tool card does not rewrite its sessiondiff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.tsindex 417981a9a..e35fb98c1 100644--- a/packages/i18n/src/locales/de/index.ts+++ b/packages/i18n/src/locales/de/index.ts@@ -836,7 +836,6 @@ export const de = {title: "Aufgaben",tabTodo: "To-do",tabTasks: "Hintergrundaufgaben",- newTasks: "{{count}} neue Aufgaben",runningCount: "{{count}} laufen",expand: "{{label}} ausklappen",collapse: "{{label}} einklappen",diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.tsindex ef1ac0a40..8aa0c9a5b 100644--- a/packages/i18n/src/locales/en/index.ts+++ b/packages/i18n/src/locales/en/index.ts@@ -848,7 +848,6 @@ deleteRunningSessionBlocked: "Stop the running session before deleting it.",title: "Todo and background tasks",tabTodo: "Todo",tabTasks: "Background tasks",- newTasks: "{{count}} new tasks",runningCount: "{{count}} running",expand: "Expand {{label}}",collapse: "Collapse {{label}}",diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.tsindex bb637eccb..ebcbc1442 100644--- a/packages/i18n/src/locales/es/index.ts+++ b/packages/i18n/src/locales/es/index.ts@@ -836,7 +836,6 @@ export const es = {title: "Pendientes y tareas en segundo plano",tabTodo: "Pendientes",tabTasks: "Tareas en segundo plano",- newTasks: "{{count}} tareas nuevas",runningCount: "{{count}} en ejecución",expand: "Expandir {{label}}",collapse: "Contraer {{label}}",diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.tsindex 5e35f7b6c..e99047837 100644--- a/packages/i18n/src/locales/fr/index.ts+++ b/packages/i18n/src/locales/fr/index.ts@@ -836,7 +836,6 @@ export const fr = {title: "À faire et tâches en arrière-plan",tabTodo: "À faire",tabTasks: "Tâches en arrière-plan",- newTasks: "{{count}} nouvelles tâches",runningCount: "{{count}} en cours",expand: "Développer {{label}}",collapse: "Réduire {{label}}",diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.tsindex 572896ff0..4536cac20 100644--- a/packages/i18n/src/locales/ko/index.ts+++ b/packages/i18n/src/locales/ko/index.ts@@ -845,7 +845,6 @@ export const ko = {title: "할 일 및 백그라운드 작업",tabTodo: "할 일",tabTasks: "백그라운드 작업",- newTasks: "새 작업 {{count}}개",runningCount: "{{count}}개 실행 중",expand: "{{label}} 펼치기",collapse: "{{label}} 접기",diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.tsindex 88ef2c335..ef62c6787 100644--- a/packages/i18n/src/locales/pt-BR/index.ts+++ b/packages/i18n/src/locales/pt-BR/index.ts@@ -835,7 +835,6 @@ export const ptBR = {title: "Pendências e tarefas em segundo plano",tabTodo: "Pendências",tabTasks: "Tarefas em segundo plano",- newTasks: "{{count}} tarefas novas",runningCount: "{{count}} em execução",expand: "Expandir {{label}}",collapse: "Recolher {{label}}",diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.tsindex ec98ffa74..b36cc6816 100644--- a/packages/i18n/src/locales/tr/index.ts+++ b/packages/i18n/src/locales/tr/index.ts@@ -845,7 +845,6 @@ export const tr = {title: "Yapılacaklar ve arka plan görevleri",tabTodo: "Yapılacaklar",tabTasks: "Arka plan görevleri",- newTasks: "{{count}} yeni görev",runningCount: "{{count}} çalışıyor",expand: "{{label}} genişlet",collapse: "{{label}} daralt",diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.tsindex 3325ba8d4..358951f70 100644--- a/packages/i18n/src/locales/zh-CN/index.ts+++ b/packages/i18n/src/locales/zh-CN/index.ts@@ -841,7 +841,6 @@ deleteRunningSessionBlocked: "请先停止运行中的会话,再删除它。",title: "待办与后台任务",tabTodo: "待办",tabTasks: "后台任务",- newTasks: "{{count}} 个新任务",runningCount: "{{count}} 个运行中",expand: "展开{{label}}",collapse: "收起{{label}}",diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.tsindex 2a12b8e10..4cf066c29 100644--- a/packages/i18n/src/locales/zh-TW/index.ts+++ b/packages/i18n/src/locales/zh-TW/index.ts@@ -841,7 +841,6 @@ deleteRunningSessionBlocked: "請先停止執行中的會話,再刪除它。",title: "待辦與背景任務",tabTodo: "待辦",tabTasks: "背景任務",- newTasks: "{{count}} 個新任務",runningCount: "{{count}} 個執行中",expand: "展開{{label}}",collapse: "收合{{label}}",