From 5b07f078513d66ca87e76e19053cfd6ea1731340 Mon Sep 17 00:00:00 2001 From: Mariano Blua Date: Sat, 17 Oct 2026 23:18:35 -0300 Subject: [PATCH] feat(config): add inert id hash debug slots (#3098) --- src-tauri/src/agent_update.rs | 2 ++ src-tauri/src/cli/coding_agent.rs | 2 ++ src-tauri/src/cli/create_agent.rs | 1 + src-tauri/src/cli/self_switch.rs | 3 +++ src-tauri/src/commands/ac_discovery.rs | 2 ++ src-tauri/src/commands/config.rs | 6 ++++++ src-tauri/src/commands/entity_creation.rs | 1 + src-tauri/src/commands/session.rs | 16 ++++++++++++++++ src-tauri/src/config/agent_command.rs | 11 +++++++++++ src-tauri/src/config/agent_config.rs | 1 + src-tauri/src/config/coding_agent_mutations.rs | 1 + src-tauri/src/config/coding_agent_profiles.rs | 2 ++ src-tauri/src/config/settings.rs | 17 +++++++++++++++++ src-tauri/src/lib.rs | 1 + src-tauri/src/loops/delivery.rs | 3 +++ src-tauri/src/phone/mailbox.rs | 2 ++ src-tauri/src/pty/menu_guard/mod.rs | 1 + src-tauri/src/web/commands.rs | 1 + .../tests/pty_powershell_managed_native.rs | 1 + 19 files changed, 74 insertions(+) diff --git a/src-tauri/src/agent_update.rs b/src-tauri/src/agent_update.rs index 2fe73229d..0a5e86493 100644 --- a/src-tauri/src/agent_update.rs +++ b/src-tauri/src/agent_update.rs @@ -6429,6 +6429,7 @@ mod tests { preflight_timeout_seconds: None, id: "agent-0".to_string(), id_hash: None, + id_hash_debug: None, label: "Bob".to_string(), command: "bob-1551-missing".to_string(), color: "#000000".to_string(), @@ -6533,6 +6534,7 @@ mod tests { preflight_timeout_seconds: None, id: "agent-0".to_string(), id_hash: None, + id_hash_debug: None, label: "Bob".to_string(), command: "bob-1551-missing".to_string(), color: "#000000".to_string(), diff --git a/src-tauri/src/cli/coding_agent.rs b/src-tauri/src/cli/coding_agent.rs index 0cd40c3a4..acd703a35 100644 --- a/src-tauri/src/cli/coding_agent.rs +++ b/src-tauri/src/cli/coding_agent.rs @@ -578,6 +578,7 @@ fn blank_agent() -> AgentConfig { preflight_timeout_seconds: None, id: String::new(), id_hash: None, + id_hash_debug: None, label: String::new(), command: String::new(), color: DEFAULT_CUSTOM_COLOR.to_string(), @@ -602,6 +603,7 @@ fn definition_to_agent_seed(def: &CodingAgentDefinition) -> AgentConfig { preflight_timeout_seconds: None, id: String::new(), id_hash: None, + id_hash_debug: None, label: def.label.clone(), command: def.command.clone(), color: def.color.clone(), diff --git a/src-tauri/src/cli/create_agent.rs b/src-tauri/src/cli/create_agent.rs index 24ab5d74e..d7ab3e303 100644 --- a/src-tauri/src/cli/create_agent.rs +++ b/src-tauri/src/cli/create_agent.rs @@ -275,6 +275,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: label.to_string(), command: command.to_string(), color: "#000000".to_string(), diff --git a/src-tauri/src/cli/self_switch.rs b/src-tauri/src/cli/self_switch.rs index e901f2188..74d07237a 100644 --- a/src-tauri/src/cli/self_switch.rs +++ b/src-tauri/src/cli/self_switch.rs @@ -500,6 +500,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: label.to_string(), command: command.to_string(), color: "#000000".to_string(), @@ -517,6 +518,7 @@ mod tests { fn enabled_cell(command: &str) -> crate::config::settings::ProfileCellConfig { crate::config::settings::ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -529,6 +531,7 @@ mod tests { fn disabled_cell(command: &str) -> crate::config::settings::ProfileCellConfig { crate::config::settings::ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: false, diff --git a/src-tauri/src/commands/ac_discovery.rs b/src-tauri/src/commands/ac_discovery.rs index 4ffb3bc41..bff143db3 100644 --- a/src-tauri/src/commands/ac_discovery.rs +++ b/src-tauri/src/commands/ac_discovery.rs @@ -6943,6 +6943,7 @@ mod tests { preflight_timeout_seconds: None, id: "codex".to_string(), id_hash: None, + id_hash_debug: None, label: "Codex".to_string(), command: "codex".to_string(), color: "#000000".to_string(), @@ -7227,6 +7228,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: label.to_string(), command: command.to_string(), color: "#000000".to_string(), diff --git a/src-tauri/src/commands/config.rs b/src-tauri/src/commands/config.rs index 4b43a7522..53d56110c 100644 --- a/src-tauri/src/commands/config.rs +++ b/src-tauri/src/commands/config.rs @@ -5411,6 +5411,7 @@ mod tests { preflight_timeout_seconds: None, id: "agent-0".to_string(), id_hash: None, + id_hash_debug: None, label: "Codex".to_string(), command: "codex".to_string(), color: "#000000".to_string(), @@ -7480,6 +7481,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -7519,6 +7521,7 @@ mod tests { "B".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -7547,6 +7550,7 @@ mod tests { "C".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -7666,6 +7670,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: format!("{id}-label"), command: format!("{id}-cmd"), color: "#000000".to_string(), @@ -9118,6 +9123,7 @@ mod tests { "B".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, diff --git a/src-tauri/src/commands/entity_creation.rs b/src-tauri/src/commands/entity_creation.rs index ea7ff464b..6e4f46e30 100644 --- a/src-tauri/src/commands/entity_creation.rs +++ b/src-tauri/src/commands/entity_creation.rs @@ -7728,6 +7728,7 @@ mod tests { fn profile_cell(command: &str) -> crate::config::settings::ProfileCellConfig { crate::config::settings::ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, diff --git a/src-tauri/src/commands/session.rs b/src-tauri/src/commands/session.rs index 6fca1fbf2..2a7ecdb4d 100644 --- a/src-tauri/src/commands/session.rs +++ b/src-tauri/src/commands/session.rs @@ -6892,6 +6892,7 @@ mod tests { preflight_timeout_seconds: None, id: "claude".to_string(), id_hash: None, + id_hash_debug: None, label: "Claude Code".to_string(), command: "claude".to_string(), color: "#d97706".to_string(), @@ -6909,6 +6910,7 @@ mod tests { preflight_timeout_seconds: None, id: "codex".to_string(), id_hash: None, + id_hash_debug: None, label: "Codex".to_string(), command: "codex".to_string(), color: "#10b981".to_string(), @@ -7146,6 +7148,7 @@ mod tests { preflight_timeout_seconds: None, id: "pi".to_string(), id_hash: None, + id_hash_debug: None, label: "Pi".to_string(), command: "pi".to_string(), color: "#10b981".to_string(), @@ -7206,6 +7209,7 @@ mod tests { preflight_timeout_seconds: None, id: "pi".to_string(), id_hash: None, + id_hash_debug: None, label: "Pi".to_string(), command: "pi".to_string(), color: "#10b981".to_string(), @@ -11302,6 +11306,7 @@ mod tests { "C".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -11386,6 +11391,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -11441,6 +11447,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -11869,6 +11876,7 @@ mod tests { preflight_timeout_seconds: None, id: "unrelated-cmd".to_string(), id_hash: None, + id_hash_debug: None, label: "Unrelated cmd recipe".to_string(), command: "cmd".to_string(), color: "#000000".to_string(), @@ -12163,6 +12171,7 @@ mod tests { preflight_timeout_seconds: None, id: "codex-yolo".to_string(), id_hash: None, + id_hash_debug: None, label: "Codex Yolo".to_string(), command: "codex --yolo".to_string(), color: "#10b981".to_string(), @@ -12247,6 +12256,7 @@ mod tests { preflight_timeout_seconds: None, id: "broken-codex".to_string(), id_hash: None, + id_hash_debug: None, label: "Broken Codex".to_string(), command: "codex \"unterminated".to_string(), color: "#10b981".to_string(), @@ -13540,6 +13550,7 @@ exec claude \"$@\" preflight_timeout_seconds: None, id: "muse".to_string(), id_hash: None, + id_hash_debug: None, label: "Muse Code".to_string(), command: command.to_string(), color: "#0668E1".to_string(), @@ -13980,6 +13991,7 @@ exec claude \"$@\" "A".to_string(), crate::config::settings::ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -15624,6 +15636,7 @@ exec claude \"$@\" preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: label.to_string(), command: command.to_string(), color: "#10b981".to_string(), @@ -15654,6 +15667,7 @@ exec claude \"$@\" letter.to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -16320,6 +16334,7 @@ exec claude \"$@\" preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: command.to_string(), color: "#10b981".to_string(), @@ -16334,6 +16349,7 @@ exec claude \"$@\" }; let cell = |enabled: bool, command: &str| ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled, diff --git a/src-tauri/src/config/agent_command.rs b/src-tauri/src/config/agent_command.rs index 9195635ff..0ca9792bf 100644 --- a/src-tauri/src/config/agent_command.rs +++ b/src-tauri/src/config/agent_command.rs @@ -1584,6 +1584,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: command.to_string(), color: "#000000".to_string(), @@ -1730,6 +1731,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -1801,6 +1803,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -1851,6 +1854,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -1926,6 +1930,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -1991,6 +1996,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -2554,6 +2560,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -2638,6 +2645,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -2689,6 +2697,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -2962,6 +2971,7 @@ mod tests { fn cell(command: &str, env: BTreeMap) -> ProfileCellConfig { ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -3479,6 +3489,7 @@ exit 0 letter.to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: *enabled, diff --git a/src-tauri/src/config/agent_config.rs b/src-tauri/src/config/agent_config.rs index eab86c975..7f88d7bc5 100644 --- a/src-tauri/src/config/agent_config.rs +++ b/src-tauri/src/config/agent_config.rs @@ -1002,6 +1002,7 @@ pub(crate) mod load_probe_harness { preflight_timeout_seconds: None, id: format!("via-{command}"), id_hash: None, + id_hash_debug: None, label: format!("label-{command}"), command: command.to_string(), color: "#000000".to_string(), diff --git a/src-tauri/src/config/coding_agent_mutations.rs b/src-tauri/src/config/coding_agent_mutations.rs index 4de41f6e3..33c1f468d 100644 --- a/src-tauri/src/config/coding_agent_mutations.rs +++ b/src-tauri/src/config/coding_agent_mutations.rs @@ -1716,6 +1716,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: label.to_string(), command: command.to_string(), color: "#6366f1".to_string(), diff --git a/src-tauri/src/config/coding_agent_profiles.rs b/src-tauri/src/config/coding_agent_profiles.rs index e21b8e3e3..7d7882f5d 100644 --- a/src-tauri/src/config/coding_agent_profiles.rs +++ b/src-tauri/src/config/coding_agent_profiles.rs @@ -1988,6 +1988,7 @@ mod tests { (*letter).to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -2158,6 +2159,7 @@ mod tests { preflight_timeout_seconds: None, id: "codex".to_string(), id_hash: None, + id_hash_debug: None, label: "Codex".to_string(), command: "codex".to_string(), color: "#000000".to_string(), diff --git a/src-tauri/src/config/settings.rs b/src-tauri/src/config/settings.rs index 1486a3a83..e2b977c6a 100644 --- a/src-tauri/src/config/settings.rs +++ b/src-tauri/src/config/settings.rs @@ -444,6 +444,8 @@ pub struct AgentConfig { )] // Base-command legacy metadata; profile-cell id_hash identifies a command/profile pair. pub id_hash: Option, + #[serde(skip)] + pub id_hash_debug: Option>, pub label: String, #[serde(rename = "baseCommand")] pub command: String, @@ -573,6 +575,7 @@ impl<'de> Deserialize<'de> for AgentConfig { Ok(Self { id: wire.id, id_hash: wire.id_hash, + id_hash_debug: None, label: wire.label, command, preflight: wire.preflight, @@ -779,6 +782,8 @@ pub struct ProfileSlotConfig { pub struct ProfileCellConfig { #[serde(default, rename = "id_hash", skip_serializing_if = "Option::is_none")] pub id_hash: Option, + #[serde(skip)] + pub id_hash_debug: Option>, #[serde(default = "default_true")] pub enabled: bool, #[serde(default)] @@ -840,6 +845,7 @@ impl<'de> Deserialize<'de> for ProfileCellConfig { .to_owned(); Ok(Self { id_hash: wire.id_hash, + id_hash_debug: None, enabled: wire.enabled, command, preflight: wire.preflight, @@ -9072,6 +9078,7 @@ fn capture_project_settings_with_startup( pub fn empty_profile_cell() -> ProfileCellConfig { ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -19806,6 +19813,7 @@ mod tests { preflight_timeout_seconds: None, id: format!("agent-{idx}"), id_hash: None, + id_hash_debug: None, label: (*label).to_string(), command: (*command).to_string(), color: "#000000".to_string(), @@ -19911,6 +19919,7 @@ mod tests { preflight_timeout_seconds: None, id: "claude".to_string(), id_hash: None, + id_hash_debug: None, label: "Claude".to_string(), command: "claude".to_string(), color: "#fff".to_string(), @@ -20708,6 +20717,7 @@ mod tests { "B".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -20768,6 +20778,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -20798,6 +20809,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -20864,6 +20876,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -20909,6 +20922,7 @@ mod tests { "A".to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, @@ -23454,6 +23468,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: command.to_string(), color: "#000000".to_string(), @@ -23740,6 +23755,7 @@ mod tests { fn cell(command: &str) -> ProfileCellConfig { ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, command: command.to_string(), @@ -27103,6 +27119,7 @@ mod tests { preflight_timeout_seconds: None, id: "grok-1".to_string(), id_hash: None, + id_hash_debug: None, label: "grok-1".to_string(), command: "grok".to_string(), color: "#000000".to_string(), diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index bac66e092..5c82f71e3 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -8597,6 +8597,7 @@ mod tests { preflight_timeout_seconds: None, id: "codex".to_string(), id_hash: None, + id_hash_debug: None, label: "Codex".to_string(), command: "codex".to_string(), color: "#10b981".to_string(), diff --git a/src-tauri/src/loops/delivery.rs b/src-tauri/src/loops/delivery.rs index ee47fdf9a..a2064afcb 100644 --- a/src-tauri/src/loops/delivery.rs +++ b/src-tauri/src/loops/delivery.rs @@ -943,6 +943,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: command.to_string(), color: "#000000".to_string(), @@ -1142,6 +1143,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: command.to_string(), color: "#000000".to_string(), @@ -1182,6 +1184,7 @@ mod tests { letter.to_string(), ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: true, diff --git a/src-tauri/src/phone/mailbox.rs b/src-tauri/src/phone/mailbox.rs index 9cdde71c1..2a5cfe1a5 100644 --- a/src-tauri/src/phone/mailbox.rs +++ b/src-tauri/src/phone/mailbox.rs @@ -15264,6 +15264,7 @@ mod tests { preflight_timeout_seconds: None, id: id.into(), id_hash: None, + id_hash_debug: None, label: label.into(), command: command.into(), color: "#10b981".into(), @@ -27475,6 +27476,7 @@ mod tests { (*letter).to_string(), crate::config::settings::ProfileCellConfig { id_hash: None, + id_hash_debug: None, preflight: None, preflight_timeout_seconds: None, enabled: *enabled, diff --git a/src-tauri/src/pty/menu_guard/mod.rs b/src-tauri/src/pty/menu_guard/mod.rs index 33ee2d013..cde009e26 100644 --- a/src-tauri/src/pty/menu_guard/mod.rs +++ b/src-tauri/src/pty/menu_guard/mod.rs @@ -687,6 +687,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: command.to_string(), color: "#000000".to_string(), diff --git a/src-tauri/src/web/commands.rs b/src-tauri/src/web/commands.rs index facfd5234..6bb703e81 100644 --- a/src-tauri/src/web/commands.rs +++ b/src-tauri/src/web/commands.rs @@ -1652,6 +1652,7 @@ mod tests { preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: id.to_string(), color: "#10b981".to_string(), diff --git a/src-tauri/tests/pty_powershell_managed_native.rs b/src-tauri/tests/pty_powershell_managed_native.rs index 87edd5404..561499128 100644 --- a/src-tauri/tests/pty_powershell_managed_native.rs +++ b/src-tauri/tests/pty_powershell_managed_native.rs @@ -438,6 +438,7 @@ fn agent_config(id: &str, command: &str) -> agentscommander_lib::config::setting preflight_timeout_seconds: None, id: id.to_string(), id_hash: None, + id_hash_debug: None, label: id.to_string(), command: command.to_string(), color: "#10b981".to_string(),