aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-09-13 15:50:29 +0300
committerGitHub <noreply@github.com>2026-09-13 14:50:29 +0200
commitf48cd6a76821649afd0ba791b0586d30b5a7b877 (patch)
tree8804588086abb56e0cdd5e06bce82c23eb331efd /src
parentfc44f61a10ac04688b2fedfa670f38a463ca25ac (diff)
fix: order ui accent before nested config tables (#2698)
* fix: order ui accent before nested config tables refs #2697 * test: reject duplicate ui accent examples refs #2697 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/main.rs19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 87f3ce0a..12711f3a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -333,6 +333,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, machine, workspace, tab,
# pane, agent, terminal_title, and terminal_title_stripped.
# Custom values reported through pane metadata use a $name token.
@@ -354,10 +358,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
@@ -798,6 +798,17 @@ mod tests {
use super::*;
#[test]
+ fn default_config_lists_ui_accent_before_nested_tables() {
+ 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);
+ }
+
+ #[test]
fn nested_herdr_blocks_when_env_is_set() {
let config = config::Config::default();
assert!(should_block_nested_for_env(&config, Some(HERDR_ENV_VALUE)));