diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx index a815098fb..88bf0059f 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx @@ -371,9 +371,7 @@ function DashboardInner({ stats, isLoading, error }: DashboardProps) { [toggleWorkflowId] ) - useEffect(() => { - lastAnchorIndicesRef.current = lastAnchorIndices - }, [lastAnchorIndices]) + lastAnchorIndicesRef.current = lastAnchorIndices /** * Handles segment click for selecting time segments. diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx index 73b08523d..490e69a12 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx @@ -234,8 +234,7 @@ const WorkflowOutputSection = memo( ) }, - (prev, next) => - prev.output === next.output || JSON.stringify(prev.output) === JSON.stringify(next.output) + (prev, next) => prev.output === next.output ) interface LogDetailsProps { diff --git a/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx b/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx index bb3dbbefa..c7a534ef0 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx @@ -230,13 +230,19 @@ export default function Logs() { useEffect(() => { selectedLogIdRef.current = selectedLogId }, [selectedLogId]) - logsRefetchRef.current = logsQuery.refetch - activeLogRefetchRef.current = activeLogQuery.refetch - logsQueryRef.current = { - isFetching: logsQuery.isFetching, - hasNextPage: logsQuery.hasNextPage ?? false, - fetchNextPage: logsQuery.fetchNextPage, - } + useEffect(() => { + logsRefetchRef.current = logsQuery.refetch + }, [logsQuery.refetch]) + useEffect(() => { + activeLogRefetchRef.current = activeLogQuery.refetch + }, [activeLogQuery.refetch]) + useEffect(() => { + logsQueryRef.current = { + isFetching: logsQuery.isFetching, + hasNextPage: logsQuery.hasNextPage ?? false, + fetchNextPage: logsQuery.fetchNextPage, + } + }, [logsQuery.isFetching, logsQuery.hasNextPage, logsQuery.fetchNextPage]) useEffect(() => { const timers = refreshTimersRef.current