Skip to content

fix(ui): enforce pagination limit on workflow-list watch stream. Fixes #16013#16017

Open
alliasgher wants to merge 1 commit intoargoproj:mainfrom
alliasgher:fix/ui-listwatch-limit
Open

fix(ui): enforce pagination limit on workflow-list watch stream. Fixes #16013#16017
alliasgher wants to merge 1 commit intoargoproj:mainfrom
alliasgher:fix/ui-listwatch-limit

Conversation

@alliasgher
Copy link
Copy Markdown
Contributor

Fixes #16013

Motivation

On the Workflow List page, the initial services.workflows.list() call respects the pagination.limit (e.g. "Results per page" = 5), but the SSE watch stream feeds every ADDED event into ListWatch.mergeItem() unbounded. As new workflows are created or the admin cluster churns, the displayed list grows past the page-size setting (5 → 12 → 30 → 50+).

Modifications

  • Add an optional limit parameter to ListWatch<T>; after each watch event, if the merged list exceeds limit, truncate to the first limit items. The list is already sorted by the caller's sorter (youngest first for workflows), so we keep the youngest N.
  • Plumb pagination.limit through from workflows-list.tsx into the ListWatch constructor.
  • Other ListWatch callers (event-flow, events-panel) are unaffected — the parameter is optional.

Verification

  • node_modules/typescript/bin/tsc --noEmit clean for the two touched files.
  • eslint --fix clean for the two touched files.

Documentation

No doc changes — this restores intended behavior on an existing, documented setting (Results per page).

AI

This PR (code and description) was drafted with Claude (Anthropic) under human review, per the Argo project Generative AI policy.

…argoproj#16013

The ListWatch initial list() call respects the pagination limit, but
the watch SSE stream appends every ADDED event unbounded, so the
workflow list grew past the 'Results per page' setting as new
workflows were created.

Add an optional limit to ListWatch and slice after each watch event
when present. Pass pagination.limit from the workflows list caller.
Other ListWatch callers are unaffected since the new parameter is
optional.

Signed-off-by: Ali <alliasgher123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): ListWatch watch stream ignores pagination limit, causing workflow list to grow beyond "results per page" setting

1 participant