From 31a842516f9fb6dc5e4d4a61a366f42e1400bbaa Mon Sep 17 00:00:00 2001 From: Cloud Eric Date: Thu, 16 Apr 2026 23:23:57 +0000 Subject: [PATCH 1/2] 404 page: canonicalize to home instead of self (SEO) --- crates/modelrelay-cloud/src/routes/mod.rs | 31 ++++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/crates/modelrelay-cloud/src/routes/mod.rs b/crates/modelrelay-cloud/src/routes/mod.rs index 662a867..5ef9bb9 100644 --- a/crates/modelrelay-cloud/src/routes/mod.rs +++ b/crates/modelrelay-cloud/src/routes/mod.rs @@ -88,8 +88,7 @@ async fn download_redirect() -> Redirect { Redirect::temporary("/#download") } -async fn not_found(request: Request) -> impl IntoResponse { - let path = request.uri().path().to_owned(); +pub(super) async fn not_found(_request: Request) -> impl IntoResponse { let body = r#"

404

Page Not Found

@@ -100,7 +99,7 @@ async fn not_found(request: Request) -> impl IntoResponse { StatusCode::NOT_FOUND, Html(modelrelay_web::templates::page_shell( "404 — Not Found", - &path, + "/", body, false, )), @@ -430,7 +429,7 @@ async fn health(State(state): State>) -> (StatusCode, Json Date: Thu, 16 Apr 2026 23:29:30 +0000 Subject: [PATCH 2/2] fix(desktop): remove unused import and add # Errors docs --- crates/modelrelay-desktop/src/updater.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/modelrelay-desktop/src/updater.rs b/crates/modelrelay-desktop/src/updater.rs index 2c7d468..13680fe 100644 --- a/crates/modelrelay-desktop/src/updater.rs +++ b/crates/modelrelay-desktop/src/updater.rs @@ -6,7 +6,7 @@ //! background checks are silent on "no update" and surface errors only in logs. use serde::Serialize; -use tauri::{AppHandle, Emitter, Manager, Runtime}; +use tauri::{AppHandle, Emitter, Runtime}; use tauri_plugin_dialog::{DialogExt, MessageDialogButtons, MessageDialogKind}; use tauri_plugin_updater::{Update, UpdaterExt}; @@ -43,6 +43,11 @@ impl UpdateSummary { } /// Look up whether a newer version is available. Does not download or install. +/// +/// # Errors +/// +/// Returns an error string if the updater plugin cannot be initialized or the +/// remote update check fails (network, signature, or parse errors). pub async fn fetch_update_summary(app: &AppHandle) -> Result { let current = app.package_info().version.to_string(); let updater = app.updater().map_err(|e| e.to_string())?; @@ -58,6 +63,11 @@ pub async fn fetch_update_summary(app: &AppHandle) -> Result(app: &AppHandle) -> Result<(), String> { let updater = app.updater().map_err(|e| e.to_string())?; let Some(update) = updater.check().await.map_err(|e| e.to_string())? else {