pierrejeambrun commented on code in PR #67242:
URL: https://github.com/apache/airflow/pull/67242#discussion_r3493081340


##########
airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:
##########
@@ -268,6 +305,22 @@ export const DagsList = () => {
     tagsMatchMode: selectedMatchMode,
   });
 
+  const { data: runStateCountsData, isLoading: runStateCountsLoading } = 
useDagRunStateCounts({
+    dagIds: data?.dags.map((dag) => dag.dag_id) ?? [],
+    dags: data?.dags,
+    startDate,
+  });
+  const runStateContext: RunStateCountsContext = {
+    countsByDag: Object.fromEntries(
+      (runStateCountsData?.dags ?? []).map((entry) => [entry.dag_id, 
entry.state_counts]),
+    ),
+    isLoading: runStateCountsLoading,
+    stateCountLimit: runStateCountsData?.state_count_limit,
+  };
+
+  const columns = createColumns(translate, runStateContext);
+  const cardDef = createCardDef(runStateContext);

Review Comment:
   `cardDef` is now rebuilt on every render (it used to be a module-level 
constant). Probably fine with the React Compiler, but could you confirm 
`DataTable` does not re-render off its identity?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to