UI: prefer active state over queued when colouring collapsed groups#67543
Open
nathadfield wants to merge 2 commits into
Open
UI: prefer active state over queued when colouring collapsed groups#67543nathadfield wants to merge 2 commits into
nathadfield wants to merge 2 commits into
Conversation
12bf938 to
b6090b8
Compare
a5cca5a to
950e087
Compare
bbovenzi
requested changes
May 26, 2026
Contributor
bbovenzi
left a comment
There was a problem hiding this comment.
We should update the order inSTATE_PRIORITY in parameters.py
950e087 to
a456039
Compare
Contributor
Author
Good call @bbovenzi. A backend fix is much cleaner. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collapsed task groups and mapped tasks in the graph and grid views took their badge / border / icon colour from the backend's
agg_state(), which ranks queued/scheduled ahead of running/deferred. A group with one queued task and five running tasks rendered queued-coloured even though most of its children were actively executing. The segmented state bar from #61854 already showed the proportional mix correctly, but the surrounding visual elements stayed onagg_state.This PR reorders
state_priorityinairflow-core/src/airflow/api_fastapi/common/parameters.pyto putRUNNING/RESTARTING/DEFERREDahead ofQUEUED/SCHEDULED. The single backend list isagg_state's only consumer, so the change flows through totaskInstance.stateon the grid API response and every UI surface that reads it (graph node, grid cell, MiniMap, tooltip, detail-page headers) now reflects the most-active state without needing per-surface frontend logic. The frontendSTATE_PRIORITYconstant used bysortStateEntriesis now back in sync with the backend.The graph state filter (
useGraphFilteredNodes.ts) is also updated to a "matches any contained child state" predicate rather thantaskInstance.state. An operator filtering for "running" expects to find running work even when it's buried inside a fail-dominant collapsed group; the previous filter would have hidden those nodes. Leaf tasks still match by single state.Two pre-existing rendering bugs for the
"None"key in the segmented-bar slice and tooltip per-state breakdown are tracked at #67541 with in-code pointers at each affected site.related: #67541
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines