From 911f4d9265b5849f7df5a4d8cc14c4d2c7f7df1c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 18 Nov 2026 15:41:35 -0800 Subject: [PATCH] improvement(computer-use): name the activation step when an element refuses an advertised action --- apps/desktop/native/computer-use/ComputerUse.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/desktop/native/computer-use/ComputerUse.swift b/apps/desktop/native/computer-use/ComputerUse.swift index d969705077a..907084daef8 100644 --- a/apps/desktop/native/computer-use/ComputerUse.swift +++ b/apps/desktop/native/computer-use/ComputerUse.swift @@ -69,7 +69,8 @@ func performAXAction(_ element: AXUIElement, _ action: String, press: Bool = fal return result } } catch where refused { - throw ComputerError("unsupported_action", "The element refused this action although it advertises it. Use another of its actions or click it instead (clickCount 2 opens most files and folders).") + // The fallback click needs the app in front, so the activation step comes first. + throw ComputerError("unsupported_action", "The element refused this action although it advertises it. Use another of its actions, or call activate_app for this app and then click it (clickCount 2 opens most files and folders).") } } /// Some apps (Calendar on macOS 26) answer AXPress on a menu item by opening its menu with the item