diff --git a/apps/desktop/src-tauri/src/tray.rs b/apps/desktop/src-tauri/src/tray.rs index 35521a9ee..812f14006 100644 --- a/apps/desktop/src-tauri/src/tray.rs +++ b/apps/desktop/src-tauri/src/tray.rs @@ -36,6 +36,7 @@ const TRAY_QUIT_ID: &str = "tray:quit"; const MACOS_TRAY_TEMPLATE_ICON: tauri::image::Image<'_> = tauri::include_image!("./icons/tray-template-macos.png"); +#[cfg_attr(not(target_os = "macos"), allow(dead_code))] fn use_template_icon_for_tray() -> bool { cfg!(target_os = "macos") } @@ -321,12 +322,14 @@ fn absolute_route_for_menu_id(id: &str) -> Option<&'static str> { } } +#[cfg_attr(not(target_os = "macos"), allow(dead_code))] fn handle_tray_icon_event(app: &AppHandle, event: &TrayIconEvent) { if should_open_main_window_for_tray_event(event) { show_main_window(app); } } +#[cfg_attr(not(target_os = "macos"), allow(dead_code))] fn should_open_main_window_for_tray_event(event: &TrayIconEvent) -> bool { matches!( event, diff --git a/crates/routa-core/src/rpc/methods/kanban/automation.rs b/crates/routa-core/src/rpc/methods/kanban/automation.rs index a7542ac8c..2e5486082 100644 --- a/crates/routa-core/src/rpc/methods/kanban/automation.rs +++ b/crates/routa-core/src/rpc/methods/kanban/automation.rs @@ -111,7 +111,6 @@ pub(super) fn ensure_required_task_fields_present( fn normalize_gate_token(value: &str) -> String { value - .trim() .split_whitespace() .collect::>() .join(" ") diff --git a/src/core/kanban/transition-gates.ts b/src/core/kanban/transition-gates.ts index ed7832cfa..587f630c8 100644 --- a/src/core/kanban/transition-gates.ts +++ b/src/core/kanban/transition-gates.ts @@ -81,7 +81,15 @@ export function evaluateKanbanTransitionGates( targetColumn: Pick | undefined, ): KanbanTransitionGateResult { const automation = targetColumn?.automation; - if (!automation?.enabled) { + const hasGateConfig = Boolean( + automation?.gateMode + || (automation?.requiredChecklist?.length ?? 0) > 0 + || automation?.requiredHumanApproval + || automation?.validatorCommand?.trim(), + ); + const gateEnabled = automation?.enabled ?? hasGateConfig; + + if (!gateEnabled) { return { mode: "blocking", passed: true, @@ -89,7 +97,7 @@ export function evaluateKanbanTransitionGates( issues: [], }; } - const mode = automation.gateMode === "warning" ? "warning" : "blocking"; + const mode = automation?.gateMode === "warning" ? "warning" : "blocking"; const issues: KanbanTransitionGateIssue[] = []; const requiredChecklist = (automation?.requiredChecklist ?? [])