diff --git a/src/renderer/src/components/activity/activity-clear-completed.ts b/src/renderer/src/components/activity/activity-clear-completed.ts index af6a86ae8a3..caa061df73e 100644 --- a/src/renderer/src/components/activity/activity-clear-completed.ts +++ b/src/renderer/src/components/activity/activity-clear-completed.ts @@ -97,13 +97,21 @@ function evictPersistedStatuses(identities: readonly AgentStatusCacheIdentity[]) } /** - * Clear a single activity thread with an undo window. + * Clear a single activity thread silently (no toast notification). */ export function clearSingleActivityThread(thread: AgentPaneThread): boolean { if (!isClearableActivityThread(thread)) { return false } - return clearCompletedActivity([thread]) + const state = useAppStore.getState() + const plan = planClearCompletedActivity([thread], state) + if (plan.clearedThreadCount === 0) { + return false + } + state.applyActivityClearedAt(plan.cutoffPatch) + state.dismissRetainedAgents(plan.retainedSnapshots.map((retained) => retained.entry.paneKey)) + evictPersistedStatuses(plan.cacheIdentities) + return true } /** diff --git a/src/renderer/src/components/activity/activity-thread-row.tsx b/src/renderer/src/components/activity/activity-thread-row.tsx index 5e563a0593d..bbc626c7af9 100644 --- a/src/renderer/src/components/activity/activity-thread-row.tsx +++ b/src/renderer/src/components/activity/activity-thread-row.tsx @@ -63,7 +63,7 @@ export const ActivityThreadRow = React.memo(function ActivityThreadRow({ aria-label={taskTitle} aria-current={selected ? 'true' : undefined} className={cn( - 'group relative flex w-full cursor-pointer flex-col gap-1.5 rounded-lg border border-transparent px-1.5 py-2.5 text-left transition-[background-color,border-color,opacity,box-shadow] duration-200 outline-none select-none worktree-sidebar-card-hover focus-visible:ring-1 focus-visible:ring-ring', + 'group relative flex w-full cursor-pointer flex-col gap-1 rounded-lg border border-transparent px-1.5 py-1.5 text-left transition-[background-color,border-color,opacity,box-shadow] duration-200 outline-none select-none worktree-sidebar-card-hover focus-visible:ring-1 focus-visible:ring-ring', selected && 'border-transparent' )} > @@ -71,7 +71,7 @@ export const ActivityThreadRow = React.memo(function ActivityThreadRow({ -
+
{/* Keep the activation target separate from markdown links and row actions. */} @@ -100,7 +99,6 @@ export const ActivityThreadRow = React.memo(function ActivityThreadRow({ compactMode ? 'line-clamp-2' : 'line-clamp-3', '[&_*]:!m-0 [&_*]:!p-0 [&_br]:hidden [&_ol]:list-none [&_ul]:list-none' )} - title={thread.responsePreview} /> ) : (
{statusLine}
diff --git a/src/renderer/src/components/activity/activity-thread-virtual-row.tsx b/src/renderer/src/components/activity/activity-thread-virtual-row.tsx index 51055657bfe..15963b8d8da 100644 --- a/src/renderer/src/components/activity/activity-thread-virtual-row.tsx +++ b/src/renderer/src/components/activity/activity-thread-virtual-row.tsx @@ -56,7 +56,7 @@ export function ActivityThreadVirtualRow({ ) } return ( -
+