fix: sort v2 session list by updated time (#27954)

This commit is contained in:
Luke Parker
2026-05-18 09:01:55 +10:00
committed by GitHub
parent 49c6b46afc
commit fc19dcc70c
3 changed files with 11 additions and 8 deletions

View File

@@ -41,6 +41,7 @@ export function trimSessions(
.filter((s) => !s.time?.archived)
.sort((a, b) => cmp(a.id, b.id))
const roots = all.filter((s) => !s.parentID)
roots.sort(compareSessionRecent)
const children = all.filter((s) => !!s.parentID)
const base = roots.slice(0, limit)
const recent = takeRecentSessions(roots.slice(limit), SESSION_RECENT_LIMIT, cutoff)