Skip to content

[codex] improve X article cover and Write button handling#169

Draft
longhaiqwe wants to merge 2 commits into
JimLiu:mainfrom
longhaiqwe:codex/fix-x-article-write-click
Draft

[codex] improve X article cover and Write button handling#169
longhaiqwe wants to merge 2 commits into
JimLiu:mainfrom
longhaiqwe:codex/fix-x-article-write-click

Conversation

@longhaiqwe

@longhaiqwe longhaiqwe commented May 28, 2026

Copy link
Copy Markdown

Summary

  • click the nearest clickable ancestor for the X Articles Write text node
  • add a regression test for the Write button click expression
  • document the generated X Article cover workflow, including 5:2 sizing and cover upload across Chrome plugin, Computer Use, and CDP modes

Why

X currently renders [data-testid="empty_state_button_text"] as an inner text node. Calling .click() on that node may not open the editor, so article publishing can stall on the drafts page even when the Write control is visible.

X Articles also recommends a 5:2 cover image. The skill now records the practical flow for generating a simple no-text cover, normalizing it to an exact ratio, verifying dimensions, and uploading it as the article cover rather than as a body image.

Validation

  • bun test skills/baoyu-post-to-x/scripts/x-utils.test.ts skills/baoyu-post-to-x/scripts/md-to-html.test.ts skills/baoyu-post-to-x/scripts/x-article.test.ts
  • bun skills/baoyu-post-to-x/scripts/x-article.ts --help
  • git diff --check

@longhaiqwe longhaiqwe changed the title [codex] fix X article Write button click [codex] improve X article cover and Write button handling May 28, 2026
3. **Placeholders**: Images in content use `XIMGPH_N` format
4. **Insertion**: Placeholders are found, selected, and replaced with actual images

## Generated Cover Images

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope
这个不属于当前 Skill 功能范围

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