Skip to content

fix(agent-admin): sort session review list by creation time - #276

Merged
vmelikyan merged 1 commit into
mainfrom
fix/admin-sessions-sort-created
Oct 29, 2026
Merged

vmelikyan merged 1 commit into
mainfrom
fix/admin-sessions-sort-created

Conversation

@vmelikyan

@vmelikyan vmelikyan commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • The admin session review list (GET /api/v2/ai/admin/agent/sessions) now sorts by createdAt desc, then id desc. It used to sort by updatedAt.
  • updatedAt changes on any session row update, including background cleanup (suspend, archive, workspace status). A session could jump to the top without new activity, and rows moved between pages while an admin paged through the list.
  • createdAt does not change, and id breaks ties, so the order is total and each page stays the same. Pagination is still applied after the full sort and the repository filter.
  • The OpenAPI description states the sort order. The UI column changes to "Created" in GoodRxOSS/lifecycle-ui#99.

Verifying Changes

  • AdminService.test.ts asserts the createdAt desc, id desc order.
  • jest for AdminService and the admin sessions route (22 tests), eslint and prettier pass.

@vmelikyan
vmelikyan marked this pull request as ready for review October 29, 2026 03:37
@vmelikyan
vmelikyan merged commit 2e954b9 into main Oct 29, 2026
1 check passed
@vmelikyan
vmelikyan requested a review from a team as a code owner October 29, 2026 03:37
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.

1 participant