From 3f35a3fba25c9705e5646b2e0f6b53d7d24f09c7 Mon Sep 17 00:00:00 2001 From: k Date: Sat, 30 May 2026 03:19:31 +0800 Subject: [PATCH] feat(ui): visually de-emphasise off-topic Trump posts in the feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to fe88acb. Noise posts (not crypto-relevant, never AI-scored) now read as 'skip me' at a glance in the list — no need to open them: - sentiment chip → muted 'off-topic · not crypto' tag (was a colored chip) - post text → dimmer (ink-4) + shorter preview (90 vs 180 chars) - aside → single muted 'SKIPPED' tag instead of HOLD pill + empty AI metric Scored posts (real crypto signals) are visually unchanged — full signal pill, target chip, impact, and AI confidence. tsc + build clean. Co-Authored-By: Claude Sonnet 4.6 --- components/dashboard/PostCards.tsx | 101 +++++++++++++++++++---------- 1 file changed, 68 insertions(+), 33 deletions(-) diff --git a/components/dashboard/PostCards.tsx b/components/dashboard/PostCards.tsx index 17ee5b3..810231a 100644 --- a/components/dashboard/PostCards.tsx +++ b/components/dashboard/PostCards.tsx @@ -129,47 +129,82 @@ const PostRow = memo(function PostRow({ post, selected, onClick }: PostRowProps) · · - - {post.sentiment} - + {aiScored ? ( + + {post.sentiment} + + ) : ( + + off-topic · not crypto + + )} -

- {expanded ? post.text : (post.text.slice(0, 180) + (post.text.length > 180 ? '…' : ''))} +

+ {expanded + ? post.text + : (post.text.slice(0, aiScored ? 180 : 90) + (post.text.length > (aiScored ? 180 : 90) ? '…' : ''))}

- - {/* Target asset chip for actionable signals */} - {post.target_asset && (post.signal === 'buy' || post.signal === 'short') && ( + {aiScored ? ( + <> + + {/* Target asset chip for actionable signals */} + {post.target_asset && (post.signal === 'buy' || post.signal === 'short') && ( + + {post.target_asset} + {post.expected_move_pct ? ` +${post.expected_move_pct}%` : ''} + + )} +
+ {impact ? ( + <> + 1h peak + = 0 ? 'up' : 'down'}`}> + {impact.m1h == null ? '…' : fmtPct(impact.m1h)} + + + ) : ( + no data + )} +
+
+ AI + + {post.ai_confidence}% + +
+ + ) : ( + // Noise post: no signal, no AI score. Show a single muted SKIPPED + // tag instead of HOLD pill + empty AI metric, so the row reads as + // "ignore this" at a glance. - {post.target_asset} - {post.expected_move_pct ? ` +${post.expected_move_pct}%` : ''} + skipped )} -
- {impact ? ( - <> - 1h peak - = 0 ? 'up' : 'down'}`}> - {impact.m1h == null ? '…' : fmtPct(impact.m1h)} - - - ) : ( - no data - )} -
-
- AI - - {aiScored ? `${post.ai_confidence}%` : '—'} - -