Skip to content

fix(twitter): make reply submission robust#1511

Merged
jackwener merged 1 commit into
jackwener:mainfrom
darthjaja6:fix-twitter-reply-success-detection
May 13, 2026
Merged

fix(twitter): make reply submission robust#1511
jackwener merged 1 commit into
jackwener:mainfrom
darthjaja6:fix-twitter-reply-success-detection

Conversation

@darthjaja6
Copy link
Copy Markdown
Contributor

Summary

  • make twitter/reply fall back to the target tweet page when /compose/post?in_reply_to=<id> does not expose the reply textarea
  • split reply typing, click, and submit verification so X success toasts are treated as authoritative
  • recover from CDP Promise was collected after submit when the page shows Your post was sent, returning the posted status URL when available

Why

We observed two real failures on OpenCLI 1.7.18:

  1. twitter/reply opened https://x.com/compose/post?in_reply_to=2054201820730249565, but X rendered the Home timeline with a loading dialog instead of the reply composer. The adapter then failed on missing [data-testid="tweetTextarea_0"].
  2. A retry actually posted the reply, and the final page showed Your post was sent plus a /status/... View link, but the command still returned Promise was collected.

The command caller cannot safely retry a write command after this false negative because the reply may already exist.

Tests

  • npx vitest run --project adapter clis/twitter/reply.test.js
  • npm run typecheck

@darthjaja6 darthjaja6 force-pushed the fix-twitter-reply-success-detection branch from 6551894 to 2dd6ce3 Compare May 12, 2026 17:20
@jackwener jackwener merged commit f321a60 into jackwener:main May 13, 2026
11 checks passed
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.

2 participants