hunk.code_window: 					the Library catalogs them and stores all Spacedrive related data.
   				</OnboardingDescription>
   				{importMode ? (
   					<div className="space-x-2 mt-7">
   						<Button onClick={handleImport} variant="accent" size="sm">
   							Import
   						</Button>
   						<span className="px-2 text-xs font-bold text-ink-faint">OR</span>
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit: 					<div className="mt-7 space-x-2">
  
hunk.file_path: interface/app/onboarding/new-library.tsx
hunk.type: replace
file: use crate::{invalidate_query, library::Library};
  
  use std::{collections::HashSet, sync::Arc};
  
  use tokio::{
  	spawn,
  	time::{interval, Duration},
  };
  
  use super::get_volumes;
  
  pub fn spawn_volume_watcher(library: Arc<Library>) {
  	spawn(async move {
  		let mut interval = interval(Duration::from_secs(1));
  		let mut existing_volumes = get_volumes().await.into_iter().collect::<HashSet<_>>();
  
  		loop {
  			interval.tick().await;
  
  			let current_volumes = get_volumes().await.into_iter().collect::<HashSet<_>>();
  
  			if existing_volumes != current_volumes {
  				existing_volumes = current_volumes;
  				invalidate_query!(&library, "volumes.list");
  			}
  		}
  	});
  }
  