Skip to content

fix(article): export Articles as Articles, with their title and cover - #42

Merged
wolfgang-aura merged 1 commit into
mainfrom
fix/article-export-routing
Oct 5, 2026
Merged

wolfgang-aura merged 1 commit into
mainfrom
fix/article-export-routing

Conversation

@wolfgang-aura

Copy link
Copy Markdown
Owner

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.

  • resolveExportTarget routes any export aimed at the focused Article post to the Article model.
  • The Article header control replaces a post control on the article post.
  • buildModelForArticle reads 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 first h1 and the cover was dropped.

Tests. Three jsdom checks in test/dom.test.mjs use 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

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>
@wolfgang-aura
wolfgang-aura merged commit 7726719 into main Oct 5, 2026
1 check passed
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.

Article exported as a thread of images plus the author's replies

1 participant