Keep Studio 2 family tiles tied to existing library files

This commit is contained in:
Towsty
2026-09-11 19:04:03 -05:00
parent b1ffcd6975
commit b5a4882a9c
5 changed files with 31 additions and 11 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import {applyResolvedImageSize} from '../shared/studio2/graphs.mjs'
const base={mode:'generate',engine:'flux',folderId:'f',prompt:'Walk'}
test('completed outputs join all folder assets and select only the output canvas',()=>{
const source={id:'source',folderId:'f'},output={id:'result',kind:'still',studio2:{savedAt:2}}
const jobs=[{request:{folderId:'f'},outputs:[output]}],library={stills:[source,{id:'other',folderId:'f'}],clips:[{id:'video',folderId:'f'}]}
const jobs=[{request:{folderId:'f'},outputs:[output]}],library={stills:[source,{id:'other',folderId:'f'},{id:'result',folderId:'f'}],clips:[{id:'video',folderId:'f'}]}
const strip=folderAssets(library,jobs,'f');assert.equal(strip.length,4)
const state=selectResult({imageAId:'source',startClipId:'existing'},newestOutput(jobs,new Set(),'f'))
assert.equal(state.selected.id,'result');assert.equal(state.imageAId,'source');assert.equal(state.startClipId,'existing')