Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(cu): make proactive zoom-before-click the default (no opt-in)

Ruben Lütkef3d27126b178
diff --git a/jarvis/core/config.py b/jarvis/core/config.py
index 8955faf408..333b33a58f 100644
--- a/jarvis/core/config.py
+++ b/jarvis/core/config.py
@@ -1379,15 +1379,15 @@ class ComputerUseConfig(BaseModel):
# screenshot_only_loop.py).
fast_step_model: str = Field(default="")
verify_after_each_step: bool = True
- # Proactively zoom-refine each click target BEFORE clicking (default OFF).
- # When on AND the click action carries a `target`, the loop grabs a live
- # zoomed crop around the coarse point, re-locates the target inside it, and
- # only then clicks — and REFUSES to click (re-plans) when the target is not
- # in the crop, catching wrong-element clicks the pixel-diff verify accepts.
- # Internal screenshot crop only: nothing is shown on screen. Costs one extra
- # model call per targeted click, so it stays opt-in to protect the default
- # latency profile.
- zoom_before_click: bool = False
+ # Proactively zoom-refine each click target BEFORE clicking (default ON, so
+ # Computer-Use is accurate out-of-the-box with no opt-in). When the click
+ # action carries a `target`, the loop grabs a live zoomed crop around the
+ # coarse point, re-locates the target inside it, and only then clicks — and
+ # REFUSES to click (re-plans) when the target is not in the crop, catching
+ # wrong-element clicks the pixel-diff verify accepts. Internal screenshot
+ # crop only: nothing is shown on screen. Costs one extra model call per
+ # targeted click; set false to prioritize click latency over accuracy.
+ zoom_before_click: bool = True
# Spoken per-step milestones ("Schritt N von M erledigt."). Default OFF
# (2026-06-10): the milestone counter tracks successful actions, not
# verified plan steps, so it announced "6 von 6 erledigt" on a mission
diff --git a/jarvis/harness/computer_use_context.py b/jarvis/harness/computer_use_context.py
index ed32517675..5cc10aa023 100644
--- a/jarvis/harness/computer_use_context.py
+++ b/jarvis/harness/computer_use_context.py
@@ -46,10 +46,10 @@ class ComputerUseContext:
fast_step_model: str = "" # L9: cheaper model id for trivial steps ("" = off)
plan_model_override: str | None = None
verify_after_each_step: bool = True
- # Proactive zoom-before-click (opt-in, default OFF). See
+ # Proactive zoom-before-click (default ON). See
# ComputerUseConfig.zoom_before_click. Internal screenshot crop only —
# nothing renders on screen.
- zoom_before_click: bool = False
+ zoom_before_click: bool = True
max_replans: int = 2 # from ADR-0008; configurable
# Spoken per-step milestones ("Schritt N von M erledigt."). OFF by default
# (2026-06-10): the counter counts successful ACTIONS, not verified plan
diff --git a/tests/unit/harness/test_cu_zoom_before_click_config.py b/tests/unit/harness/test_cu_zoom_before_click_config.py
index f03ef342f5..7b9a4ccd8f 100644
--- a/tests/unit/harness/test_cu_zoom_before_click_config.py
+++ b/tests/unit/harness/test_cu_zoom_before_click_config.py
@@ -1,4 +1,4 @@
-"""Plumbing tests for the opt-in [computer_use].zoom_before_click flag."""
+"""Plumbing tests for the [computer_use].zoom_before_click flag (default ON)."""
from __future__ import annotations
from jarvis.core.config import ComputerUseConfig
@@ -8,19 +8,23 @@ from jarvis.harness.computer_use_context import (
)
-def test_config_zoom_before_click_defaults_off() -> None:
- assert ComputerUseConfig().zoom_before_click is False
+def test_config_zoom_before_click_defaults_on() -> None:
+ # Default ON: Computer-Use clicks are accurate out-of-the-box with no
+ # opt-in. The model_fields check guards against the field being silently
+ # absorbed as an extra under the model's extra="allow".
+ assert "zoom_before_click" in ComputerUseConfig.model_fields
+ assert ComputerUseConfig().zoom_before_click is True
-def test_config_zoom_before_click_parses_true() -> None:
- assert ComputerUseConfig(zoom_before_click=True).zoom_before_click is True
+def test_config_zoom_before_click_can_be_disabled() -> None:
+ assert ComputerUseConfig(zoom_before_click=False).zoom_before_click is False
-def test_context_zoom_before_click_defaults_off() -> None:
+def test_context_zoom_before_click_defaults_on() -> None:
ctx = ComputerUseContext(
vision_engine=None, brain_manager=None, tool_executor=None,
)
- assert ctx.zoom_before_click is False
+ assert ctx.zoom_before_click is True
def test_zoom_before_click_is_hot_reloadable() -> None: