diff --git a/Cargo.lock b/Cargo.lock index c86e81e..4115b58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -270,7 +270,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cm-dashboard" -version = "0.1.27" +version = "0.1.28" dependencies = [ "anyhow", "chrono", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "cm-dashboard-agent" -version = "0.1.27" +version = "0.1.28" dependencies = [ "anyhow", "async-trait", @@ -314,7 +314,7 @@ dependencies = [ [[package]] name = "cm-dashboard-shared" -version = "0.1.27" +version = "0.1.28" dependencies = [ "chrono", "serde", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index c7a3298..d1981b7 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.28" +version = "0.1.29" edition = "2021" [dependencies] diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index 6d6825c..eec3652 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.28" +version = "0.1.29" edition = "2021" [dependencies] diff --git a/dashboard/src/main.rs b/dashboard/src/main.rs index 128e804..1035992 100644 --- a/dashboard/src/main.rs +++ b/dashboard/src/main.rs @@ -14,7 +14,7 @@ use app::Dashboard; /// Get hardcoded version fn get_version() -> &'static str { - "v0.1.28" + "v0.1.29" } /// Check if running inside tmux session diff --git a/dashboard/src/ui/mod.rs b/dashboard/src/ui/mod.rs index 178aafd..cbb0b06 100644 --- a/dashboard/src/ui/mod.rs +++ b/dashboard/src/ui/mod.rs @@ -462,15 +462,9 @@ impl TuiApp { fn clear_completed_transitions(&mut self, hostname: &str, service_metrics: &[&Metric]) { if let Some(host_widgets) = self.host_widgets.get_mut(hostname) { let mut completed_services = Vec::new(); - let now = Instant::now(); - // Check each pending transition to see if real status has changed or timed out - for (service_name, (command_type, original_status, start_time)) in &host_widgets.pending_service_transitions { - // Clear if too much time has passed (3 seconds for redundant commands) - if now.duration_since(*start_time).as_secs() > 3 { - completed_services.push(service_name.clone()); - continue; - } + // Check each pending transition to see if real status has changed + for (service_name, (command_type, original_status, _start_time)) in &host_widgets.pending_service_transitions { // Look for status metric for this service for metric in service_metrics { diff --git a/dashboard/src/ui/widgets/services.rs b/dashboard/src/ui/widgets/services.rs index 4aec77d..2425933 100644 --- a/dashboard/src/ui/widgets/services.rs +++ b/dashboard/src/ui/widgets/services.rs @@ -559,17 +559,25 @@ impl ServicesWidget { // Parent services - check if this parent service has a pending transition using RAW service name if pending_transitions.contains_key(raw_service_name) { // Create spans with transitional status - let (icon, status_text, status_color) = self.get_service_icon_and_status(raw_service_name, &ServiceInfo { + let (icon, status_text, _) = self.get_service_icon_and_status(raw_service_name, &ServiceInfo { status: "".to_string(), memory_mb: None, disk_gb: None, latency_ms: None, widget_status: *line_status }, pending_transitions); + + // Use blue for transitional icons when not selected, background color when selected + let icon_color = if is_selected && !*is_sub && is_focused { + Theme::background() // Dark background color for visibility against blue selection + } else { + Theme::highlight() // Blue for normal case + }; + vec![ - ratatui::text::Span::styled(format!("{} ", icon), Style::default().fg(status_color)), + ratatui::text::Span::styled(format!("{} ", icon), Style::default().fg(icon_color)), ratatui::text::Span::styled(line_text.clone(), Style::default().fg(Theme::primary_text())), - ratatui::text::Span::styled(format!(" {}", status_text), Style::default().fg(status_color)), + ratatui::text::Span::styled(format!(" {}", status_text), Style::default().fg(icon_color)), ] } else { StatusIcons::create_status_spans(*line_status, line_text) @@ -578,8 +586,8 @@ impl ServicesWidget { // Apply selection highlighting to parent services only, preserving status icon color // Only show selection when Services panel is focused - // IMPORTANT: Don't override transitional icons that show pending commands - if is_selected && !*is_sub && is_focused && !pending_transitions.contains_key(raw_service_name) { + // Show selection highlighting even when transitional icons are present + if is_selected && !*is_sub && is_focused { for (i, span) in spans.iter_mut().enumerate() { if i == 0 { // First span is the status icon - preserve its color diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 134bb2a..bb9438d 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.28" +version = "0.1.29" edition = "2021" [dependencies]