Fix transitional service icons being overridden by selection highlighting
All checks were successful
Build and Release / build-and-release (push) Successful in 1m14s

- Prevent selection highlighting when service has pending transition
- Allow directional arrows (↑ ↓ ↻) to show through on selected services
- Fix core issue where selection styling was overwriting transitional icons
- Transitional icons now properly visible during service command execution

The selection highlighting logic now skips services with pending transitions,
ensuring that directional arrows are visible when executing service commands.
This commit is contained in:
Christoffer Martinsson 2025-10-28 14:22:40 +01:00
parent 71b9f93d7c
commit 651b801de3
6 changed files with 9 additions and 8 deletions

6
Cargo.lock generated
View File

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

View File

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

View File

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

View File

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

View File

@ -573,7 +573,8 @@ impl ServicesWidget {
// Apply selection highlighting to parent services only, preserving status icon color
// Only show selection when Services panel is focused
if is_selected && !*is_sub && is_focused {
// IMPORTANT: Don't override transitional icons that show pending commands
if is_selected && !*is_sub && is_focused && !pending_transitions.contains_key(line_text) {
for (i, span) in spans.iter_mut().enumerate() {
if i == 0 {
// First span is the status icon - preserve its color

View File

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