v0.3.7-pre.008

This commit is contained in:
2026-09-02 16:56:11 +02:00
parent 6e406a6b84
commit 48d26b43f9
19 changed files with 693 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-backfill-desk/src/tauri.rs
// version: 5
// version: 6
//! Tauri runtime assembly for the KSP Backfill desktop application.
@@ -77,6 +77,7 @@ fn configure_plugins(builder: tauri::Builder<tauri::Wry>) -> tauri::Builder<taur
fn configure_commands(builder: tauri::Builder<tauri::Wry>) -> tauri::Builder<tauri::Wry> {
return builder.invoke_handler(tauri::generate_handler![
backfill_options,
backfill_start,
backfill_validate_request,
emit_frontend_log,
get_runtime_status,
@@ -164,6 +165,36 @@ fn backfill_options(state: tauri::State<'_, crate::AppState>) -> std::result::Re
};
}
#[tauri::command]
fn backfill_start(
app: tauri::AppHandle,
request: crate::BackfillStartRequestDto,
state: tauri::State<'_, crate::AppState>,
) -> std::result::Result<crate::BackfillStartResponseDto, crate::CommandErrorDto> {
let launch = state.prepare_backfill_start(request);
let launch = match launch {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => {
return std::result::Result::Err(project_command_error("backfill_start", crate::TRACING_DOMAIN_RUN, &error));
},
};
let response = launch.response();
let _run_task = tauri::async_runtime::spawn(async move {
let state = app.state::<crate::AppState>();
let executed = state.execute_backfill_run(launch).await;
if let std::result::Result::Err(error) = executed {
ksp_logging_lib::warn!(
target: crate::TRACING_TARGET,
domain = crate::TRACING_DOMAIN_RUN,
error_domain = error.code().domain(),
error_code = error.code().code(),
"Backfill Desk async run terminated with an error"
);
}
});
return std::result::Result::Ok(response);
}
#[tauri::command]
fn backfill_validate_request(
request: crate::BackfillStartRequestDto,