ashb commented on code in PR #74806:
URL: https://github.com/apache/airflow/pull/74806#discussion_r4287320353


##########
airflow-core/src/airflow/ui/src/pages/GroupTaskInstance/useLoopOutcomeStats.tsx:
##########
@@ -42,13 +42,23 @@ export const useLoopOutcomeStats = ({
     return [];
   }
 
+  // A running loop's newest pass has not decided yet, so an older pass's 
reason would misdescribe it.
+  const finalReason = summary.status === "running" ? undefined : 
summary.iterations.at(-1)?.decision_reason;
+
   return [
     {
       label: translate("loop.outcome"),
       value: (
-        <Text color={summary.status === "failed" ? "fg.error" : undefined}>
-          {reasonSentence(translate, summary)}
-        </Text>
+        <>
+          <Text color={summary.status === "failed" ? "fg.error" : undefined}>
+            {reasonSentence(translate, summary)}
+          </Text>
+          {finalReason === undefined ? undefined : (
+            <Text color="fg.muted" maxWidth="md" overflowWrap="anywhere" 
whiteSpace="pre-line">
+              {finalReason}

Review Comment:
   <img width="1262" height="759" alt="compare-1-loop-page" 
src="https://github.com/user-attachments/assets/0ff515e6-f015-471e-8563-868d589c2e03";
 />
   
   WDYT of this @bbovenzi ?



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