Skip to content

fix(chat-swarm-runtime): use CDP input for editable composer - #184

Open
James3014 wants to merge 1 commit into
mainfrom
issue-117-wave3-cdp-input-repair
Open

James3014 wants to merge 1 commit into
mainfrom
issue-117-wave3-cdp-input-repair

Conversation

@James3014

Copy link
Copy Markdown
Owner

Fixes the next live Wave 3 blocker from Issue #117. On the exact deployed macOS/Chrome 152 managed carrier, the existing execCommand('insertText') path left the complete draft text visible in the contenteditable DOM but never updated ChatGPT's real composer state, so no enabled send button appeared and runtime_ensure(3) correctly fenced the slot as RECONCILE_REQUIRED.

A causal probe on that same stuck target showed that CDP Input.dispatchKeyEvent + Input.insertText immediately produced data-testid="send-button" with disabled=false without sending the message. This repair therefore keeps DOM evaluation for exact-URL/composer guards and the textarea fallback, but routes the contenteditable path through exact-target CDP Input commands. Send-button readiness is polled read-only, then the send click is attempted exactly once so acknowledgement loss cannot cause a blind resend.

Candidate f7900b1f5ca8c008e35422eff0775e60237e2ac0 is based directly on main@0890f77e1f061511b2a48d5cab6aec0b18f735a7 and changes only src/chat-swarm-runtime.ts and src/chat-swarm-runtime.test.ts. Local dependency-backed tests were not claimed because dependency sync was blocked by the current coordination-carrier gate; git diff --check and static anti-false-green checks passed. Exact-head CI plus independent Candidate acceptance are required before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant