diff --git a/airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx
index a1cb9d36e991c..5dd08e1bab5b9 100644
--- a/airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx
+++ b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx
@@ -62,6 +62,7 @@ type Props = {
};
const GRID_INNER_SCROLL_PADDING_START_PX = GRID_HEADER_PADDING_PX + GRID_HEADER_HEIGHT_PX;
+const ScrollbarSpacer = () => ;
export const Grid = ({
dagRunState,
@@ -189,9 +190,25 @@ export const Grid = ({
const gridHeaderAndBody = (
<>
- {/* Grid header, both bgs are needed to hide elements during horizontal and vertical scroll */}
-
-
+ {/* Grid header. minWidth stretches the header past the scrollport so its bg covers every run
+ column during horizontal scroll; the padding sits on the children so the sticky task name
+ column's bg spans the full header height and hides bars scrolled behind it. */}
+
+
{Boolean(gridRuns?.length) && (
<>
@@ -202,12 +219,13 @@ export const Grid = ({
{/* Duration bars */}
-
+
+ {!showGantt && }
{runsWithVersionFlags?.map((dr) => (
+ {!showGantt && }
{gridRuns?.map((dr: GridRunsResponse) => (