diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs index ffa1092da..a02e50169 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs @@ -157,7 +157,11 @@ pub(crate) async fn separate_ui_impl( Ok(value) => value, Err(error) => { app_log!("ui_separation.error stage=image_edit tree_index={} batch_index={} error={error}", tree_index, batch_index); - write_separation_state(state_path.clone(), &separation).await?; + if let Err(checkpoint_error) = + write_separation_state(state_path.clone(), &separation).await + { + app_log!("ui_separation.error stage=state_checkpoint tree_index={} batch_index={} error={checkpoint_error}", tree_index, batch_index); + } return Err(error); } }; @@ -171,7 +175,11 @@ pub(crate) async fn separate_ui_impl( Ok(dimensions) => dimensions, Err(error) => { app_log!("ui_separation.error stage=processed_image_write tree_index={} batch_index={} error={error}", tree_index, batch_index); - write_separation_state(state_path.clone(), &separation).await?; + if let Err(checkpoint_error) = + write_separation_state(state_path.clone(), &separation).await + { + app_log!("ui_separation.error stage=state_checkpoint tree_index={} batch_index={} error={checkpoint_error}", tree_index, batch_index); + } return Err(error); } }; @@ -187,7 +195,11 @@ pub(crate) async fn separate_ui_impl( Ok(value) => value, Err(error) => { app_log!("ui_separation.error stage=visual_binding tree_index={} batch_index={} error={error}", tree_index, batch_index); - write_separation_state(state_path.clone(), &separation).await?; + if let Err(checkpoint_error) = + write_separation_state(state_path.clone(), &separation).await + { + app_log!("ui_separation.error stage=state_checkpoint tree_index={} batch_index={} error={checkpoint_error}", tree_index, batch_index); + } return Err(error); } }; @@ -232,7 +244,11 @@ pub(crate) async fn separate_ui_impl( } if let Some(error) = cut_error { app_log!("ui_separation.error stage=cut_batch tree_index={} batch_index={} error={error}", tree_index, batch_index); - write_separation_state(state_path.clone(), &separation).await?; + if let Err(checkpoint_error) = + write_separation_state(state_path.clone(), &separation).await + { + app_log!("ui_separation.error stage=state_checkpoint tree_index={} batch_index={} error={checkpoint_error}", tree_index, batch_index); + } return Err(error); } patch::apply_batch_patch(