Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/desktop/src-tauri/src/tray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion crates/routa-core/src/rpc/methods/kanban/automation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ pub(super) fn ensure_required_task_fields_present(

fn normalize_gate_token(value: &str) -> String {
value
.trim()
.split_whitespace()
.collect::<Vec<_>>()
.join(" ")
Expand Down
12 changes: 10 additions & 2 deletions src/core/kanban/transition-gates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,23 @@ export function evaluateKanbanTransitionGates(
targetColumn: Pick<KanbanColumn, "id" | "name" | "automation"> | 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,
blocking: false,
issues: [],
};
}
const mode = automation.gateMode === "warning" ? "warning" : "blocking";
const mode = automation?.gateMode === "warning" ? "warning" : "blocking";
const issues: KanbanTransitionGateIssue[] = [];

const requiredChecklist = (automation?.requiredChecklist ?? [])
Expand Down