Repository navigation
fix(article): export Articles as Articles, with their title and cover - #42
Merged
Merged
Conversation
X can mount an Article's post before its reader. At that instant the page looks like a plain post, so a per-post control landed on the article post, and the Article header control then refused to inject because a control already existed. Clicking it ran the post path with thread scope, which reads tweetText only: the capsule held the article's images as "posts" plus the author's own replies, with no article text. - runExport resolves a target that is the focused Article post to an Article export (resolveExportTarget), whatever control was clicked. - The Article header control replaces a post control on the article post and marks itself menu-mode "article"; the per-post pass leaves it alone. - buildModelForArticle reads the title and images from the whole article post. X moved the title and cover outside the reader root, so the title came from the body's first h1 and the cover was dropped. Release v1.6.5. Fixes #41 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #41.
Bug. When X mounted an Article's post before its reader, a per-post control landed on it. Clicking it ran the post/thread path, so the capsule held the article's images and the author's own replies, with no article text.
Fix.
resolveExportTargetroutes any export aimed at the focused Article post to the Article model.buildModelForArticlereads the title and cover from the whole article post. X moved both outside the reader root, so the title had come from the body's firsth1and the cover was dropped.Tests. Three jsdom checks in
test/dom.test.mjsuse the current DOM shape (twitterArticleRichTextView, title and cover beside it): the control race, export routing, and title/cover. All three failed before the fix.npm test, lint and format pass.Release v1.6.5.
🤖 Generated with Claude Code