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.

chore: auto-save WIP via Claude stop-hook safety net (2026-07-02 19:31)

Ruben Lütke39e3f9ab0f13
diff --git a/jarvis/vision/atspi_tree.py b/jarvis/vision/atspi_tree.py
index 607aa9008c..df96a8bf54 100644
--- a/jarvis/vision/atspi_tree.py
+++ b/jarvis/vision/atspi_tree.py
@@ -120,7 +120,18 @@ class AtspiTreeSource:
logger.warning(_ATSPI_BUS_MSG)
return self._empty_observation()
- monitor_bounds = self._monitor_bounds or (0, 0, 1920, 1080)
+ # On-screen filter scope: the X11 root geometry spans all monitors.
+ # The old hardcoded FullHD rect silently pruned every element right
+ # of x=1920 — even on a single 4K screen (2026-07-02 incident class).
+ monitor_bounds = self._monitor_bounds
+ if monitor_bounds is None:
+ from jarvis.platform import monitors as _monitors # noqa: PLC0415
+
+ monitor_bounds = await asyncio.to_thread(
+ _monitors.virtual_desktop_bounds,
+ )
+ if monitor_bounds is None:
+ monitor_bounds = (0, 0, 1920, 1080)
nodes_before = 0
depth_used = _DEPTH_RETRY_LADDER[0]
diff --git a/jarvis/vision/ax_tree.py b/jarvis/vision/ax_tree.py
index 1b5199ba72..85595408c1 100644
--- a/jarvis/vision/ax_tree.py
+++ b/jarvis/vision/ax_tree.py
@@ -113,9 +113,21 @@ class AXTreeSource:
logger.warning(_AX_PERMISSION_MSG)
return self._empty_observation()
- monitor_bounds = self._monitor_bounds or await asyncio.to_thread(
- self._detect_primary_monitor_bounds
- )
+ # On-screen filter scope: the union of ALL displays, never just the
+ # main one — a window on a secondary display must keep its AX tree
+ # (2026-07-02 incident class). Legacy main-display rect only as the
+ # last resort.
+ monitor_bounds = self._monitor_bounds
+ if monitor_bounds is None:
+ from jarvis.platform import monitors as _monitors # noqa: PLC0415
+
+ monitor_bounds = await asyncio.to_thread(
+ _monitors.virtual_desktop_bounds,
+ )
+ if monitor_bounds is None:
+ monitor_bounds = await asyncio.to_thread(
+ self._detect_primary_monitor_bounds
+ )
nodes_before = 0
depth_used = _DEPTH_RETRY_LADDER[0]