pub async fn duplicate_profile<R: Runtime>(
app: AppHandle<R>,
scheduler: State<'_, Scheduler>,
source: String,
name: String,
) -> Result<(), String>Expand description
Copy source’s settings into a brand-new profile named name
without flipping the active profile. Avoids the
switch-then-create dance that used to fire profile:changed
mid-duplication and clobber unsaved hook drafts.