amoghrajesh commented on code in PR #73030:
URL: https://github.com/apache/airflow/pull/73030#discussion_r4093290587


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -115,6 +122,48 @@ export const Details = () => {
     return translate("common:none", { defaultValue: "None" });
   };
 
+  const stateReasonSummary = ((): StateReasonSummary | undefined => {
+    const reason = taskInstance?.state_reason;
+
+    if (
+      reason === null ||
+      reason === undefined ||
+      taskInstance === undefined ||
+      !STATES_WITH_REASON.includes(taskInstance.state ?? "")

Review Comment:
   You're right, and my comment claiming both surfaces keyed off it was wrong. 
Confirmed both your mutations: widening the list only failed the row test, and 
deleting the includes clause from the banner left all 11 green. Dead code.
   
   Took your suggestion and one as const record keyed by state holding {status, 
titleKey}, driving the banner and the row through the same lookup. A new state 
has to bring a title or it doesn't compile, and the duplicated predicate is 
gone.



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