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

shahar1 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 2454e6ea826 [v3-4-test] UI: Fix operator-triggered runs showing a raw 
translation key (#77008) (#77212)
2454e6ea826 is described below

commit 2454e6ea82684f39f82375b92956df2eb5631e58
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 17 21:42:22 2026 +0000

    [v3-4-test] UI: Fix operator-triggered runs showing a raw translation key 
(#77008) (#77212)
    
    (cherry picked from commit 56bbac12ad9853865c7fff24230994643d91c168)
    
    Co-authored-by: Pushkal Gupta 
<[email protected]>
---
 .../airflow/ui/public/i18n/locales/en/common.json  |  1 +
 .../src/airflow/ui/src/i18n/locales.test.ts        | 13 +++++++++
 .../layouts/Details/Grid/RunTypeLegend.test.tsx    | 33 ++++++++++++++++++++++
 .../ui/src/layouts/Details/Grid/RunTypeLegend.tsx  |  7 +++--
 4 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json 
b/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json
index fec3ceca9a1..1a5bd74b30d 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json
@@ -256,6 +256,7 @@
     "asset_triggered": "Asset Triggered",
     "backfill": "Backfill",
     "manual": "Manual",
+    "operator_triggered": "Operator Triggered",
     "scheduled": "Scheduled"
   },
   "scroll": {
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales.test.ts 
b/airflow-core/src/airflow/ui/src/i18n/locales.test.ts
index d8b41c0d889..c5a292d0d62 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales.test.ts
+++ b/airflow-core/src/airflow/ui/src/i18n/locales.test.ts
@@ -19,6 +19,8 @@
 import { createInstance, type i18n, type Resource } from "i18next";
 import { describe, expect, it } from "vitest";
 
+import { $DagRunType } from "openapi/requests/schemas.gen";
+
 import { i18nBaseOptions } from "./config";
 
 const localeFiles: Record<string, Record<string, unknown>> = import.meta.glob(
@@ -235,3 +237,14 @@ describe("locale interpolation variables", () => {
     expect(offenders).toEqual([]);
   });
 });
+
+describe("run type labels", () => {
+  it("labels every run type the API can return", () => {
+    // These are rendered as translate(`common:runTypes.${run_type}`), which 
the static key check
+    // above cannot see, so a run type with no key reaches the user as the raw 
key text.
+    const labels = (resources.en?.common as { runTypes: Record<string, string> 
}).runTypes;
+    const unlabelled = $DagRunType.enum.filter((runType) => !(runType in 
labels));
+
+    expect(unlabelled).toEqual([]);
+  });
+});
diff --git 
a/airflow-core/src/airflow/ui/src/layouts/Details/Grid/RunTypeLegend.test.tsx 
b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/RunTypeLegend.test.tsx
new file mode 100644
index 00000000000..fb19e276453
--- /dev/null
+++ 
b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/RunTypeLegend.test.tsx
@@ -0,0 +1,33 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { describe, expect, it } from "vitest";
+
+import { $DagRunType } from "openapi/requests/schemas.gen";
+
+import { RUN_TYPE_LEGEND_ORDER } from "./RunTypeLegend";
+
+describe("RunTypeLegend", () => {
+  it("explains every run type the API can return", () => {
+    // RunTypeIcon draws an icon for each of these, so one missing from the 
legend is an icon
+    // in the grid with nothing to say what it means.
+    const missing = $DagRunType.enum.filter((runType) => 
!RUN_TYPE_LEGEND_ORDER.includes(runType));
+
+    expect(missing).toEqual([]);
+  });
+});
diff --git 
a/airflow-core/src/airflow/ui/src/layouts/Details/Grid/RunTypeLegend.tsx 
b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/RunTypeLegend.tsx
index 7ecea06118c..528aab87ea1 100644
--- a/airflow-core/src/airflow/ui/src/layouts/Details/Grid/RunTypeLegend.tsx
+++ b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/RunTypeLegend.tsx
@@ -26,9 +26,12 @@ import { Tooltip } from "src/system-components";
 
 import { RunTypeIcon } from "src/components/RunTypeIcon";
 
-const runTypes: Array<DAGRunResponse["run_type"]> = [
+// Every run type the API can return needs a row here, otherwise the grid 
shows an icon the
+// legend does not explain. RunTypeLegend.test.tsx holds this list to the 
generated enum.
+export const RUN_TYPE_LEGEND_ORDER: Array<DAGRunResponse["run_type"]> = [
   "scheduled",
   "manual",
+  "operator_triggered",
   "backfill",
   "asset_triggered",
   "asset_materialization",
@@ -44,7 +47,7 @@ export const RunTypeLegend = () => {
           <Text fontSize="xs" fontWeight="bold" mb={1}>
             {translate("dag:grid.runTypeLegend")}
           </Text>
-          {runTypes.map((runType) => (
+          {RUN_TYPE_LEGEND_ORDER.map((runType) => (
             <Flex align="center" gap={2} key={runType}>
               {/* Grid bars show no icon for scheduled runs; the spacer keeps 
the labels aligned. */}
               {runType === "scheduled" ? (

Reply via email to