From 7c44552ae0bfd2de57f80312e20aec9302eda675 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Jul 2026 00:39:30 +0000 Subject: [PATCH] Rework tweet card click targets: frame->tweet, photo->new tab, video->play MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The whole card previously linked to our own /article/[id] page. Per request, clicking the card frame now opens the original tweet (in a new tab) instead — there's no separate "full article" view for a tweet anyway. Clicking a photo opens that image by itself in a new tab (still resolved through the configured media mode, so proxy mode doesn't leak the browser's IP to Twitter when viewing the full image either). Clicking a video's native controls still just plays/pauses it rather than navigating anywhere. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8 --- frontend/src/lib/components/TweetCard.svelte | 38 +++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/frontend/src/lib/components/TweetCard.svelte b/frontend/src/lib/components/TweetCard.svelte index 8cf1aa6..8305076 100644 --- a/frontend/src/lib/components/TweetCard.svelte +++ b/frontend/src/lib/components/TweetCard.svelte @@ -9,16 +9,26 @@ // article.tweet.media is undefined for tweets published before this field existed — // older rows in the DB weren't backfilled, so this can't assume it's always an array. const media = $derived(article.tweet?.media?.slice(0, 4) ?? []); + // The card's own href — clicking the frame goes to the original tweet, not our + // internal article page (there's no separate "full article" for a tweet anyway). + const tweetUrl = $derived(article.sources[0]?.link ?? `/article/${article.id}`); - // Native