From 7ae63e086b866f235c6cc55d0356d0a03c9fc2cd Mon Sep 17 00:00:00 2001 From: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Date: Wed, 12 Aug 2026 06:34:34 +0000 Subject: [PATCH 1/2] fix: order ui accent before nested config tables refs #2697 --- src/main.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4d915158d3..0f71fb080f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -356,6 +356,10 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration # distinct static glyphs for blocked, working, done, idle, and unknown states. # status_indicators = "dots" +# Accent color for highlights, borders, and navigation UI. +# Accepts: hex (#89b4fa), named colors (cyan, blue, magenta), or rgb(r,g,b) +# accent = "cyan" + # Expanded agent rows. Built-ins are state_icon, state_text, workspace, tab, pane, agent, # terminal_title, and terminal_title_stripped. # Custom values reported through pane metadata use a $name token. @@ -377,10 +381,6 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration # row_gap = 0 # rows = [["state_icon", "workspace"], ["branch", "git_status"]] -# Accent color for highlights, borders, and navigation UI. -# Accepts: hex (#89b4fa), named colors (cyan, blue, magenta), or rgb(r,g,b) -# accent = "cyan" - # Background notification popup delivery [ui.toast] # off = disable pop-up notifications @@ -924,6 +924,14 @@ fn main() -> io::Result<()> { mod tests { use super::*; + #[test] + fn default_config_lists_ui_accent_before_nested_tables() { + let accent = DEFAULT_CONFIG.find("# accent = \"cyan\"").unwrap(); + let sidebar = DEFAULT_CONFIG.find("# [ui.sidebar.agents]").unwrap(); + + assert!(accent < sidebar); + } + #[test] fn nested_herdr_blocks_when_env_is_set() { let config = config::Config::default(); From dfb0ca112795369805f2007505b3d94c8f11e97c Mon Sep 17 00:00:00 2001 From: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Date: Wed, 12 Aug 2026 06:41:13 +0000 Subject: [PATCH 2/2] test: reject duplicate ui accent examples refs #2697 --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0f71fb080f..6cfdf4112d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -926,7 +926,10 @@ mod tests { #[test] fn default_config_lists_ui_accent_before_nested_tables() { - let accent = DEFAULT_CONFIG.find("# accent = \"cyan\"").unwrap(); + let accent_marker = "# accent = \"cyan\""; + assert_eq!(DEFAULT_CONFIG.matches(accent_marker).count(), 1); + + let accent = DEFAULT_CONFIG.find(accent_marker).unwrap(); let sidebar = DEFAULT_CONFIG.find("# [ui.sidebar.agents]").unwrap(); assert!(accent < sidebar);