Skip to content

Read X's rebuilt client - #13

Merged
tshmieldev merged 1 commit into
mainfrom
tshmieldev/x-new-client
Nov 11, 2026
Merged

tshmieldev merged 1 commit into
mainfrom
tshmieldev/x-new-client

Conversation

@tshmieldev

Copy link
Copy Markdown
Owner

X rolled out a rebuilt web client in November 2026 with no #react-root and no data-testid attributes. Sharp found no posts and did nothing, on desktop and phone.

This teaches every reader in src/x/extract.ts the new shapes while keeping the old labels first, so one build works on either client:

  • Timeline rows are [id^="urt:"] > ul > li, absolutely positioned and recycled; posts are articles inside a [role="link"][data-href] wrapper. Author from [data-post-avatar], text from div[dir="auto"], media from [data-engagement-action="media"] and video[poster], quoted posts ([data-slot="embedded-tweet-frame"]) excluded from identity and read after the post's own words.
  • The row above is found by data-index, not DOM order; thread order on a post page uses the same.
  • The banner slot is sized for column-flex articles; a fully hidden post leaves its row at 1px so X's virtualiser keeps measuring it.
  • Captured rows from the live page are a fixture, with tests for both clients.

Verified against the live page by the reporter and against the fixture with the real extension and a mocked classifier.

Not yet on the rebuilt client, pending its markup: Sharp's items in the post menu, the thread control, and choosing "Not interested" on the reader's behalf. Filtering itself does not depend on them.

X began serving a rebuilt web client in November 2026: no #react-root, no
data-testid anywhere. A timeline is `[id^="urt:"] > ul` of absolutely
positioned, virtualised `li` rows; each post is an `article` inside a
`[role="link"]` wrapper carrying the permalink in `data-href`, the author
in `[data-post-avatar]`, the text in `div[dir="auto"]`, media behind
`[data-engagement-action="media"]` and a quoted post inside an
`[data-slot="embedded-tweet-frame"]` frame. Sharp found no posts and did
nothing, on desktop and phone alike.

Every reader in extract.ts now tries the old labels first and the new
shapes second, so one build serves whichever client a reader is given:

- posts, rows, author handle and name, post id, text, photos and video
  posters, the repost header, the row above (by data-index, since X
  recycles row nodes and document order no longer means anything), and
  thread order on a post page;
- the slot is laid out for the rebuilt client's column articles, where a
  full-width flex basis would have been read as height;
- a fully hidden post leaves its row at a pixel so X's virtualiser keeps
  measuring it and no blank gap opens;
- the More button is recognised, so the menu adapter can find a trigger.

Captured rows from the live page are kept as a fixture and tested. Not yet
on the rebuilt client, pending its markup: Sharp's items in the post menu,
the thread control, and choosing "Not interested" on the reader's behalf.
@tshmieldev
tshmieldev merged commit 00809be into main Nov 11, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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