Skip to content

[v3-3-test] Stop re-rendering the whole Grid on every hover - #69928

Merged
bbovenzi merged 1 commit into
apache:v3-3-testfrom
astronomer:backport-69912
Jul 15, 2026
Merged

[v3-3-test] Stop re-rendering the whole Grid on every hover#69928
bbovenzi merged 1 commit into
apache:v3-3-testfrom
astronomer:backport-69912

Conversation

@pierrejeambrun

Copy link
Copy Markdown
Member

Backport of #69912 to v3-3-test.

Cherry-picked from ae6188d.

Two files needed manual conflict resolution due to drift on v3-3-test; in both cases I kept the v3-3-test structure and applied only this PR's hover change:

  • DetailsLayout.tsxv3-3-test has a different collapse/resize details-panel layout. Kept that layout and applied only the hover wiring: drop HoverProvider/useHover, add useGridCrosshairHover(gridHoverRootRef), attach ref={gridHoverRootRef} to the grid/gantt container, and simplify SharedScrollBox.
  • GridTI.tsx — main has a hasNote prop that isn't on v3-3-test; that prop was excluded. Applied only the hover change (remove useHover/handlers, add data-run-id/data-selected/data-task-id, drop the hovered background branch).

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

Every cell in the Dag Grid view subscribed to a shared hover context, so
hovering any cell changed the context value and re-rendered the entire grid.
On a ~20-run x 20-task grid that measured ~3 React commits plus full-grid
render work per hover — the interaction lag reported in the issue, which only
gets worse as the Dag grows.

Move the run-column / task-row crosshair highlight to a single delegated
pointerover handler that toggles CSS classes on the matching cells by
data-run-id / data-task-id, so hovering does no React render work at all. The
same delegated root covers the gantt so the shared row highlight stays in sync.
Measured on the same grid, React commits per hover dropped from ~3.0 to ~0.07.

related: apache#69531
(cherry picked from commit ae6188d)
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jul 15, 2026
@bbovenzi
bbovenzi merged commit 6f66c37 into apache:v3-3-test Jul 15, 2026
84 checks passed
@bbovenzi
bbovenzi deleted the backport-69912 branch July 15, 2026 16:02
@github-actions github-actions Bot added this to the Airflow 3.3.1 milestone Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.1 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@vatsrahul1001 vatsrahul1001 added the type:improvement Changelog: Improvements label Jul 27, 2026
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
Every cell in the Dag Grid view subscribed to a shared hover context, so
hovering any cell changed the context value and re-rendered the entire grid.
On a ~20-run x 20-task grid that measured ~3 React commits plus full-grid
render work per hover — the interaction lag reported in the issue, which only
gets worse as the Dag grows.

Move the run-column / task-row crosshair highlight to a single delegated
pointerover handler that toggles CSS classes on the matching cells by
data-run-id / data-task-id, so hovering does no React render work at all. The
same delegated root covers the gantt so the shared row highlight stays in sync.
Measured on the same grid, React commits per hover dropped from ~3.0 to ~0.07.

related: #69531
(cherry picked from commit ae6188d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. type:improvement Changelog: Improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants