bbovenzi commented on code in PR #55620:
URL: https://github.com/apache/airflow/pull/55620#discussion_r2349924937


##########
airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLTaskInstances.tsx:
##########
@@ -122,71 +127,46 @@ export const HITLTaskInstances = () => {
   const [sort] = sorting;
   const responseReceived = searchParams.get(RESPONSE_RECEIVED_PARAM);
 
+  const dagIdPattern = searchParams.get(DAG_DISPLAY_NAME_PATTERN) ?? undefined;
+  const taskIdPattern = searchParams.get(TASK_ID_PATTERN) ?? undefined;
+  const filterResponseReceived = searchParams.get(RESPONSE_RECEIVED_PARAM) ?? 
undefined;
+
+  // Use the filter value if available, otherwise fall back to the old 
responseReceived param
+  const effectiveResponseReceived = filterResponseReceived ?? responseReceived;
+
   const { data, error, isLoading } = useHumanInTheLoopServiceGetHitlDetails({
     dagId,
+    dagIdPattern,
     dagRunId: runId,
     limit: pagination.pageSize,
     offset: pagination.pageIndex * pagination.pageSize,
     orderBy: sort ? [`${sort.desc ? "-" : ""}${sort.id}`] : [],
-    responseReceived: Boolean(responseReceived) ? responseReceived === "true" 
: undefined,
-    state: responseReceived === "false" ? ["deferred"] : undefined,
+    responseReceived:
+      Boolean(effectiveResponseReceived) && effectiveResponseReceived !== "all"
+        ? effectiveResponseReceived === "true"
+        : undefined,
+    state: effectiveResponseReceived === "false" ? ["deferred"] : undefined,
     taskId,
+    taskIdPattern,
   });
 
-  const enabledOptions = createListCollection({
-    items: [
-      { label: translate("filters.response.all"), value: "all" },
-      { label: translate("filters.response.pending"), value: "false" },
-      { label: translate("filters.response.received"), value: "true" },
-    ],
-  });
-
-  const handleResponseChange = useCallback(
-    ({ value }: { value: Array<string> }) => {
-      const [val] = value;
-
-      if (val === undefined || val === "all") {
-        searchParams.delete(RESPONSE_RECEIVED_PARAM);
-      } else {
-        searchParams.set(RESPONSE_RECEIVED_PARAM, val);
-      }
-      setTableURLState({
-        pagination: { ...pagination, pageIndex: 0 },
-        sorting,
-      });
-      searchParams.delete(OFFSET_PARAM);
-      setSearchParams(searchParams);
-    },
-    [searchParams, setSearchParams, pagination, sorting, setTableURLState],
-  );
+  const handleResponseChange = useCallback(() => {
+    setTableURLState({
+      pagination: { ...pagination, pageIndex: 0 },
+      sorting,
+    });
+    searchParams.delete(OFFSET_PARAM);
+    setSearchParams(searchParams);
+  }, [pagination, searchParams, setSearchParams, setTableURLState, sorting]);
 
   return (
-    <Box>
+    <VStack align="start" gap={4}>

Review Comment:
   The filter to table gap is too large:
   
   <img width="656" height="624" alt="Screenshot 2025-09-15 at 3 36 24 PM" 
src="https://github.com/user-attachments/assets/a762d851-2142-448f-b362-6687a4778013";
 />
   



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