Make family branches readable and fix Library part previews.

Lead rows with Start/pN labels and fork headers, collapse hidden frame strips to one glow, and stop Library part thumbs from leaking or cloning the Start frame.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-03 20:32:40 -05:00
co-authored by Cursor
parent 8f80cbd39b
commit 47f14d7be2
4 changed files with 67 additions and 26 deletions
+13 -3
View File
@@ -213,11 +213,21 @@ export function familyBranchHint(parts: LibraryClip[]) {
return familyBranchSummary(parts)
}
export function clipIsFamilyRoot(clip: LibraryClip, parts: LibraryClip[]) {
if (!clip.parentClipId) return true
const byId = new Map(parts.map(part => [part.id, part]))
return !byId.has(clip.parentClipId)
}
/** Short row title: Start / p2 / p3b — not the long shared base name. */
export function clipFamilyPartTitle(clip: LibraryClip, parts: LibraryClip[]) {
if (clipIsFamilyRoot(clip, parts)) return 'Start'
return clipPartLabel(clip.name) || clip.name || 'clip'
}
export function clipParentDisplayLabel(parent: LibraryClip | undefined, parts: LibraryClip[]) {
if (!parent) return ''
const byId = new Map(parts.map(part => [part.id, part]))
const isRoot = !parent.parentClipId || !byId.has(parent.parentClipId)
if (isRoot) return 'Start'
if (clipIsFamilyRoot(parent, parts)) return 'Start'
return clipPartLabel(parent.name) || parent.name || 'previous'
}