Enable tray icon and fix build scripts
CI / lint (push) Successful in 25s
CI / security (push) Successful in 15s
CI / test (push) Successful in 30s
CI / build (push) Successful in 14s
CI / e2e (push) Failing after 25s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled

This commit is contained in:
2026-07-26 12:41:29 -04:00
parent 1b4a6ff0cf
commit ed50aef6f7
11 changed files with 18641 additions and 24 deletions
+14 -10
View File
@@ -1,7 +1,7 @@
use tauri::Manager;
use std::process::{Child, Command};
use std::sync::Mutex;
use std::time::Duration;
use tauri::Manager;
// ── State ───────────────────────────────────────────────────────────────────
@@ -26,11 +26,15 @@ fn spawn_backend() -> Result<Child, String> {
let child = Command::new(&python)
.current_dir(&exe_dir)
.args([
"-m", "uvicorn",
"-m",
"uvicorn",
"backend.main:app",
"--host", "127.0.0.1",
"--port", "17890",
"--log-level", "info",
"--host",
"127.0.0.1",
"--port",
"17890",
"--log-level",
"info",
])
.spawn()
.map_err(|e| format!("Failed to start Python backend: {}", e))?;
@@ -70,10 +74,7 @@ fn get_backend_url() -> String {
async fn pick_vault_folder(app: tauri::AppHandle) -> Result<String, String> {
use tauri_plugin_dialog::DialogExt;
let path = app
.dialog()
.file()
.blocking_pick_folder();
let path = app.dialog().file().blocking_pick_folder();
match path {
Some(p) => Ok(p.to_string()),
@@ -122,7 +123,10 @@ fn main() {
Ok(()) => {
// Navigate to the main app
if let Some(window) = handle.get_webview_window("main") {
let _ = window.eval("window.location.href = 'http://127.0.0.1:17890'");
match window.eval("window.location.href = 'http://127.0.0.1:17890'") {
Ok(_) => println!("✅ Redirect to backend initiated"),
Err(e) => eprintln!("❌ Redirect eval failed: {}", e),
}
}
}
Err(e) => {