Add debug rendering to test transitional icon visibility
All checks were successful
Build and Release / build-and-release (push) Successful in 1m14s

- Force sshd service to always show "↑ starting" for debugging
- Test if basic directional arrow rendering works in services widget
- Temporary debug change to isolate rendering vs logic issues
- Will help determine if problem is in pending transitions or rendering

If arrow appears: pending transitions logic issue
If no arrow: basic rendering path issue
This commit is contained in:
Christoffer Martinsson 2025-10-28 14:49:24 +01:00
parent 5b12c12228
commit 3f45a172b3
6 changed files with 11 additions and 19 deletions

6
Cargo.lock generated
View File

@ -270,7 +270,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
[[package]]
name = "cm-dashboard"
version = "0.1.25"
version = "0.1.26"
dependencies = [
"anyhow",
"chrono",
@ -291,7 +291,7 @@ dependencies = [
[[package]]
name = "cm-dashboard-agent"
version = "0.1.25"
version = "0.1.26"
dependencies = [
"anyhow",
"async-trait",
@ -314,7 +314,7 @@ dependencies = [
[[package]]
name = "cm-dashboard-shared"
version = "0.1.25"
version = "0.1.26"
dependencies = [
"chrono",
"serde",

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-agent"
version = "0.1.26"
version = "0.1.27"
edition = "2021"
[dependencies]

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard"
version = "0.1.26"
version = "0.1.27"
edition = "2021"
[dependencies]

View File

@ -14,7 +14,7 @@ use app::Dashboard;
/// Get hardcoded version
fn get_version() -> &'static str {
"v0.1.26"
"v0.1.27"
}
/// Check if running inside tmux session

View File

@ -551,20 +551,12 @@ impl ServicesWidget {
let (service_info, is_last) = sub_info.as_ref().unwrap();
self.create_sub_service_spans_with_transitions(line_text, service_info, *is_last, pending_transitions)
} else {
// Parent services - check if this parent service has a pending transition
if pending_transitions.contains_key(line_text) {
// Create spans with transitional status
let (icon, status_text, status_color) = self.get_service_icon_and_status(line_text, &ServiceInfo {
status: "".to_string(),
memory_mb: None,
disk_gb: None,
latency_ms: None,
widget_status: *line_status
}, pending_transitions);
// Parent services - TEMPORARY DEBUG: always show arrow for testing
if line_text == "sshd" {
vec![
ratatui::text::Span::styled(format!("{} ", icon), Style::default().fg(status_color)),
ratatui::text::Span::styled("".to_string(), Style::default().fg(Theme::highlight())),
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(" starting".to_string(), Style::default().fg(Theme::highlight())),
]
} else {
StatusIcons::create_status_spans(*line_status, line_text)

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-shared"
version = "0.1.26"
version = "0.1.27"
edition = "2021"
[dependencies]