@@ -309,13 +309,13 @@ function ProjectDetail({
309309 let importedCount = 0 ;
310310 let skippedCount = 0 ;
311311 let succeededCount = 0 ;
312- let scanTruncated = false ;
312+ let scanIncomplete = false ;
313313 try {
314314 for ( const member of importableMembers ) {
315- // The scanner refreshes its candidates before anything that can fail the scan, and import
316- // falls back to its own discovery, so a failed rescan still leaves import worth running .
315+ // A failed rescan may still have refreshed what import reads, so import anyway and say the
316+ // result may be missing sessions rather than claiming there were none .
317317 const scanned = await rescanSessions ( { environmentId : member . environmentId , input : { } } ) ;
318- if ( scanned . _tag === "Success" && scanned . value . truncated === true ) scanTruncated = true ;
318+ if ( scanned . _tag === "Failure" || scanned . value . truncated === true ) scanIncomplete = true ;
319319 const result = await importSessions ( {
320320 environmentId : member . environmentId ,
321321 input : { projectId : member . id , expectedWorkspaceRoot : member . workspaceRoot } ,
@@ -345,13 +345,18 @@ function ProjectDetail({
345345 `${ skippedCount } ${ skippedCount === 1 ? "was" : "were" } not; import again to continue a large batch.` ,
346346 ]
347347 : [ ] ) ,
348- ...( scanTruncated
349- ? [ "There were too many conversations to scan , so some may be missing." ]
348+ ...( scanIncomplete
349+ ? [ "The scan for new conversations did not finish , so some may be missing." ]
350350 : [ ] ) ,
351351 ] . join ( " " ) ;
352352 toastManager . add (
353- skippedCount > 0 || scanTruncated
354- ? { type : "warning" , title : "Some sessions were not imported" , description : notes }
353+ skippedCount > 0 || scanIncomplete
354+ ? {
355+ type : "warning" ,
356+ title :
357+ skippedCount > 0 ? "Some sessions were not imported" : "Some sessions may be missing" ,
358+ description : notes ,
359+ }
355360 : importedCount === 0
356361 ? {
357362 type : "info" ,
0 commit comments