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
This commit is contained in:
@@ -271,11 +271,12 @@ def cmd_sidechat_create(ws):
|
|||||||
"""
|
"""
|
||||||
import time as _time
|
import time as _time
|
||||||
# Open chat panel via switcher trigger (idempotent - safe if already open)
|
# 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"]');
|
const sw = document.querySelector('[data-testid="hatch-chat-switcher-trigger"]');
|
||||||
if (sw) sw.click();
|
if (sw) sw.click();
|
||||||
return sw ? 'SWITCHER_CLICKED' : 'NO_SWITCHER';
|
return sw ? 'SWITCHER_CLICKED' : 'NO_SWITCHER';
|
||||||
})()""")
|
})()""")
|
||||||
|
print(f"Switcher: {sw_result}", file=sys.stderr)
|
||||||
_time.sleep(2) # Wait for React render
|
_time.sleep(2) # Wait for React render
|
||||||
# Find + button via data-testid (verified selector, SVG icon no text)
|
# Find + button via data-testid (verified selector, SVG icon no text)
|
||||||
result = ev(ws, """(() => {
|
result = ev(ws, """(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user