imrichardwu commented on code in PR #62195:
URL: https://github.com/apache/airflow/pull/62195#discussion_r2854701279


##########
airflow-core/src/airflow/ui/src/layouts/Details/Grid/Bar.tsx:
##########
@@ -41,10 +47,28 @@ export const Bar = ({ max, onClick, run }: Props) => {
   const isSelected = runId === run.run_id;
   const isHovered = hoveredRunId === run.run_id;
   const search = searchParams.toString();
+  const isFailed = (run.state ?? "").toLowerCase() === "failed";
+  const hasMissedDeadline = Boolean(run.has_missed_deadline);
+  const barHeightPx = max > 0 ? (run.duration / max) * BAR_HEIGHT : 0;
 
   const handleMouseEnter = () => setHoveredRunId(run.run_id);
   const handleMouseLeave = () => setHoveredRunId(undefined);
 
+  const navigate = useNavigate();
+
+  const handleFailedIconClick = () => {
+    void navigate({ pathname: `/dags/${dagId}/runs/${run.run_id}`, search });
+  };
+
+  const handleDeadlineIconClick = () => {
+    void navigate({ pathname: `/dags/${dagId}/runs/${run.run_id}/deadlines`, 
search });
+  };
+
+  // Account for minHeight and padding-bottom so icons always appear above the 
rendered bar
+  const effectiveBarHeightPx = Math.max(barHeightPx, BAR_MIN_HEIGHT_PX) + 
BAR_PADDING_BOTTOM_PX;
+  const failedIconBottom = effectiveBarHeightPx + ICON_GAP_PX;
+  const deadlineIconBottom = isFailed ? failedIconBottom + ICON_HEIGHT_PX : 
failedIconBottom;
+

Review Comment:
   Here is 2 images
   
   <img width="1507" height="709" alt="Screenshot 2026-02-25 at 11 35 38 AM" 
src="https://github.com/user-attachments/assets/17f61230-9a30-411f-b1eb-ba9b2ea13ffd";
 />
   <img width="1508" height="706" alt="Screenshot 2026-02-25 at 11 35 30 AM" 
src="https://github.com/user-attachments/assets/7c1f9d28-24f4-4d64-bae7-1fde4a313611";
 />
   



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