fix(ui): Correct edge snapshots sorting by dataStateAt
Description
- Sort snapshots by
dataStateAtDate
descending to correctly identify newest and oldest snapshots. - Minor code improvements: avoid unnecessary array reversal.
Currently, snapshots are sorted on the backend by createdAt
date instead of dataStateAt
.
This leads to incorrect identification of the newest and oldest snapshots when displaying them in the UI.
By sorting manually on the frontend based on dataStateAt
, we ensure accurate and consistent behavior regardless of backend response order.
Checklist
-
MR description has been reviewed -
MR changes are functionally tested -
MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed & DOCS ARE ADJUSTED (reference doc, etc) -
MR does NOT have UI changes OR there are UI changes and they have been reviewed & UX IS REVIEWED