Skip to content

Commit 0f08b69

Browse files
committed
idk man
1 parent e0546a1 commit 0f08b69

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/renderer/features/tasks/hooks/useTaskPanelLayout.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ export const useTaskPanelLayout = ({
5353
const panelId = `task-detail-${task.id}`;
5454

5555
// Track the last values to prevent unnecessary updates
56-
const lastValuesRef = useRef({
57-
taskId: task.id,
58-
repoPath,
59-
openArtifactsStr: JSON.stringify(openArtifacts),
60-
activeArtifactId,
61-
});
56+
const lastValuesRef = useRef<{
57+
taskId: string;
58+
repoPath: string | null;
59+
openArtifactsStr: string;
60+
activeArtifactId: string | null;
61+
} | null>(null);
6262

6363
const logsContent = useMemo(
6464
() => (
@@ -137,6 +137,7 @@ export const useTaskPanelLayout = ({
137137
};
138138

139139
const hasChanged =
140+
!lastValuesRef.current ||
140141
lastValuesRef.current.taskId !== currentValues.taskId ||
141142
lastValuesRef.current.repoPath !== currentValues.repoPath ||
142143
lastValuesRef.current.openArtifactsStr !==

0 commit comments

Comments
 (0)