This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new b8b95312351 Add mapped task count to graph task node (#48445)
b8b95312351 is described below

commit b8b95312351e5e1cfc9726754c86c5bf1b715b1e
Author: Brent Bovenzi <[email protected]>
AuthorDate: Fri Mar 28 09:42:59 2025 -0400

    Add mapped task count to graph task node (#48445)
---
 airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx | 1 +
 airflow-core/src/airflow/ui/src/components/TaskName.tsx       | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx 
b/airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx
index f411555b96f..657b6d51cd1 100644
--- a/airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx
+++ b/airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx
@@ -79,6 +79,7 @@ export const TaskNode = ({
           >
             <Box>
               <TaskLink
+                childCount={taskInstance?.task_count}
                 id={id}
                 isGroup={isGroup}
                 isMapped={isMapped}
diff --git a/airflow-core/src/airflow/ui/src/components/TaskName.tsx 
b/airflow-core/src/airflow/ui/src/components/TaskName.tsx
index 22aff8cd228..c909f27cbd3 100644
--- a/airflow-core/src/airflow/ui/src/components/TaskName.tsx
+++ b/airflow-core/src/airflow/ui/src/components/TaskName.tsx
@@ -23,6 +23,7 @@ import { FiArrowUpRight, FiArrowDownRight } from 
"react-icons/fi";
 import type { NodeResponse } from "openapi/requests/types.gen";
 
 export type TaskNameProps = {
+  readonly childCount?: number;
   readonly isGroup?: boolean;
   readonly isMapped?: boolean;
   readonly isOpen?: boolean;
@@ -38,6 +39,7 @@ const iconStyle: CSSProperties = {
 };
 
 export const TaskName = ({
+  childCount,
   isGroup = false,
   isMapped = false,
   isOpen = false,
@@ -59,7 +61,7 @@ export const TaskName = ({
   return (
     <Text fontSize={isZoomedOut ? "lg" : "md"} fontWeight="bold" {...rest}>
       {label}
-      {isMapped ? " [ ]" : undefined}
+      {isMapped ? ` [${childCount ?? " "}]` : undefined}
       {setupTeardownType === "setup" && <FiArrowUpRight size={isZoomedOut ? 24 
: 15} style={iconStyle} />}
       {setupTeardownType === "teardown" && (
         <FiArrowDownRight size={isZoomedOut ? 24 : 15} style={iconStyle} />

Reply via email to