RoyLee1224 commented on code in PR #58881:
URL: https://github.com/apache/airflow/pull/58881#discussion_r2594221748


##########
airflow-core/src/airflow/ui/src/utils/links.ts:
##########
@@ -17,7 +17,22 @@
  * under the License.
  */
 import type { TaskInstanceResponse } from "openapi/requests/types.gen";
-import { taskInstanceRoutes } from "src/router";
+
+const DAG_RUN_ROUTES = ["required_actions", "asset_events", "events", "code", 
"details"] as const;
+const TASK_ROUTES = ["task_instances", "required_actions", "events"] as const;
+const TASK_INSTANCE_ROUTES = [
+  "required_actions",
+  "rendered_templates",
+  "xcom",
+  "asset_events",
+  "events",
+  "code",
+  "details",
+] as const;

Review Comment:
   Agree, but I'm concerned about circular dependencies:
   
   `router.tsx`
     → imports page components
       → pages import from `links.ts`
         → if `links.ts` imports from `router.tsx`
           → circular dependency
   
   Would we need to extract route constants to a separate file (e.g., 
`src/constants/subRoutes.ts`) that both `router.tsx` and `links.ts` can import? 
Not sure if there there is a better approach.



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