Severity: Low
- Dead code with the worst patterns (verified unused — delete before someone rewires it):
threadUtils.ts:78-263 (recursive per-tweet N+1, unbounded .eq('conversation_id') silently capped at 1000 → truncated threads), tweet.ts getTweet, pgSearch.ts+SearchTweets.tsx, getStreamedTweetCountByDate (getTweetCountByDate.ts:34-94, client-side group of >1000-capped rows → wrong counts), getRecentUploadedAccounts.ts (no .limit(), 1000 rows for 7 avatars), getAccountMostMentionedAccounts, area-chart.tsx.
DownloadArchiveButton.tsx:9-31 does fetch→blob()→objectURL, buffering a hundreds-of-MB archive in memory with no progress; a plain <a download> streams from storage.
- Radix
AvatarImage bypasses next/image (user-dir renders 50+/page).
Filed from a code-quality/security/performance/robustness review. File:line refs verified against main.
Severity: Low
threadUtils.ts:78-263(recursive per-tweet N+1, unbounded.eq('conversation_id')silently capped at 1000 → truncated threads),tweet.ts getTweet,pgSearch.ts+SearchTweets.tsx,getStreamedTweetCountByDate(getTweetCountByDate.ts:34-94, client-side group of >1000-capped rows → wrong counts),getRecentUploadedAccounts.ts(no.limit(), 1000 rows for 7 avatars),getAccountMostMentionedAccounts,area-chart.tsx.DownloadArchiveButton.tsx:9-31doesfetch→blob()→objectURL, buffering a hundreds-of-MB archive in memory with no progress; a plain<a download>streams from storage.AvatarImagebypassesnext/image(user-dir renders 50+/page).Filed from a code-quality/security/performance/robustness review. File:line refs verified against
main.