From cc9fa47540d8525f24fe46a10f759ca40090a6e0 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Tue, 4 Aug 2026 17:26:30 +0300 Subject: feat(ui): add distinct status indicators (#2282) refs #2260 --- src/config/model.rs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/config') diff --git a/src/config/model.rs b/src/config/model.rs index e56ac087..97b8c7fa 100644 --- a/src/config/model.rs +++ b/src/config/model.rs @@ -106,6 +106,23 @@ impl AgentPanelSortConfig { } } +#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize, Default)] +#[serde(rename_all = "lowercase")] +pub enum StatusIndicatorStyle { + #[default] + Dots, + Symbols, +} + +impl StatusIndicatorStyle { + pub fn as_str(self) -> &'static str { + match self { + Self::Dots => "dots", + Self::Symbols => "symbols", + } + } +} + #[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Deserialize, Serialize)] #[serde(rename_all = "lowercase")] pub enum HostCursorModeConfig { @@ -826,6 +843,8 @@ pub struct UiConfig { pub tab_bar_position: TabBarPositionConfig, /// Agent sidebar ordering. Saved values are "spaces" or "priority". Default: "spaces". pub agent_panel_sort: AgentPanelSortConfig, + /// Agent status indicator style. Saved values are "dots" or "symbols". Default: "dots". + pub status_indicators: StatusIndicatorStyle, /// Expanded sidebar row composition. pub sidebar: SidebarConfig, /// Accent color for highlights, borders, and navigation UI. @@ -1029,6 +1048,7 @@ impl Default for UiConfig { hide_tab_bar_when_single_tab: false, tab_bar_position: TabBarPositionConfig::Top, agent_panel_sort: AgentPanelSortConfig::Spaces, + status_indicators: StatusIndicatorStyle::Dots, sidebar: SidebarConfig::default(), accent: "cyan".into(), toast: ToastConfig::default(), @@ -1252,6 +1272,23 @@ agent_panel_scope = "current" assert_eq!(config.ui.agent_panel_sort, AgentPanelSortConfig::Spaces); } + #[test] + fn status_indicator_style_defaults_to_dots_and_parses_symbols() { + assert_eq!( + Config::default().ui.status_indicators, + StatusIndicatorStyle::Dots + ); + + let config: Config = toml::from_str( + r#" +[ui] +status_indicators = "symbols" +"#, + ) + .unwrap(); + assert_eq!(config.ui.status_indicators, StatusIndicatorStyle::Symbols); + } + #[test] fn pane_appearance_defaults_and_parse() { let default_config = Config::default(); -- cgit v1.2.3