diff --git a/abx_plugins/plugins/claudecode/claudecode_utils.py b/abx_plugins/plugins/claudecode/claudecode_utils.py
index ca3a2b29..97f94466 100755
--- a/abx_plugins/plugins/claudecode/claudecode_utils.py
+++ b/abx_plugins/plugins/claudecode/claudecode_utils.py
@@ -165,7 +165,9 @@ def run_claude_code(
Returns: (stdout, stderr, returncode)
"""
config = load_config(Path(__file__).with_name("config.json"))
- binary = str(config.CLAUDECODE_BINARY)
+ binary = str(os.environ.get("CLAUDECODE_BINARY") or config.CLAUDECODE_BINARY)
+ if not Path(binary).exists():
+ return "", f"Claude Code binary not found: {binary}", 1
cmd = [binary]
diff --git a/abx_plugins/plugins/ytdlp/templates/card.html b/abx_plugins/plugins/ytdlp/templates/card.html
index 6fe32098..9238b877 100644
--- a/abx_plugins/plugins/ytdlp/templates/card.html
+++ b/abx_plugins/plugins/ytdlp/templates/card.html
@@ -1,13 +1,61 @@
{% if media_files %}
-
+
+
{% else %}
🎬
diff --git a/abx_plugins/plugins/ytdlp/tests/test_ytdlp.py b/abx_plugins/plugins/ytdlp/tests/test_ytdlp.py
index e7747808..726b41f8 100755
--- a/abx_plugins/plugins/ytdlp/tests/test_ytdlp.py
+++ b/abx_plugins/plugins/ytdlp/tests/test_ytdlp.py
@@ -124,6 +124,27 @@ def test_hook_script_exists():
assert YTDLP_HOOK.exists(), f"Hook not found: {YTDLP_HOOK}"
+def test_card_template_loads_browser_media_on_click():
+ """Card template should not fetch archived media until the user asks to play it."""
+ template = (PLUGIN_DIR / "templates" / "card.html").read_text()
+
+ assert "ytdlp-load-player" in template
+ assert 'data-src="{{ file.url|default:file.path|urlencode }}"' in template
+ assert "media.src = src" in template
+ assert "