diff --git a/airflow/www/static/js/dag/details/taskInstance/TrySelector.tsx b/airflow/www/static/js/dag/details/taskInstance/TrySelector.tsx
index 5fc96803c85de..31d894fcaaa42 100644
--- a/airflow/www/static/js/dag/details/taskInstance/TrySelector.tsx
+++ b/airflow/www/static/js/dag/details/taskInstance/TrySelector.tsx
@@ -61,63 +61,10 @@ const TrySelector = ({
const logAttemptDropdownLimit = 10;
const showDropdown = finalTryNumber > logAttemptDropdownLimit;
- const tries = (tiHistory?.taskInstances || []).filter(
- (t) => t?.startDate !== taskInstance?.startDate
- );
- tries?.push(taskInstance);
-
return (
Task Tries
- {!showDropdown && (
-
- {/* Even without try history showing up we should still show all try numbers */}
- {Array.from({ length: finalTryNumber }, (_, i) => i + 1).map(
- (tryNumber, i) => {
- let attempt;
- if (tries.length) {
- attempt = tries[i];
- }
- return (
-
- Status: {attempt.state}
-
- Duration:{" "}
- {formatDuration(
- getDuration(attempt.startDate, attempt.endDate)
- )}
-
-
- )
- }
- hasArrow
- portalProps={{ containerRef }}
- placement="top"
- isDisabled={!attempt}
- >
-
-
- );
- }
- )}
-
- )}
- {showDropdown && (
+ {showDropdown ? (
+ ) : (
+
+ {tiHistory?.taskInstances?.map((ti) => (
+
+ Status: {ti.state}
+
+ Duration:{" "}
+ {formatDuration(getDuration(ti.startDate, ti.endDate))}
+
+
+ }
+ hasArrow
+ portalProps={{ containerRef }}
+ placement="top"
+ isDisabled={!ti}
+ >
+
+
+ ))}
+
)}
);