File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/renderer/features/tasks/hooks Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff 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 !==
You can’t perform that action at this time.
0 commit comments