fix(twitter): always use compose URL for reply to fix missing textarea#855
Closed
winfred5432 wants to merge 1 commit intojackwener:mainfrom
Closed
fix(twitter): always use compose URL for reply to fix missing textarea#855winfred5432 wants to merge 1 commit intojackwener:mainfrom
winfred5432 wants to merge 1 commit intojackwener:mainfrom
Conversation
When replying without an image, the old code navigated to the tweet's page URL and waited for `primaryColumn` — but the inline reply composer is not always mounted, causing "Could not find reply text area" errors. Fix: unconditionally navigate to the reply composer URL (`/compose/post?in_reply_to=<id>`) and wait for `[data-testid="tweetTextarea_0"]` before any further interaction. Image-attach flow is unchanged (it already used the composer URL). Fixes jackwener#848
Contributor
|
I reviewed this locally. It matches the failure mode I reproduced, and |
1 task
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When calling
opencli twitter replywithout an image, the code navigated to the tweet page URL and waited for[data-testid="primaryColumn"]. The inline reply composer is not reliably mounted in that context, causing:This was a silent regression — the image path already used the reply composer URL correctly, but the text-only path did not.
Fix
Unconditionally navigate to the reply composer URL (
/compose/post?in_reply_to=<tweet_id>) for all replies, then wait for[data-testid="tweetTextarea_0"]before proceeding. The image attachment flow is unchanged.Testing
Verified locally with
opencli twitter reply --url <tweet_url> --text "..."— reply posts successfully on both text-only and image paths.Fixes #848