Fix desktop crate build; simplify tray/menu and telemetry reconnect

Real bugs found by actually compiling the Tauri crate for the first time:
- Cargo.toml declared a [lib] with no src/lib.rs (cargo refused to parse
  the manifest) — added the standard Tauri 2 main.rs/lib.rs split.
- generate_context!() needs real icon files; icons/ only had a .gitkeep.
  Added placeholder PNG/ICO/ICNS icons.

Also simplified: dropped the tray icon + menu (one more moving part not
needed yet), and the telemetry store's exponential backoff is now a fixed
3s retry, matching the same simplification made to continuum-proxy's
uplink client.

Fixed two real TS bugs while typechecking apps/web for the first time
(missing @types/node for nuxt.config.ts's process.env access, untyped
useFetch call inferring 'never'). Verified: cargo check (desktop),
vue-tsc --noEmit (web + ui packages) all clean.
This commit is contained in:
2026-08-28 18:33:40 +00:00
parent 4cb2e82a92
commit 9cb59d723e
15 changed files with 11910 additions and 46 deletions
+4751
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -9,7 +9,7 @@ rust-version = "1.77"
tauri-build = { version = "2.0", features = [] }
[dependencies]
tauri = { version = "2.1", features = ["tray-icon"] }
tauri = "2.1"
tauri-plugin-fs = "2.0"
tauri-plugin-shell = "2.0"
serde = { version = "1", features = ["derive"] }
Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

+12
View File
@@ -0,0 +1,12 @@
// This is intentionally the plainest possible Tauri shell: load the two
// plugins the desktop app needs (filesystem access, opening external links)
// and show the window. A tray icon with a menu is a natural next addition
// once this makes sense — see Tauri's tray-icon docs when you're ready.
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_shell::init())
.run(tauri::generate_context!())
.expect("error while running the Continuum desktop shell");
}
+1 -34
View File
@@ -1,39 +1,6 @@
// Prevents an additional console window on Windows in release builds.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::{
menu::{Menu, MenuItem},
tray::TrayIconBuilder,
Manager,
};
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_shell::init())
.setup(|app| {
let show = MenuItem::with_id(app, "show", "Show Continuum", true, None::<&str>)?;
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&show, &quit])?;
TrayIconBuilder::new()
.icon(app.default_window_icon().unwrap().clone())
.menu(&menu)
.tooltip("Continuum — print farm console")
.on_menu_event(|app, event| match event.id.as_ref() {
"show" => {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.set_focus();
}
}
"quit" => app.exit(0),
_ => {}
})
.build(app)?;
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running the Continuum desktop shell");
continuum_desktop_lib::run();
}
-4
View File
@@ -23,10 +23,6 @@
],
"security": {
"csp": null
},
"trayIcon": {
"iconPath": "icons/icon.png",
"iconAsTemplate": true
}
},
"bundle": {