Skip to content

Commit 0bfd292

Browse files
committed
fix(code): do not re-sort on task click
1 parent c26f424 commit 0bfd292

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

apps/code/src/renderer/features/sessions/hooks/useSessionCallbacks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ export function useSessionCallbacks({
5252

5353
try {
5454
markAsViewed(taskId);
55+
markActivity(taskId);
5556
const result = await getSessionService().sendPrompt(taskId, text);
5657
log.info("Prompt completed", { stopReason: result.stopReason });
57-
markActivity(taskId);
5858

5959
const view = useNavigationStore.getState().view;
6060
const isViewingTask =

apps/code/src/renderer/features/sessions/hooks/useSessionConnection.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useTaskViewed } from "@features/sidebar/hooks/useTaskViewed";
21
import { useConnectivity } from "@hooks/useConnectivity";
32
import { trpcClient } from "@renderer/trpc/client";
43
import type { Task } from "@shared/types";
@@ -31,7 +30,6 @@ export function useSessionConnection({
3130
isSuspended,
3231
}: UseSessionConnectionOptions) {
3332
const queryClient = useQueryClient();
34-
const { markActivity } = useTaskViewed();
3533
const { isOnline } = useConnectivity();
3634

3735
useChatTitleGenerator(taskId);
@@ -98,8 +96,6 @@ export function useSessionConnection({
9896
sessionStatus: session?.status ?? "none",
9997
});
10098

101-
markActivity(task.id);
102-
10399
getSessionService()
104100
.connectToTask({
105101
task,
@@ -112,16 +108,7 @@ export function useSessionConnection({
112108
return () => {
113109
connectingTasks.delete(taskId);
114110
};
115-
}, [
116-
task,
117-
taskId,
118-
repoPath,
119-
session,
120-
markActivity,
121-
isOnline,
122-
isCloud,
123-
isSuspended,
124-
]);
111+
}, [task, taskId, repoPath, session, isOnline, isCloud, isSuspended]);
125112

126113
const cannotConnect = !repoPath && !isCloud;
127114
useEffect(() => {

0 commit comments

Comments
 (0)