Fix 21 bugs: build failures, broken pages, IPC mismatches, and missing error handling
Critical fixes: - Add esbuild dependency and fix Vite build target (safari13 → es2022) - Fix StorageDetail always failing (null node parameter) - Fix VNC/Terminal console stuck on 'Connecting...' (add onConnected callback) - Fix Ctrl+Alt+Del not working (add data-vnc attribute and event listener) - Add serde(rename_all='camelCase') to all 27 Rust structs crossing IPC - Fix login methods returning empty connection_id (generate from URL hash) - Fix add_connection not storing connections in HashMap - Fix keyring_entry panicking on failure (replace expect with map_err) High-severity fixes: - Fix refresh_ticket reading wrong keyring entry for username - Add onError handlers to all 23 mutations (toast notifications) - Fix stale closure on activeConnectionId (use getState() instead) - Fix WebSocket listener teardown race condition - Add WebSocket reconnection retry limit (max 10 attempts) Medium-severity fixes: - Add Settings navigation to CommandPalette (Cmd+K) - Disable dead Nodes/Containers sidebar items - Wire up HardwareTab save button with warning toast - Wire up QuickActions navigation buttons - Add Dashboard error state (was stuck on 'Loading...') - Add default case to App.tsx view switch - Extract formatBytes/formatUptime/formatNetworkRate to shared utility - Fix formatBytes negative input bug 32 files changed, 1073 insertions(+), 356 deletions(-)
This commit is contained in:
+11
-4
@@ -16,6 +16,7 @@ use websocket::WebSocketManager;
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct ConnectionConfig {
|
||||
pub id: String,
|
||||
@@ -31,6 +32,7 @@ pub struct ConnectionConfig {
|
||||
pub username: Option<String>,
|
||||
}
|
||||
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct EndpointConfig {
|
||||
pub url: String,
|
||||
@@ -38,6 +40,7 @@ pub struct EndpointConfig {
|
||||
pub token: Option<String>,
|
||||
}
|
||||
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct LoginResult {
|
||||
pub connection_id: String,
|
||||
@@ -45,6 +48,7 @@ pub struct LoginResult {
|
||||
pub csrf_token: String,
|
||||
}
|
||||
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct CertificateInfo {
|
||||
pub fingerprint: String,
|
||||
@@ -65,7 +69,7 @@ async fn add_connection(
|
||||
state: tauri::State<'_, AppState>,
|
||||
config: ConnectionConfig,
|
||||
) -> Result<()> {
|
||||
let manager = state.connection_manager.read().await;
|
||||
let mut manager = state.connection_manager.write().await;
|
||||
manager.add_connection(config).await
|
||||
}
|
||||
|
||||
@@ -74,7 +78,7 @@ async fn remove_connection(
|
||||
state: tauri::State<'_, AppState>,
|
||||
id: String,
|
||||
) -> Result<()> {
|
||||
let manager = state.connection_manager.read().await;
|
||||
let mut manager = state.connection_manager.write().await;
|
||||
manager.remove_connection(&id).await
|
||||
}
|
||||
|
||||
@@ -83,7 +87,7 @@ async fn connect_to_server(
|
||||
state: tauri::State<'_, AppState>,
|
||||
id: String,
|
||||
) -> Result<()> {
|
||||
let manager = state.connection_manager.read().await;
|
||||
let mut manager = state.connection_manager.write().await;
|
||||
manager.connect(&id).await
|
||||
}
|
||||
|
||||
@@ -92,7 +96,7 @@ async fn disconnect_from_server(
|
||||
state: tauri::State<'_, AppState>,
|
||||
id: String,
|
||||
) -> Result<()> {
|
||||
let manager = state.connection_manager.read().await;
|
||||
let mut manager = state.connection_manager.write().await;
|
||||
manager.disconnect(&id).await
|
||||
}
|
||||
|
||||
@@ -457,6 +461,7 @@ async fn get_stored_credentials(
|
||||
}
|
||||
|
||||
// Console proxy types
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct VNCProxyResponse {
|
||||
pub ticket: String,
|
||||
@@ -464,6 +469,7 @@ pub struct VNCProxyResponse {
|
||||
pub cert: String,
|
||||
}
|
||||
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct TermProxyResponse {
|
||||
pub ticket: String,
|
||||
@@ -613,6 +619,7 @@ async fn delete_backup(
|
||||
manager.delete_backup(&connection_id, &volid).await
|
||||
}
|
||||
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct TrayConnectionInfo {
|
||||
pub id: String,
|
||||
|
||||
Reference in New Issue
Block a user