o-nikolas commented on code in PR #73726:
URL: https://github.com/apache/airflow/pull/73726#discussion_r4126230703


##########
airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLTaskInstances.tsx:
##########
@@ -150,6 +154,18 @@ const taskInstanceColumns = ({
           header: translate("common:dagId"),
         },
       ]),
+  ...(multiTeam

Review Comment:
   Same reasoning for the column: on a Dag's own tab it repeats one value on 
every row since they're guaranteed to belong to the same team within a dag.
   Nesting it inside the Dag-column branch hides both together, as `XCom.tsx` 
does,
   and keeps the test's "right after the Dag column" assertion true
   



##########
airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLTaskInstances.tsx:
##########
@@ -150,6 +154,18 @@ const taskInstanceColumns = ({
           header: translate("common:dagId"),
         },
       ]),
+  ...(multiTeam
+    ? [
+        {
+          accessorKey: "team_name",
+          cell: ({ row: { original } }: HITLRow) => (
+            <TruncatedText text={original.task_instance.team_name ?? ""} />

Review Comment:
   I think your other PRs have used `<TeamName.../>` for this, why 
TruncatedText here?



##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_hitl.py:
##########
@@ -773,6 +789,33 @@ def 
test_should_respond_200_with_existing_response_and_query(
         assert response.json()["total_entries"] == expected_ti_count
         assert len(response.json()["hitl_details"]) == expected_ti_count
 
+    @conf_vars({("core", "multi_team"): "True"})
+    @pytest.mark.usefixtures("sample_hitl_details")
+    def test_should_respond_200_filtered_by_team(
+        self,
+        test_client: TestClient,
+        session: Session,
+    ) -> None:
+        _attach_dag_to_team("hitl_dag_0", "team-hitl", session=session)
+        try:
+            response = test_client.get("/dags/~/dagRuns/~/hitlDetails", 
params={"teams": ["team-hitl"]})
+            assert response.status_code == 200
+            response_data = response.json()
+            assert response_data["total_entries"] == 1
+            assert {detail["task_instance"]["dag_id"] for detail in 
response_data["hitl_details"]} == {
+                "hitl_dag_0"
+            }

Review Comment:
    Could we also assert the team name, since that's what the new column 
displays?
     
     ```suggestion
                 }
     assert {detail["task_instance"]["team_name"] for detail in 
response_data["hitl_details"]} == {
                     "team-hitl"
                 }
     ```
     
     ---
     Drafted-by: Kiro (claude-opus-5.5); reviewed by @o-nikolas before posting
   



-- 
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