Skip to content

UI: prefer active state over queued when colouring collapsed groups#67543

Open
nathadfield wants to merge 1 commit into
apache:mainfrom
king:ui-dominant-state-coloring
Open

UI: prefer active state over queued when colouring collapsed groups#67543
nathadfield wants to merge 1 commit into
apache:mainfrom
king:ui-dominant-state-coloring

Conversation

@nathadfield
Copy link
Copy Markdown
Contributor

@nathadfield nathadfield commented May 26, 2026

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 on agg_state.

This PR adds a frontend getDisplayState helper that ranks active/error states ahead of pending states, and routes the dominant colour through it across the five rendering surfaces that consume an aggregate state: the graph node (TaskNode.tsx), grid cell (GridTI.tsx), shared tooltip "State:" line, group/mapped detail-page headers, and the graph MiniMap. The helper returns null for no-status dominants so callers keep their existing no-status placeholder rather than leaking the serialized "None" key into Chakra tokens.

The graph state filter (useGraphFilteredNodes.ts) is also realigned, but to a "matches any child state" predicate rather than the dominant rendering — an operator filtering for "running" expects to find running work even when it's buried inside a fail-dominant group. 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?
  • Yes

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

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label May 26, 2026
@nathadfield nathadfield force-pushed the ui-dominant-state-coloring branch 2 times, most recently from 12bf938 to b6090b8 Compare May 26, 2026 11:30
@nathadfield nathadfield marked this pull request as ready for review May 26, 2026 11:32
@nathadfield nathadfield force-pushed the ui-dominant-state-coloring branch from a5cca5a to 950e087 Compare May 26, 2026 13:12
Copy link
Copy Markdown
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

We should update the order inSTATE_PRIORITY in parameters.py

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants