@@ -582,9 +582,10 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
582582 if ( ! frameKey . startsWith ( prefix ) ) return ;
583583 filmstripFrameCache . current . delete ( frameKey ) ;
584584 } ) ;
585- filmstripFrameCacheOrder . current = filmstripFrameCacheOrder . current . filter (
586- ( frameKey ) => ! frameKey . startsWith ( prefix ) ,
587- ) ;
585+ filmstripFrameCacheOrder . current =
586+ filmstripFrameCacheOrder . current . filter (
587+ ( frameKey ) => ! frameKey . startsWith ( prefix ) ,
588+ ) ;
588589 }
589590 filmstripBatchCache . current . set ( key , batch ) ;
590591 touchCacheOrder ( filmstripBatchCacheOrder . current , key ) ;
@@ -596,9 +597,10 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
596597 if ( ! frameKey . startsWith ( prefix ) ) return ;
597598 filmstripFrameCache . current . delete ( frameKey ) ;
598599 } ) ;
599- filmstripFrameCacheOrder . current = filmstripFrameCacheOrder . current . filter (
600- ( frameKey ) => ! frameKey . startsWith ( prefix ) ,
601- ) ;
600+ filmstripFrameCacheOrder . current =
601+ filmstripFrameCacheOrder . current . filter (
602+ ( frameKey ) => ! frameKey . startsWith ( prefix ) ,
603+ ) ;
602604 }
603605 } ;
604606
@@ -714,7 +716,10 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
714716 const frameHeight = Math . max ( 1 , Math . floor ( fullHeight / safeCount ) ) ;
715717 const sourceY = Math . max (
716718 0 ,
717- Math . min ( safeIndex * frameHeight , Math . max ( fullHeight - frameHeight , 0 ) ) ,
719+ Math . min (
720+ safeIndex * frameHeight ,
721+ Math . max ( fullHeight - frameHeight , 0 ) ,
722+ ) ,
718723 ) ;
719724 const croppedBitmap = await createImageBitmap (
720725 blob ,
@@ -916,9 +921,12 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
916921 zCount : Number (
917922 response ?. headers ?. [ "x-z-count" ] ?? FILMSTRIP_BATCH_SIZE ,
918923 ) ,
919- total : Number ( response ?. headers ?. [ "x-total-layers" ] ?? totalLayers ?? 0 ) ,
924+ total : Number (
925+ response ?. headers ?. [ "x-total-layers" ] ?? totalLayers ?? 0 ,
926+ ) ,
920927 axis : response ?. headers ?. [ "x-axis" ] ?? axis ,
921- frameHeight : Number ( response ?. headers ?. [ "x-frame-height" ] ?? 0 ) || null ,
928+ frameHeight :
929+ Number ( response ?. headers ?. [ "x-frame-height" ] ?? 0 ) || null ,
922930 } ,
923931 } ;
924932 cacheFilmstripBatch ( key , entry ) ;
@@ -1640,16 +1648,19 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
16401648 if ( scrubIdleRef . current ) {
16411649 clearTimeout ( scrubIdleRef . current ) ;
16421650 }
1643- previewDebounceRef . current = setTimeout ( ( ) => {
1644- loadInstancePreview ( activeInstanceId , nextIndex , axisToUse , {
1645- maxDim : PREVIEW_MAX_DIM ,
1646- qualityLabel : `preview-${ PREVIEW_MAX_DIM } ` ,
1647- prefetchNeighbors : ! isFastScrubRef . current ,
1648- prefetchDistance : isFastScrubRef . current ? 0 : 1 ,
1649- imageOnly : true ,
1650- priority : 120 ,
1651- } ) ;
1652- } , isFastScrubRef . current ? 100 : 60 ) ;
1651+ previewDebounceRef . current = setTimeout (
1652+ ( ) => {
1653+ loadInstancePreview ( activeInstanceId , nextIndex , axisToUse , {
1654+ maxDim : PREVIEW_MAX_DIM ,
1655+ qualityLabel : `preview-${ PREVIEW_MAX_DIM } ` ,
1656+ prefetchNeighbors : ! isFastScrubRef . current ,
1657+ prefetchDistance : isFastScrubRef . current ? 0 : 1 ,
1658+ imageOnly : true ,
1659+ priority : 120 ,
1660+ } ) ;
1661+ } ,
1662+ isFastScrubRef . current ? 100 : 60 ,
1663+ ) ;
16531664
16541665 scrubIdleRef . current = setTimeout ( ( ) => {
16551666 if ( ! isScrubbingRef . current ) return ;
@@ -1788,7 +1799,9 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
17881799 mode : "overwrite_source" ,
17891800 create_backup : true ,
17901801 } ) ;
1791- message . success ( `Source masks updated at ${ response . data . written_path } ` ) ;
1802+ message . success (
1803+ `Source masks updated at ${ response . data . written_path } ` ,
1804+ ) ;
17921805 if ( response . data . backup_path ) {
17931806 message . info ( `Backup created at ${ response . data . backup_path } ` ) ;
17941807 }
@@ -1869,7 +1882,10 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
18691882 < Text type = "secondary" style = { { fontSize : 12 } } >
18701883 Opacity controls
18711884 </ Text >
1872- < Space size = "small" style = { { width : "100%" , justifyContent : "space-between" } } >
1885+ < Space
1886+ size = "small"
1887+ style = { { width : "100%" , justifyContent : "space-between" } }
1888+ >
18731889 < Text style = { { fontSize : 12 } } > Other instances</ Text >
18741890 < Text type = "secondary" style = { { fontSize : 12 } } >
18751891 { Math . round ( overlayAllAlpha * 100 ) } %
@@ -1881,7 +1897,10 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
18811897 value = { Math . round ( overlayAllAlpha * 100 ) }
18821898 onChange = { ( value ) => setOverlayAllAlpha ( value / 100 ) }
18831899 />
1884- < Space size = "small" style = { { width : "100%" , justifyContent : "space-between" } } >
1900+ < Space
1901+ size = "small"
1902+ style = { { width : "100%" , justifyContent : "space-between" } }
1903+ >
18851904 < Text style = { { fontSize : 12 } } > Selected instance</ Text >
18861905 < Text type = "secondary" style = { { fontSize : 12 } } >
18871906 { Math . round ( overlayActiveAlpha * 100 ) } %
@@ -1900,7 +1919,11 @@ function DetectionWorkflow({ sessionId, setSessionId, refreshTrigger }) {
19001919 instanceMode !== "none" && instances . length > 0 ? (
19011920 < div style = { { display : "grid" , gap : 8 } } >
19021921 < Space size = "small" wrap >
1903- < Button size = "small" type = "primary" onClick = { ( ) => setShowInstanceBrowser ( true ) } >
1922+ < Button
1923+ size = "small"
1924+ type = "primary"
1925+ onClick = { ( ) => setShowInstanceBrowser ( true ) }
1926+ >
19041927 Browse...
19051928 </ Button >
19061929 < Button size = "small" onClick = { goToNextUnreviewed } >
0 commit comments