Stop truncating quote-tweet text, keep media at thumbnail size

extractQuotedTweet() was capping the quoted tweet's text at 240
characters via toSummary(); it now keeps the full cleaned text,
matching the outer tweet's own body which was never truncated.
Dropped the matching -webkit-line-clamp: 3 on .quoted-text in
TweetCard.svelte so the full text actually renders instead of being
clipped after 3 lines. Media sizing (.quoted-img's 140px cap, the
media grid's fixed cell heights) is unchanged — only text was meant
to stay unconstrained.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
This commit is contained in:
Claude
2026-07-23 18:11:38 +00:00
parent 7f181384ef
commit 6065207c67
2 changed files with 2 additions and 6 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import type { Source, TweetMediaItem, QuotedTweet } from '../../storage/db/types
import type { SourceAdapter, FetchedItem } from './base.js'; import type { SourceAdapter, FetchedItem } from './base.js';
import { logger } from '../../storage/db/logs.js'; import { logger } from '../../storage/db/logs.js';
import { getSettings } from '../../storage/db/settings.js'; import { getSettings } from '../../storage/db/settings.js';
import { cleanHtml, toSummary } from '../clean.js'; import { cleanHtml } from '../clean.js';
/** fxtwitter caps a tweet at 4 attached photos/videos/gifs, in tweet display order. */ /** fxtwitter caps a tweet at 4 attached photos/videos/gifs, in tweet display order. */
const MAX_TWEET_MEDIA = 4; const MAX_TWEET_MEDIA = 4;
@@ -136,7 +136,7 @@ function extractQuotedTweet(descriptionHtml: string): QuotedTweet | null {
return { return {
authorName: authorMatch[1].trim(), authorName: authorMatch[1].trim(),
authorHandle: authorMatch[2].trim(), authorHandle: authorMatch[2].trim(),
text: toSummary(cleanHtml(beforeFooter), 240), text: cleanHtml(beforeFooter),
imageUrl: extractImageUrl(inner), imageUrl: extractImageUrl(inner),
link: linkMatch[1] link: linkMatch[1]
}; };
@@ -253,10 +253,6 @@
line-height: 1.45; line-height: 1.45;
color: var(--text-secondary); color: var(--text-secondary);
white-space: pre-line; white-space: pre-line;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
} }
.quoted-img { .quoted-img {
width: 100%; width: 100%;