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 1e7f553598e UI: Wire advanced-search toggle for Grid Triggering User 
filter (#70567)
1e7f553598e is described below

commit 1e7f553598e572fbe5f94a8a55de58ce0cadc6e1
Author: Dheeraj Turaga <[email protected]>
AuthorDate: Tue Jul 28 16:06:12 2026 -0500

    UI: Wire advanced-search toggle for Grid Triggering User filter (#70567)
    
    The Grid endpoint accepts both the substring ``triggering_user`` and
    the index-friendly ``triggering_user_prefix`` variants, and the pill
    already exposes the substring/prefix toggle, but the Grid query hooks
    were only ever sending the substring param regardless of toggle state.
    Route the value through ``useAdvancedSearchArg`` so the toggle actually
    selects between the two variants on each request, matching the Run ID
    filter and the Dag Runs page.
---
 airflow-core/src/airflow/ui/src/queries/useGridRuns.ts      | 11 ++++++++++-
 airflow-core/src/airflow/ui/src/queries/useGridStructure.ts | 11 ++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/ui/src/queries/useGridRuns.ts 
b/airflow-core/src/airflow/ui/src/queries/useGridRuns.ts
index fe6340f08ad..9a359e6f5d6 100644
--- a/airflow-core/src/airflow/ui/src/queries/useGridRuns.ts
+++ b/airflow-core/src/airflow/ui/src/queries/useGridRuns.ts
@@ -56,6 +56,15 @@ export const useGridRuns = ({
     value: runIdPattern,
   });
 
+  // Advanced-search toggle picks between the substring ``triggeringUser`` and 
the
+  // index-friendly ``triggeringUserPrefix`` variants of the Triggering User 
filter.
+  const triggeringUserArg = useAdvancedSearchArg({
+    patternApiKey: "triggeringUser",
+    prefixApiKey: "triggeringUserPrefix",
+    storageKey: SearchParamsKeys.TRIGGERING_USER_NAME_PATTERN,
+    value: triggeringUser,
+  });
+
   const { data: GridRuns, ...rest } = useGridServiceGetGridRuns(
     {
       dagId,
@@ -67,7 +76,7 @@ export const useGridRuns = ({
       ...runIdPatternArg,
       runType: runType ? [runType] : undefined,
       state: dagRunState ? [dagRunState] : undefined,
-      triggeringUser: triggeringUser ?? undefined,
+      ...triggeringUserArg,
     },
     undefined,
     {
diff --git a/airflow-core/src/airflow/ui/src/queries/useGridStructure.ts 
b/airflow-core/src/airflow/ui/src/queries/useGridStructure.ts
index 702145b2bf5..b2fb353330a 100644
--- a/airflow-core/src/airflow/ui/src/queries/useGridStructure.ts
+++ b/airflow-core/src/airflow/ui/src/queries/useGridStructure.ts
@@ -59,6 +59,15 @@ export const useGridStructure = ({
     value: runIdPattern,
   });
 
+  // Advanced-search toggle picks between the substring ``triggeringUser`` and 
the
+  // index-friendly ``triggeringUserPrefix`` variants of the Triggering User 
filter.
+  const triggeringUserArg = useAdvancedSearchArg({
+    patternApiKey: "triggeringUser",
+    prefixApiKey: "triggeringUserPrefix",
+    storageKey: SearchParamsKeys.TRIGGERING_USER_NAME_PATTERN,
+    value: triggeringUser,
+  });
+
   // This is necessary for keepPreviousData
   const { data: dagStructure, ...rest } = useGridServiceGetDagStructure(
     {
@@ -72,7 +81,7 @@ export const useGridStructure = ({
       ...runIdPatternArg,
       runType: runType ? [runType] : undefined,
       state: dagRunState ? [dagRunState] : undefined,
-      triggeringUser: triggeringUser ?? undefined,
+      ...triggeringUserArg,
     },
     undefined,
     {

Reply via email to