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

vatsrahul1001 pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-4-test by this push:
     new 79a3a5637a5 [v3-4-test] Show the filtered task count in the Dag Tasks 
tab heading (#75448) (#75490)
79a3a5637a5 is described below

commit 79a3a5637a5a5a168768e7437132b4739f9b83d6
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Oct 24 14:35:04 2026 +0000

    [v3-4-test] Show the filtered task count in the Dag Tasks tab heading 
(#75448) (#75490)
    
    The Tasks tab filters the task list client-side (operator, trigger rule,
    retries, mapped, name search) but passed the API's total_entries to the
    DataTable heading, so the heading kept reporting the unfiltered count
    ("12 Tasks") even when a search narrowed the list to a single task.
    Pass the filtered list's length instead, as Configs.tsx already does for
    its client-built list, and assert the count in the existing filter tests.
    (cherry picked from commit 99bdeabe3db437997d8d3c16353217fdaa350761)
    
    Co-authored-by: 김난희 <[email protected]>
    Co-authored-by: Claude Fable 5.1 <[email protected]>
---
 airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.test.tsx | 3 +++
 airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx      | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.test.tsx 
b/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.test.tsx
index 897e1e831fb..5b3070c7930 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.test.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.test.tsx
@@ -74,6 +74,7 @@ const renderTasks = async () => {
   );
 
   await waitFor(() => expect(getTaskNames()).toEqual(["extract", "transform", 
"load"]));
+  expect(screen.getByRole("heading")).toHaveTextContent("3 common:task");
 };
 
 const selectOption = async (filterTestId: string, option: string) => {
@@ -97,6 +98,7 @@ describe("Dag tasks filters", () => {
       await selectOption(filterTestId, option);
 
       await waitFor(() => expect(getTaskNames()).toEqual(expected));
+      
expect(screen.getByRole("heading")).toHaveTextContent(`${expected.length} 
common:task`);
     },
   );
 
@@ -106,5 +108,6 @@ describe("Dag tasks filters", () => {
     fireEvent.change(screen.getByPlaceholderText("searchTasks"), { target: { 
value: "trans" } });
 
     await waitFor(() => expect(getTaskNames()).toEqual(["transform"]));
+    expect(screen.getByRole("heading")).toHaveTextContent("1 common:task");
   });
 });
diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx 
b/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx
index 6b64835458b..dd67ec0f833 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx
@@ -139,7 +139,7 @@ export const Tasks = () => {
         filterActions={<TaskFilters tasksData={data} />}
         isLoading={isLoading}
         modelName="common:task"
-        total={data ? data.total_entries : 0}
+        total={filteredTasks.length}
       />
     </>
   );

Reply via email to