Repository navigation
Description
Pre-submission checklist
- I have searched existing issues and confirmed this is not a duplicate.
- I understand that submitting a feature request does not guarantee it will be implemented.
Proposed Feature
Let users collapse related Stages into one group in the pipeline view of the UI, driven by a Stage label.
Stages in a project that carry the same value of a label (proposed key: kargo.akuity.io/stage-group) are drawn as a single node in the pipeline graph instead of one node each:
- The group node shows the group name, the number of Stages and a healthy / unhealthy / unknown summary.
- Groups are collapsed by default. An "Expand" button on the group node shows the member Stages, and a button on each member collapses the group again.
- Stages downstream of a member keep their edges, drawn from the group node while it is collapsed.
- The list view shows the same groups as collapsible rows.
- A group containing a Stage that matches the Stage search is shown expanded while searching, so search hits are never hidden.
- The set of expanded groups is saved with the other pipeline view preferences, like
stackedNodesParents.
The change is UI-only (ui/src/features/project/pipelines/). The label has no effect on reconciliation, promotion or the API, and Stages without the label behave exactly as today.
Motivation and Use Case
Some projects have many near-identical Stages: ephemeral per-developer environments, test slots, per-PR or per-branch Stages. In a project with around 50 of these, the pipeline graph becomes very wide and the Stages that matter (the long-lived ones) are hard to find, even with the Stage search. Grouping by label reduces such a project to a handful of tiles while keeping everything one click away. We have been running this patch on Kargo v1.12.4, where it turns around 50 temporary Stages into 2 tiles.
The existing "stack nodes" feature collapses Stages that share a parent, which does not help when the temporary Stages hang off different upstream Stages or none at all. An explicit label lets the owner of the Stages decide what belongs together.
Alternatives Considered
- Splitting the temporary Stages into a separate project: loses the shared Freight flow and RBAC layout, and is a heavy change just to tidy the view.
- Stage search / filtering: helps find a Stage, but does not reduce the clutter when nothing is searched.
- Grouping by an existing field such as the Stage name prefix: implicit and fragile; an explicit label is predictable and needs no new API.
I have a working implementation rebased on current main (with tests and docs) and will open a draft PR that references this issue. Happy to rework the design, for example the label key, based on maintainer feedback.
Activity
krancour commentedon Nov 25, 2026
I'll let @rpelczar be the judge of this, but I have some serious hesitation about this because it's not clear that it generalizes. I worry this will result in a graph making little to no sense when groups containing things that are unalike except for their label are collapsed.
You've not said explicitly, so I'm inferring that stages upstream from a group member also keep and edge draw to the collapsed group.
Now imagine the following: warehouse --> dev --> qa --> prod. For some reason, I've grouped dev and prod together. 😬 Nothing you've proposed says I can't.
Does the warehouse appear upstream from that group on account of being upstream from dev? If it does, it's misleading because the warehouse is not immediately upstream from the group's other member -- prod.
Does qa appear downstream from that group on account of being downstream from dev? If it does, it's misleading because qa is not downstream, at all, from the group's other member -- prod...
Or does qa actually appear upstream from that group on account of being upstream from prod? If it does, it's misleading because qa is not upstream, at all, from the group's other member -- dev.
I cannot see any way that what I've described can be depicted accurately when the group is collapsed.
Also supporting the concern that this does not generalize:
None of these are actually features of Kargo. If you have anything like this going on, you've done something else that is orchestrating the creation and deletion of Kargo resources. This leaves me worried that the feature caters to your own very narrow use case.
What would certainly help here would be screenshots or even video demonstrating how this works, and especially demonstrating how (or even if) it stands up to the example I gave.
kirosvi commentedon Nov 25, 2026
Thanks @krancour, fair point. With the original version a collapsed group took the union of its members' edges, and for
warehouse -> dev -> qa -> prodwith dev and prod in one group there's no honest way to draw that.So such a group is now just never collapsed. A group collapses only when its Stages are interchangeable in the graph:
In that case the group node's edges are exactly every member's edges, nothing approximated. Otherwise the Stages are drawn as usual and the collapse button on them is disabled, with a tooltip explaining why. The list view still groups them, since it has no edges.
Your example, dev and prod with the same group label - nothing collapses, the graph stays as is:
On generalizing: you're right that per-developer / per-PR Stages aren't a Kargo feature, I shouldn't have led with that. What the rule accepts is "many sibling Stages fed from the same place". We have that shape without any external tooling too: 39 of our Projects fan out one Stage per region (e.g.
prod -> prod-eu, prod-us), one fans out per tenant. Those are only 2 Stages each today, so here's an illustrative project with the same shape scaled to 12 regions:staging -> canaryplus twelveprod-<region>Stages. The regions collapse into one node,canarystays visible:Expanded:
The existing "stack" doesn't cover this: stacking after
stagingfolds everything downstream of it,canaryincluded, and you can't pick a subset.And a real Project from our install, live data, rendered by our internal build of the same change (same code, our own label key; people's names and the image URL blanked out). 36 per-developer Stages and 15 test slots generated by a Helm chart, next to the regular
systest -> platform-staging -> prod -> prod-eu / prod-uspath. Collapsed:With the dev group expanded, i.e. what the page looks like today:
Pushed to #8155: unit tests for your example and the other ways a group can fail the rule (members wired to each other, different upstream, different downstream), docs updated with the rule and the region example.
@rpelczar if you'd rather have this as an option of the existing stack (e.g. "stack only the children labelled X") than a separate label-driven group, happy to rework it that way.
rpelczar commentedon Dec 3, 2026
@kirosvi thanks for this proposal. As I'm working right now on some fixes and improvements in the current stacking flow, I'm going to add combined healthy status info. I hope this solves the issue.