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.

fix(cli): ship top-level ui so installed --orb-doctor imports (#1008)

Ruben Lütked395e64bc39e
diff --git a/setup.py b/setup.py
index d9b56b25b0..2fc863623b 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,12 @@ LEGACY_PACKAGE_DIR = "dodaios/_legacy_alias"
#: ``dodaios conductor`` commands. Left out, it imported only when the app ran
#: with the checkout as its working directory (run.bat), so the console script,
#: autostart and every wheel install served no Conductor API at all.
-INCLUDE = ("dodaios*", "conductor*")
+#:
+#: ``ui`` is the top-level Tk orb overlay package (``ui.orb``). ``--orb-doctor``
+#: and the desktop overlay import it as ``ui.orb…``. Without it in the list,
+#: an installed console script raises ``ModuleNotFoundError: No module named
+#: 'ui'`` while the same command works from a checkout (issue #457).
+INCLUDE = ("dodaios*", "conductor*", "ui*")
EXCLUDE = ("*.__pycache__", "*.__pycache__.*", "dodaios._legacy_alias")
diff --git a/tests/unit/packaging/test_ui_orb_packaging.py b/tests/unit/packaging/test_ui_orb_packaging.py
new file mode 100644
index 0000000000..bc9b2a9244
--- /dev/null
+++ b/tests/unit/packaging/test_ui_orb_packaging.py
@@ -0,0 +1,32 @@
+"""Top-level ``ui`` (orb overlay) ships in the distribution.
+
+``--orb-doctor`` and the desktop overlay import ``ui.orb…``. When ``ui`` was
+missing from setup.py's package list, the installed console script raised
+``ModuleNotFoundError: No module named 'ui'`` while the same command worked
+from a checkout (issue #457). The list lives in setup.py.
+"""
+
+from __future__ import annotations
+
+import importlib.util
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[3]
+
+
+def _setup_script(): # noqa: ANN202
+ """setup.py loaded as a module; its ``setup()`` call runs only as a script."""
+ spec = importlib.util.spec_from_file_location("project_setup_script", ROOT / "setup.py")
+ assert spec is not None and spec.loader is not None
+ module = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(module)
+ return module
+
+
+def test_ui_orb_packages_are_distributed() -> None:
+ packages = set(_setup_script().packages(str(ROOT)))
+ assert {"ui", "ui.orb"} <= packages
+
+
+def test_orb_doctor_module_is_present_on_disk() -> None:
+ assert (ROOT / "ui" / "orb" / "drag_persistence.py").is_file()