Skip to content

feat(aci): Add sort param to workflow group history endpoint#116031

Merged
malwilley merged 3 commits into
masterfrom
malwilley/history-table-sorting
May 26, 2026
Merged

feat(aci): Add sort param to workflow group history endpoint#116031
malwilley merged 3 commits into
masterfrom
malwilley/history-table-sorting

Conversation

@malwilley
Copy link
Copy Markdown
Member

Ref ISWF-2607

This endpoint change will address the feedback we've gotten that alert triggers are more useful when sorted by recent triggers rather than largest count.

Adds a sort query parameter to the group-history endpoint so that the frontend can modify the sorts. This also changes the default sort to ('-last_triggered', '-count') rather than the current ('-count', '-last_triggered').

This supports multiple sorts and ascending/descending, so the frontend can implement sortable table headers.

Accept a `sort` query parameter on the workflow group history endpoint,
supporting `lastTriggered` and `count` (with optional `-` prefix for DESC).
Multiple `sort` values are applied in order. Unknown fields return 400.

The default order is now `(-lastTriggered, -count)` so the most recently
triggered groups appear first, matching the new history table default.
@malwilley malwilley requested a review from a team as a code owner May 21, 2026 17:25
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 21, 2026

ISWF-2607

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 21, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b8296de. Configure here.

User-provided sort values like `-count` or `-lastTriggered` can tie on
many rows, leaving ordering non-deterministic. With OffsetPaginator that
means pages can skip or duplicate groups. Append `group` as a final
tiebreaker so the order is fully deterministic across pages.
@malwilley malwilley merged commit eb6c25a into master May 26, 2026
62 checks passed
@malwilley malwilley deleted the malwilley/history-table-sorting branch May 26, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants