From 5aa3fafb4acfa89c7d04e84abf7861607733e8ce Mon Sep 17 00:00:00 2001 From: soryu Date: Tue, 28 Apr 2026 00:55:25 +0100 Subject: fix: resolve compilation error and warnings in Rust backend (#95) * fix: resolve compilation error and warnings in Rust backend - Fix syntax error in directive.rs phase_replanning (bad merge created duplicate code blocks with broken `.await {` syntax) - Remove unused imports: WorktreeError, DaemonReauthStatus, ratatui::prelude - Prefix unused variables with underscore: claude_command, content, owner_id - Suppress unused_assignments warning on final_exit_code - Add #[allow(unused_imports)] for cfg(unix) CommandExt imports Co-Authored-By: Claude Opus 4.6 (1M context) * WIP: heartbeat checkpoint * fix: suppress remaining compiler warnings for clean build - Add #[allow(dead_code)] for unused but intentionally kept functions - Remove useless self-assignments in listen handler - Fixes: truncate_string, checkout_commit, handle_get_worktree_diff, default_max_retries, STREAM_CHUNK_MS, listen(), MessageResponse.role Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 (1M context) --- makima/src/server/handlers/listen.rs | 3 +-- makima/src/server/handlers/mesh.rs | 2 +- makima/src/server/handlers/mesh_daemon.rs | 2 +- makima/src/server/handlers/mesh_supervisor.rs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'makima/src/server/handlers') diff --git a/makima/src/server/handlers/listen.rs b/makima/src/server/handlers/listen.rs index e1bc30e..7edcdfc 100644 --- a/makima/src/server/handlers/listen.rs +++ b/makima/src/server/handlers/listen.rs @@ -208,8 +208,7 @@ async fn handle_socket(socket: WebSocket, state: SharedState) { audio_offset = 0.0; finalized_segments.clear(); file_id = None; - authenticated_owner_id = authenticated_owner_id; // Keep from above - target_contract_id = target_contract_id; // Keep from above + // authenticated_owner_id and target_contract_id are kept from above // Reset models for new session let mut sortformer = ml_models.sortformer.lock().await; diff --git a/makima/src/server/handlers/mesh.rs b/makima/src/server/handlers/mesh.rs index 1a5b9c1..d9d40d7 100644 --- a/makima/src/server/handlers/mesh.rs +++ b/makima/src/server/handlers/mesh.rs @@ -20,7 +20,7 @@ use crate::db::models::{ use crate::db::repository::{self, RepositoryError}; use crate::server::auth::Authenticated; use crate::server::messages::ApiError; -use crate::server::state::{DaemonCommand, DaemonReauthStatus, SharedState, TaskUpdateNotification}; +use crate::server::state::{DaemonCommand, SharedState, TaskUpdateNotification}; // ============================================================================= // Authentication Types diff --git a/makima/src/server/handlers/mesh_daemon.rs b/makima/src/server/handlers/mesh_daemon.rs index e5f0a81..ed1b603 100644 --- a/makima/src/server/handlers/mesh_daemon.rs +++ b/makima/src/server/handlers/mesh_daemon.rs @@ -1627,7 +1627,7 @@ async fn handle_daemon_connection(socket: WebSocket, state: SharedState, auth_re ); // Broadcast as task output with auth_required type so UI can display the login link - let content = format!( + let _content = format!( "🔐 Authentication required on daemon{}. Click to login: {}", hostname.as_ref().map(|h| format!(" ({})", h)).unwrap_or_default(), login_url diff --git a/makima/src/server/handlers/mesh_supervisor.rs b/makima/src/server/handlers/mesh_supervisor.rs index ebde52b..3adb850 100644 --- a/makima/src/server/handlers/mesh_supervisor.rs +++ b/makima/src/server/handlers/mesh_supervisor.rs @@ -1272,7 +1272,7 @@ pub async fn create_branch( headers: HeaderMap, Json(request): Json, ) -> impl IntoResponse { - let (supervisor_id, owner_id) = match verify_supervisor_auth(&state, &headers, None).await { + let (supervisor_id, _owner_id) = match verify_supervisor_auth(&state, &headers, None).await { Ok(ids) => ids, Err(e) => return e.into_response(), }; -- cgit v1.2.3