From 4379610d0672076ecfc74a8c6ab81614db3e732f Mon Sep 17 00:00:00 2001 From: operator-main Date: Sun, 4 Oct 2026 03:37:01 +0000 Subject: [PATCH] cmd_sidechat_create: verified working selectors\n\nDOM investigation found:\n- Switcher: [data-testid=hatch-chat-switcher-trigger] (idempotent)\n- Plus: [data-testid=hatch-chat-compose] (SVG, no text)\n- Old text-based checks were false-positive on DM content --- bin/muse-chat-api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/muse-chat-api.py b/bin/muse-chat-api.py index 8b025af..f071eb7 100755 --- a/bin/muse-chat-api.py +++ b/bin/muse-chat-api.py @@ -271,11 +271,12 @@ def cmd_sidechat_create(ws): """ import time as _time # Open chat panel via switcher trigger (idempotent - safe if already open) - ev(ws, """(() => { + sw_result = ev(ws, """(() => { const sw = document.querySelector('[data-testid="hatch-chat-switcher-trigger"]'); if (sw) sw.click(); return sw ? 'SWITCHER_CLICKED' : 'NO_SWITCHER'; })()""") + print(f"Switcher: {sw_result}", file=sys.stderr) _time.sleep(2) # Wait for React render # Find + button via data-testid (verified selector, SVG icon no text) result = ev(ws, """(() => {