Bump studio library sort to match family activity.

Studio sidebar now uses the newest part timestamp the same way the full library does.
This commit is contained in:
2026-09-04 22:20:16 -05:00
parent 25e7864337
commit baa3f7699c
+5 -4
View File
@@ -2333,6 +2333,7 @@ import { emptyKeepPrompts, insertKeepSnippet, normalizeKeepPrompts, type KeepPro
import {
clipFamilyPartTitle,
clipPartLabel,
familyActivityAt,
familyBaseName,
familyBranchSummary,
familyDisplayNodes,
@@ -3436,7 +3437,7 @@ const stillGroups = computed(() => {
const sorted = [...parts].sort(sortStillParts)
return { key, head: sorted[0], parts: sorted }
})
.sort((a, b) => b.head.createdAt - a.head.createdAt)
.sort((a, b) => familyActivityAt(b.parts) - familyActivityAt(a.parts))
})
const libraryGroups = computed(() => {
const groups = new Map<string, LibraryClip[]>()
@@ -3451,7 +3452,7 @@ const libraryGroups = computed(() => {
const head = familyRootClip(parts)
return { key, head, parts: [...parts] }
})
.sort((a, b) => b.head.createdAt - a.head.createdAt)
.sort((a, b) => familyActivityAt(b.parts) - familyActivityAt(a.parts))
})
const libraryEntries = computed(() => {
const videos = libraryFilter.value === 'images'
@@ -3459,7 +3460,7 @@ const libraryEntries = computed(() => {
: libraryGroups.value.map(group => ({
kind: 'clip' as const,
key: group.key,
createdAt: group.head.createdAt,
createdAt: familyActivityAt(group.parts),
group
}))
const images = libraryFilter.value === 'videos'
@@ -3467,7 +3468,7 @@ const libraryEntries = computed(() => {
: stillGroups.value.map(group => ({
kind: 'still' as const,
key: group.key,
createdAt: group.head.createdAt,
createdAt: familyActivityAt(group.parts),
stillGroup: group
}))
return [...videos, ...images].sort((a, b) => b.createdAt - a.createdAt)