mirror of
https://github.com/lahfir/agent-desktop.git
synced 2026-08-09 08:27:25 +00:00
type, set-value, select, scroll, hover, and drag were the only 6 of 18 ref-addressed commands without a --timeout-ms flag: their core Args structs hardcoded RefArgs.timeout_ms to None, so auto-wait retry (landed for click and friends) silently never applied to them. Add the paired clap/serde --timeout-ms default (5000, matching RefArgs) to TypeArgs/SetValueArgs/SelectArgs/ScrollArgs/HoverArgs/DragCliArgs and thread the normalized value through dispatch into the core command structs. hover/drag resolve coordinates rather than dispatching an action, so they gain a dedicated resolve-retry helper (helpers::resolve_point_with_wait) that retries a transient STALE_REF/AMBIGUOUS_TARGET/TIMEOUT within the same budget. Also fix ref_action_wait::execute_poll_loop double-checking actionability: it ran actionability::check_live itself and then handed off to dispatch (execute_resolved), which runs check_live again. A failure on that second, redundant check propagated via a bare `?` that bypassed the retry/permanent classification entirely, so a transient actionability flip between the two checks failed the action outright instead of retrying. The loop now calls dispatch directly per iteration and classifies whatever it returns, so there is exactly one check_live per attempt and every actionability failure goes through retry/permanent classification. Single-shot (timeout_ms: None) is unaffected — it already only checked once. Also drop the dead `timeout_ms: None` literal in execute_by_ref's ActionRequest construction (it was always overwritten by execute_ref_action_with_context) in favor of the actual normalized value, so the struct literal doesn't misrepresent what ships. |
||
|---|---|---|
| .. | ||
| batch | ||
| cli | ||
| cli_args | ||
| command_policy | ||
| dispatch | ||
| tests | ||
| Cargo.toml | ||
| main.rs | ||