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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(youtube-music): the player window carries a YouTube-Music-plus-Jarvis icon and names the service
rubenluetke10-beep9ce461618193
diff --git a/jarvis/assets/__init__.py b/jarvis/assets/__init__.pyindex fbf6291ba6..c0c786ed5a 100644--- a/jarvis/assets/__init__.py+++ b/jarvis/assets/__init__.py@@ -113,9 +113,27 @@ def bundled_app_icon_png() -> Path | None:return path if path.is_file() else None+_MUSIC_PLAYER_ICON_FILE = "music-player.ico"+++def bundled_music_player_icon() -> Path | None:+ """Return the absolute path to the background music player's window icon.++ The player is its own ``pythonw`` process (``jarvis.platform.music_player_host``),+ so without an icon of its own its title bar and taskbar button show the+ Python logo (maintainer, 2026-08-22: "a window with the Python logo — make+ it proper"). The icon is the YouTube Music mark with the Jarvis mascot as a+ badge, so the window reads as "YouTube Music, driven by Jarvis" at a+ glance. ``None`` only when the file is missing (partial checkout).+ """+ path = _ICONS_DIR / _MUSIC_PLAYER_ICON_FILE+ return path if path.is_file() else None++__all__ = ["bundled_wakeword_models","bundled_silero_vad_model","bundled_app_icon","bundled_app_icon_png",+ "bundled_music_player_icon",]diff --git a/jarvis/assets/icons/music-player.ico b/jarvis/assets/icons/music-player.iconew file mode 100644index 0000000000..bd68ed38f2Binary files /dev/null and b/jarvis/assets/icons/music-player.ico differdiff --git a/jarvis/platform/music_player.py b/jarvis/platform/music_player.pyindex 08f7ba6f53..1b15560aa6 100644--- a/jarvis/platform/music_player.py+++ b/jarvis/platform/music_player.py@@ -58,9 +58,31 @@ def _default_storage_dir() -> Path:def _default_title() -> str:+ """The window's title: the service first, then who drives it.++ "Personal Jarvis — Music" next to the interpreter's Python logo read as an+ anonymous pipe (maintainer, 2026-08-22); the title now names the service+ the window actually shows.+ """from jarvis.core.branding import PRODUCT_NAME- return f"{PRODUCT_NAME} — Music"+ return f"YouTube Music — {PRODUCT_NAME}"+++def _default_icon() -> str:+ """Absolute path of the player's window icon, or ``""`` when not bundled.++ Resolved from the package (``jarvis.assets``), never from the repo root, so+ a wheel install finds it too (the same lesson as ``bundled_app_icon``).+ """+ try:+ from jarvis.assets import bundled_music_player_icon++ path = bundled_music_player_icon()+ except Exception as exc: # noqa: BLE001 — an icon is a nicety, never a blocker+ log.debug("music player icon unresolved: %s", exc)+ return ""+ return str(path) if path is not None else ""def _default_spawn(argv: list[str]) -> Any:@@ -148,6 +170,9 @@ class MusicPlayer:storage = self._storage_dir or _default_storage_dir()title = self._title or _default_title()argv = [sys.executable, "-m", _HOST_MODULE, "--storage", str(storage), "--title", title]+ icon = _default_icon()+ if icon:+ argv += ["--icon", icon]try:self._proc = self._spawn(argv)except Exception as exc: # noqa: BLE001 — degrade to the browser, never raisediff --git a/jarvis/platform/music_player_host.py b/jarvis/platform/music_player_host.pyindex e4fa58ba0e..49b4007de6 100644--- a/jarvis/platform/music_player_host.py+++ b/jarvis/platform/music_player_host.py@@ -265,6 +265,14 @@ def main(argv: list[str] | None = None) -> int:parser = argparse.ArgumentParser(description="Background music player host")parser.add_argument("--storage", required=True, help="persistent browser profile dir")parser.add_argument("--title", default="Music", help="window title")+ parser.add_argument(+ "--icon",+ default="",+ help=(+ "window/taskbar icon file (.ico); without it the pythonw interpreter's "+ "own logo shows"+ ),+ )parser.add_argument("--start",choices=("minimized", "hidden", "offscreen", "visible"),@@ -346,7 +354,16 @@ def main(argv: list[str] | None = None) -> int:try:# pywebview runs ``func`` on its own worker thread once the GUI loop is up.- webview.start(func=_serve_then_quit, private_mode=False, storage_path=args.storage)+ # ``icon`` is honoured by the WinForms/GTK/Qt backends; a missing file+ # means the interpreter's default, which is exactly the Python logo the+ # parent passes an icon to avoid.+ icon = args.icon if args.icon and os.path.isfile(args.icon) else None+ webview.start(+ func=_serve_then_quit,+ private_mode=False,+ storage_path=args.storage,+ icon=icon,+ )except Exception as exc: # noqa: BLE001 — no GUI backend here (Linux without GTK/Qt)_emit({"event": "unavailable", "error": f"{type(exc).__name__}: {exc}"})return 2diff --git a/tests/unit/platform/test_music_player.py b/tests/unit/platform/test_music_player.pyindex 36ffc39a78..228852fb27 100644--- a/tests/unit/platform/test_music_player.py+++ b/tests/unit/platform/test_music_player.py@@ -208,6 +208,53 @@ def test_spawn_failure_degrades_instead_of_raising():player.load("x")+def test_argv_carries_the_window_icon_and_names_the_service():+ """Maintainer, 2026-08-22: the player window showed the Python logo and+ "Personal Jarvis — Music" — an anonymous pipe. The host now gets the+ bundled YouTube-Music-plus-Jarvis icon and a title that names the service."""+ from pathlib import Path++ from jarvis.assets import bundled_music_player_icon+ from jarvis.core.branding import PRODUCT_NAME++ seen: list[list[str]] = []++ def spawn(argv):+ seen.append(list(argv))+ return FakeHost()++ player = MusicPlayer(spawn=spawn, display_present=lambda: True, has_webview=lambda: True)+ assert player.start(timeout=1.0) is True+ argv = seen[0]+ assert argv[argv.index("--title") + 1] == f"YouTube Music — {PRODUCT_NAME}"+ icon = bundled_music_player_icon()+ assert icon is not None and icon.is_file(), "the player icon must ship in the package"+ assert argv[argv.index("--icon") + 1] == str(icon)+ # A real multi-size Windows icon, not a renamed PNG: the 256 px frame is+ # what the taskbar scales from, the 16 px one sits in the title bar.+ from PIL import Image++ with Image.open(icon) as ico:+ sizes = set(getattr(ico, "info", {}).get("sizes", set()))+ assert (256, 256) in sizes and (16, 16) in sizes+ assert Path(argv[argv.index("--icon") + 1]).suffix == ".ico"+++def test_argv_skips_the_icon_when_it_is_not_bundled(monkeypatch):+ from jarvis.platform import music_player as mp++ monkeypatch.setattr(mp, "_default_icon", lambda: "")+ seen: list[list[str]] = []++ def spawn(argv):+ seen.append(list(argv))+ return FakeHost()++ player = MusicPlayer(spawn=spawn, display_present=lambda: True, has_webview=lambda: True)+ assert player.start(timeout=1.0) is True+ assert "--icon" not in seen[0]++def test_argv_carries_storage_and_title():seen: list[list[str]] = []