File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1933,6 +1933,31 @@ test('content-preserving Missing Models refresh patches the browser instead of c
19331933 ) ;
19341934} ) ;
19351935
1936+ test ( 'cached Missing Models refresh preserves browser geometry after linking a local match' , ( ) => {
1937+ const refreshMissingModelsBrowserFromCache = eval (
1938+ `(${ extractMethod ( missingBrowserMethodsSource , 'refreshMissingModelsBrowserFromCache' ) } )`
1939+ ) ;
1940+ const contentElement = { } ;
1941+ const cachedAnalysisData = { missing_models : [ { filename : 'model.safetensors' } ] } ;
1942+ let renderCall = null ;
1943+ const dialog = {
1944+ activeTab : 'missing' ,
1945+ contentElement,
1946+ cachedAnalysisData,
1947+ displayMissingModels ( ...args ) {
1948+ renderCall = args ;
1949+ } ,
1950+ } ;
1951+
1952+ refreshMissingModelsBrowserFromCache . call ( dialog ) ;
1953+
1954+ assert . deepEqual ( renderCall , [
1955+ contentElement ,
1956+ cachedAnalysisData ,
1957+ { preserveBrowser : true } ,
1958+ ] ) ;
1959+ } ) ;
1960+
19361961test ( 'node widget changes request a content-preserving Missing Models refresh' , async ( ) => {
19371962 const log = { debug ( ) { } } ;
19381963 const refreshForActiveWorkflowChange = eval (
Original file line number Diff line number Diff line change @@ -594,7 +594,11 @@ export const missingBrowserMethods = {
594594
595595 refreshMissingModelsBrowserFromCache ( ) {
596596 if ( this . activeTab !== 'missing' || ! this . contentElement || ! this . cachedAnalysisData ) return ;
597- this . displayMissingModels ( this . contentElement , this . cachedAnalysisData ) ;
597+ this . displayMissingModels (
598+ this . contentElement ,
599+ this . cachedAnalysisData ,
600+ { preserveBrowser : true }
601+ ) ;
598602 } ,
599603
600604 getMissingListScrollSnapshot ( container ) {
You can’t perform that action at this time.
0 commit comments