fix: improve article detection and quote tweet display

- Use startsWith check instead of fragile length heuristic for
  detecting full article body vs preview mode
- Add media display for quote tweets (🖼️/🎬/🔄 indicators)
- Add preview_text to GraphqlTweetResult type definition to avoid
  type assertions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
George Zhang
2026-01-11 23:35:03 +00:00
committed by Peter Steinberger
co-authored by Claude Opus 4.5
parent 0475a2e1b6
commit d40c048333
3 changed files with 15 additions and 8 deletions
+1 -4
View File
@@ -168,10 +168,7 @@ export function extractArticleMetadata(
}
// preview_text is available in home timeline responses
const previewText = firstText(
(articleResult as { preview_text?: string }).preview_text,
(article as { preview_text?: string }).preview_text,
);
const previewText = firstText(articleResult.preview_text, article.preview_text);
return { title, previewText };
}