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:
+13
-3
@@ -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'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user