Repository navigation
Comments: Sign in the comment editor's embed previews so embeds work in the Reader - #116348
Merged
Merged
Conversation
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~112 bytes added 📈 [gzipped]) Details
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~112 bytes added 📈 [gzipped]) Details
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. |
arcangelini
marked this pull request as ready for review
November 7, 2026 12:49
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.
Part of READ-775
Proposed Changes
Embeds never work in the Reader's comment editor. Every URL you embed turns into a plain link.
The Jetpack comment editor previews an embed by fetching its
embedUrlwithout credentials, and turns any 4xx into a link. The Reader points it at/wpcom/v2/read/embed, which only answers signed-in readers on WordPress.com's own apps, so every lookup got a 401.The editor can now take a
fetchEmbedfrom its host (Automattic/jetpack#54664). The Reader passes one that calls the route through its own signed-in API client, so the route keeps its login and client checks. The editor reads the response status, so an error the route answered (404 for an untrusted URL, 429 for the rate limit) is handed back as aResponsewith that status. A request that never got a status throws, which the editor treats as worth retrying.Until the Jetpack change reaches WordPress.com, the editor ignores
fetchEmbedand behaves as it does today, so this can merge first.Why are these changes being made?
Testing Instructions
/reader/conversations/inboxand start a comment./embed, or/youtubewith the Jetpack change) and paste a YouTube URL. The video preview shows instead of a link.yarn test-client client/blocks/comments/test/fetch-embed.test.tsPre-merge Checklist
Created with Claude Opus 5.5 in Claude Code.