Skip to content

[Bug]: twitter delete targets the wrong tweet card on replies and conversation pages #780

@TennyZhuang

Description

@TennyZhuang

Description

opencli twitter delete <tweet-url> can fail on replies, older tweets, and conversation pages because it clicks the first [aria-label="More"] button on the page instead of locating the tweet card that matches the requested status id.

In practice this leads to errors like:

  • Could not find the "More" context menu on this tweet. Are you sure you are logged in and looking at a valid tweet?
  • This tweet does not seem to belong to you, or the Delete option is missing (not your tweet).

On the exact same tweet URL, deleting works if I first locate the article that contains /status/<id>, then click that article's More -> Delete -> Confirm controls. So the issue looks like target tweet matching rather than permissions or session state.

Steps to Reproduce

  1. Log in to X/Twitter with an account that owns an older reply tweet or a tweet shown inside a conversation page.
  2. Run opencli twitter delete https://x.com/<user>/status/<status_id> -v.
  3. Observe that the command may target the wrong tweet card or fail before reaching the target tweet's menu.
  4. Run the same deletion manually by locating the article whose descendant link includes /status/<status_id> and then clicking that article's More -> Delete -> Confirm controls.
  5. Observe that the manual flow succeeds on the same URL.

Expected Behavior

opencli twitter delete should locate the tweet card that matches the requested status id and open that tweet's own More menu before trying to click Delete.

OpenCLI Version

1.6.1

Node.js Version

Other (v25.8.1)

Operating System

macOS

Logs / Screenshots

$ opencli twitter delete https://x.com/<user>/status/<status_id> -v
...
Could not find the "More" context menu on this tweet. Are you sure you are logged in and looking at a valid tweet?
$ opencli twitter delete https://x.com/<user>/status/<status_id> -v
...
This tweet does not seem to belong to you, or the Delete option is missing (not your tweet).

Relevant implementation today:

  • src/clis/twitter/delete.ts currently does document.querySelector('[aria-label="More"]')
  • that assumes the first visible menu belongs to the requested tweet URL, which is not reliable on reply/conversation pages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions