diff --git a/data/users/demo.sqlite-shm b/data/users/demo.sqlite-shm index 6f593d9..0847e75 100644 Binary files a/data/users/demo.sqlite-shm and b/data/users/demo.sqlite-shm differ diff --git a/data/users/demo_recovered.sqlite b/data/users/demo_recovered.sqlite new file mode 100644 index 0000000..aa8613d Binary files /dev/null and b/data/users/demo_recovered.sqlite differ diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d61c20f..e01ad08 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3766,6 +3766,7 @@ dependencies = [ "ctr 0.9.2", "dashmap", "dav-server", + "dirs 5.0.1", "ed25519-dalek 2.2.0", "env_logger", "filetime", diff --git a/src-tauri/src/proxy.rs b/src-tauri/src/proxy.rs index 8961cb2..5fb3ee3 100644 --- a/src-tauri/src/proxy.rs +++ b/src-tauri/src/proxy.rs @@ -263,6 +263,24 @@ async fn fallback_handler(State(state): State, req: axum::extract::R return handle_local_api(req).await; } + // Handle MBE health check proxy + if path == "/api/v1/mbe/health" { + let client = reqwest::Client::new(); + match client.get("http://localhost:8080/health").send().await { + Ok(resp) => { + let status = resp.status().as_u16(); + let body = resp.bytes().await.unwrap_or_default(); + let status_code = axum::http::StatusCode::from_u16(status).unwrap_or(axum::http::StatusCode::INTERNAL_SERVER_ERROR); + let mut builder = axum::http::Response::builder().status(status_code); + builder = builder.header("content-type", "application/json"); + return builder.body(axum::body::Body::from(body)).unwrap().into_response(); + } + Err(_) => { + return (StatusCode::SERVICE_UNAVAILABLE, "{\"status\":\"unreachable\"}").into_response(); + } + } + } + if path.starts_with("/api/v2/") { return proxy_to(state, req, MARKBASE_API, false).await; } else if path.starts_with("/api/") { diff --git a/src-tauri/target/.rustc_info.json b/src-tauri/target/.rustc_info.json index 5e0a301..f0b6a60 100644 --- a/src-tauri/target/.rustc_info.json +++ b/src-tauri/target/.rustc_info.json @@ -1 +1 @@ -{"rustc_fingerprint":18311546023473579713,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: aarch64-apple-darwin\nrelease: 1.95.0\nLLVM version: 22.1.2\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/accusys/.rustup/toolchains/stable-aarch64-apple-darwin\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""}},"successes":{}} \ No newline at end of file +{"rustc_fingerprint":12687021790548862218,"outputs":{"16541490229894744394":{"success":true,"status":"","code":0,"stdout":"rustc 1.99.0 (b940084d7 2026-09-28)\nbinary: rustc\ncommit-hash: b940084d7eb6a299eb4bfeb8e34901bc051e7ac4\ncommit-date: 2026-09-28\nhost: aarch64-apple-darwin\nrelease: 1.99.0\nLLVM version: 23.1.1\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/accusys/.rustup/toolchains/stable-aarch64-apple-darwin\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_primitive_alignment=\"128\"\ntarget_has_atomic_primitive_alignment=\"16\"\ntarget_has_atomic_primitive_alignment=\"32\"\ntarget_has_atomic_primitive_alignment=\"64\"\ntarget_has_atomic_primitive_alignment=\"8\"\ntarget_has_atomic_primitive_alignment=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/src/views/AdminView.vue b/src/views/AdminView.vue index 8def7ab..d1fce4a 100644 --- a/src/views/AdminView.vue +++ b/src/views/AdminView.vue @@ -879,9 +879,9 @@ async function testMbe() { testingMbe.value = true mbeInfo.value = null try { - // MarkBaseServer only exposes /health (returns plain text "OK") - // Always use /health regardless of hostname - const healthUrl = `${mbeUrl.value.replace(/\/$/, '')}/health` + // Use Studio proxy to reach MBE (works both locally and remotely) + const base = getApiBase() + const healthUrl = `${base.replace(/\/$/, '')}/api/v1/mbe/health` const resp = await fetch(healthUrl, { signal: AbortSignal.timeout(5000) }) if (!resp.ok) throw new Error(`HTTP ${resp.status}`)