Repository navigation
Read X's rebuilt client - #13
Merged
Merged
Conversation
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.
|
Caution Review failedThe pull request is closed.
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. |
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.
X rolled out a rebuilt web client in November 2026 with no
#react-rootand nodata-testidattributes. Sharp found no posts and did nothing, on desktop and phone.This teaches every reader in
src/x/extract.tsthe new shapes while keeping the old labels first, so one build works on either client:[id^="urt:"] > ul > li, absolutely positioned and recycled; posts arearticles inside a[role="link"][data-href]wrapper. Author from[data-post-avatar], text fromdiv[dir="auto"], media from[data-engagement-action="media"]andvideo[poster], quoted posts ([data-slot="embedded-tweet-frame"]) excluded from identity and read after the post's own words.data-index, not DOM order; thread order on a post page uses the same.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.