Skip to content

Show secondary states of mapped tasks in Grid view - #74883

Merged
bbovenzi merged 4 commits into
apache:mainfrom
kevinhongzl:ui/mapped-task-grid-colors
Oct 22, 2026
Merged

bbovenzi merged 4 commits into
apache:mainfrom
kevinhongzl:ui/mapped-task-grid-colors

Conversation

@kevinhongzl

Copy link
Copy Markdown
Contributor

closes: #37332

When a dag run times out, it's hard to spot skipped mapped tasks because the grid view still shows green if any of the TIs succeeded. Inspired by #66623, this pr displays the secondary states of mapped tasks in the grid view, making it easier to debug failed dag runs.

After

2026-10-17.00-55-47.mp4

Before

image
Was generative AI tooling used to co-author this PR?
  • Yes - Codex

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 16, 2026
@kevinhongzl
kevinhongzl force-pushed the ui/mapped-task-grid-colors branch from 67202f3 to 09d19be Compare October 16, 2026 17:17

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use a diagonal color split to indicate if a task has a note. Now a mapped task group can't have a new but I think we need a better way to indicate.

@kevinhongzl

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback @bbovenzi !

I took another look at how notes are displayed in the airflow UI and came up with two possible designs

Design 1: Stacked cards for task states

The front card shows the primary state of the mapped tasks, while the back card shows the secondary state. If all mapped tasks share the same state, the grid cell remains unstacked.

image image

Design 2: Diagonal split for task states + badge for notes

I noticed the current note indicator isn't very noticeable in dark mode, and it takes up the upper triangle just to show whether a task has a note. The space could be used to represent different combinations of task states instead.

So I was thinking we could move the note indicators to a small badge and use the diagonal split for primary and secondary states. This would also involve changing how notes are displayed, though, which is a bit outside the scope of this PR.

image image




What do you think?

@kevinhongzl
kevinhongzl force-pushed the ui/mapped-task-grid-colors branch from 09d19be to 9938ff6 Compare October 20, 2026 08:28
@bbovenzi

Copy link
Copy Markdown
Contributor

Stacked is better. It implies that there are more. Our graph view uses a stack as well. We should probably do this for task groups too then.

@kevinhongzl

Copy link
Copy Markdown
Contributor Author

Excellent. Let’s go with the stacked design. I’ll update it very soon

@kevinhongzl

Copy link
Copy Markdown
Contributor Author

Here are the updated screenshot and recording of the new design!

  1. To keep things consistent, I applied the stacked design to both single-state and mixed-state mapped tasks.
  2. I moved the outline properties to the outer Box and made mapped TI badges smaller so the outline wraps around the entire grid cell correctly.
image
2026-10-22.02-00-43.mp4

@kevinhongzl
kevinhongzl force-pushed the ui/mapped-task-grid-colors branch from 87d03a0 to 1c05251 Compare October 21, 2026 18:25
@kevinhongzl
kevinhongzl requested a review from bbovenzi October 21, 2026 18:46
@bbovenzi

Copy link
Copy Markdown
Contributor

Looks good. Let me play around with it locally

@bbovenzi bbovenzi added the backport-to-v3-4-test Backport to v3-4-test label Oct 22, 2026
@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Oct 22, 2026

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected. Would you mind opening another PR to do the same for task groups?

@kevinhongzl

Copy link
Copy Markdown
Contributor Author

Sure. I'll create another PR for task groups :)

@bbovenzi
bbovenzi merged commit c01a68c into apache:main Oct 22, 2026
78 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 22, 2026
…e#74883)

* Show mixed states for mapped tasks in the Grid view

* Clarify the intent of Grid task cell tests

* Show mapped task secondary state as a stacked card in the Grid view

* Show every mapped task as a stacked card in the Grid view
(cherry picked from commit c01a68c)

Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 22, 2026
…e#74883)

* Show mixed states for mapped tasks in the Grid view

* Clarify the intent of Grid task cell tests

* Show mapped task secondary state as a stacked card in the Grid view

* Show every mapped task as a stacked card in the Grid view
(cherry picked from commit c01a68c)

Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
bbovenzi pushed a commit that referenced this pull request Oct 22, 2026
… (#75426)

* Show mixed states for mapped tasks in the Grid view

* Clarify the intent of Grid task cell tests

* Show mapped task secondary state as a stacked card in the Grid view

* Show every mapped task as a stacked card in the Grid view
(cherry picked from commit c01a68c)

Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
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. backport-to-v3-4-test Backport to v3-4-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timeout on Dynamic Task mapping : skipped inner task , task status is still success

2 participants