Skip to content

feat: Update flows - #4275

Merged
michaeljguarino merged 23 commits into
masterfrom
marcin/prod-5178-update-flow-to-to-have-a-list-and-card-view
Sep 11, 2026
Merged

feat: Update flows#4275
michaeljguarino merged 23 commits into
masterfrom
marcin/prod-5178-update-flow-to-to-have-a-list-and-card-view

Conversation

@maciaszczykm

@maciaszczykm maciaszczykm commented Sep 9, 2026

Copy link
Copy Markdown
Member
  • Update flow to have a list and card view (fixes PROD-5178)
  • Add metrics to flow cards (fixes PROD-5179)

Designs: https://www.figma.com/design/Kn0s2plNxcvpPrlau72z1v/💻-Console?node-id=20927-41928&t=xIynygr3OxqN6csg-0

Test Plan

Test environment: https://console.your-env.onplural.sh/

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

@linear

linear Bot commented Sep 9, 2026

Copy link
Copy Markdown

PROD-5178

PROD-5179

@soffi-ai

soffi-ai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Soffi AI Summary

This PR enhances the Flows section of the Console UI with richer list and card views, plus surface-level metrics for each flow. The motivation (PROD-5178, PROD-5179) was to give operators a faster, more informative overview of their flows without navigating into each one individually.

What changed and why:

  • List + card views for Flows (PROD-5178): The Flows page now supports two display modes — a card view and a tabular list view — with sortable columns, status filtering, and a favoriting mechanism (persisted via favoriteIds). A new FlowSort enum (NAME, SERVICE_COUNT, FAVORITED) and SortDirection were added to the GraphQL API and threaded through the frontend.
  • Metrics on Flow cards (PROD-5179): Each Flow now exposes aggregated counters (serviceCount, componentCount, alertCount, pipelineCount, pendingPipelineCount) and status roll-ups (serviceStatuses, componentStatuses) directly on the GraphQL type. These are resolved efficiently via new DataLoader-backed resolvers on the Elixir server, avoiding N+1 queries. A new flowServiceCounts root query also allows bulk status aggregation across flows.
  • Flow actions menu: A dedicated FlowActionsMenu component consolidates per-flow actions (previously scattered) into a consistent "more" menu on both the card and list row.
  • Health visualization: A new flowHealth.tsx module renders service/component status breakdowns (with tests) as compact status chips on cards and list rows.
  • Workbench Issues panel refactor: The WorkbenchIssuesDisplayPanel was significantly simplified by extracting a generic DisplayPanel utility component, reducing duplication. The IssueSortDirection enum was unified into the new shared SortDirection enum.
  • DataLoader cursor rules: Added .cursor/rules/graphql-dataloaders.mdc and .cursor/rules/ecto-queries-in-schema.mdc to guide future contributors toward efficient resolver patterns.

Updated: 2026-09-11 16:48 UTC

Deploy in Soffi

@maciaszczykm maciaszczykm added enhancement New feature or request frontend Changes related to the frontend labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@maciaszczykm maciaszczykm changed the title feat: Update flow to to have a list and card view feat: Update flows Sep 9, 2026
@maciaszczykm

Copy link
Copy Markdown
Member Author

@greptileai

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR is not yet safe to merge because flows with pending gates display the pending-gate count instead of the total pipeline metric.

Findings

  1. P1 Pipeline Total Disappears

Summary

  • Adds flow summary counts for services, components, alerts, pipelines, health states, and insights across the GraphQL contract.
  • Introduces list/card presentation controls, persisted preferences, health filters, favorites, and metric navigation.
  • Refactors shared display-panel and AI-insight UI used by flows and workbenches.
  • Keeps generated GraphQL clients and persisted queries aligned with the schema and operation changes.

Reviews (3) · Last reviewed commit: "fix empty state"

Comment thread js/console/src/components/flows/flowsDisplay.ts Outdated
Comment thread js/console/src/components/flows/Flows.tsx Outdated
Comment thread js/console/src/graph/flow.graphql Outdated
@maciaszczykm

Copy link
Copy Markdown
Member Author

@greptileai

@maciaszczykm
maciaszczykm marked this pull request as ready for review September 10, 2026 14:09
@maciaszczykm
maciaszczykm requested a review from a team as a code owner September 10, 2026 14:09
@maciaszczykm
maciaszczykm requested a review from a team as a code owner September 10, 2026 14:09
Comment on lines +218 to +230
{pending && (
<PipelineStatusSC $tone="pending">
{pendingCount} pending
</PipelineStatusSC>
)}
{stopped && (
<PipelineStatusSC $tone="stopped">
{stoppedCount} stopped
</PipelineStatusSC>
)}
{!pending &&
!stopped &&
`${pipelineCount} ${pluralize('pipeline', pipelineCount)}`}

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.

P1 Pipeline Total Disappears

When a flow has any pending pipeline gate, this branch shows only the pending-gate count and hides the total pipeline count. These values represent different metrics, so a flow with five pipelines and one pending gate appears as only “1 pending,” omitting the primary Pipelines total from both cards and table rows.

Comment thread lib/console/graphql/resolvers/deployments/flow.ex Outdated
Comment thread lib/console/graphql/resolvers/deployments/flow.ex Outdated
Comment thread lib/console/graphql/deployments/flow.ex Outdated
@maciaszczykm

Copy link
Copy Markdown
Member Author

@michaeljguarino Done, I have added new rules for the agent to avoid these issues in the future. PTAL.

end)
end

defp put_insights(map, ids) do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think we should not sideload insights here that's just wasted db cycles esp since you can infer one from service statuses

@michaeljguarino

Copy link
Copy Markdown
Member

plural finish this (and remove the insights sideloads from frontend as well based on comment)

@michaeljguarino
michaeljguarino merged commit 30bc779 into master Sep 11, 2026
80 of 81 checks passed
@michaeljguarino
michaeljguarino deleted the marcin/prod-5178-update-flow-to-to-have-a-list-and-card-view branch September 11, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend Changes related to the frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants