From 90cccd422b41a626b8d84519c4edae575216583f Mon Sep 17 00:00:00 2001 From: k Date: Sat, 30 May 2026 03:32:24 +0800 Subject: [PATCH] style(feed): compact, recessed layout for off-topic posts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Off-topic posts are the bulk of the Trump feed but carry no signal. Before, each rendered as a full-size card identical to real signals, making the feed long and sparse and burying the ~15 actionable posts. Now noise posts (.post-row.noise) render as a compact, recessed two-column row: sunk background, 22px dimmed avatar, no aside column, tight padding, smaller text. The lone floating 'SKIPPED' tag is gone (the meta-line 'off-topic · not crypto' chip already conveys it). Real signal cards are unchanged — they now visually pop against the muted noise rows. Verified in the browser: ~6 noise rows per screen (was ~3 cards), and the 'Hide off-topic' toggle collapses to a clean signal-only stream. tsc clean. Co-Authored-By: Claude Sonnet 4.6 --- app/[locale]/globals.css | 23 ++++++++ components/dashboard/PostCards.tsx | 87 ++++++++++++++---------------- 2 files changed, 62 insertions(+), 48 deletions(-) diff --git a/app/[locale]/globals.css b/app/[locale]/globals.css index 0e85ee4..9e8a3a0 100644 --- a/app/[locale]/globals.css +++ b/app/[locale]/globals.css @@ -2186,6 +2186,29 @@ html[data-theme="dark"] .ai-reasoning-card { } .post-row:hover { border-color: var(--line-2); } .post-row.selected { border-color: var(--amber-ring); background: oklch(99% 0.02 85); } + +/* Off-topic / noise posts: compact, recessed, low-emphasis. They're the bulk + of the Trump feed but carry no signal — make them read as skippable filler + so the eye lands on the real signals. */ +.post-row.noise { + background: var(--bg-sunk); + border-color: transparent; +} +.post-row.noise:hover { border-color: var(--line); } +.post-row.noise .post-row-main { + grid-template-columns: 22px 1fr; /* drop the aside column */ + gap: 10px; + padding: 8px 14px; + align-items: center; +} +.post-row.noise .src-ico { + width: 22px; height: 22px; + font-size: 11px; border-radius: 6px; + opacity: 0.45; + align-self: center; +} +.post-row.noise .post-body .meta { margin-bottom: 2px; } +.post-row.noise .post-body .text { margin: 0; font-size: 13px; } .post-row-main { display: grid; grid-template-columns: 36px 1fr auto; diff --git a/components/dashboard/PostCards.tsx b/components/dashboard/PostCards.tsx index 5475c80..be047e9 100644 --- a/components/dashboard/PostCards.tsx +++ b/components/dashboard/PostCards.tsx @@ -119,7 +119,7 @@ const PostRow = memo(function PostRow({ post, selected, onClick }: PostRowProps) return (
{/* ── main row ── */} @@ -164,54 +164,45 @@ const PostRow = memo(function PostRow({ post, selected, onClick }: PostRowProps) : (post.text.slice(0, aiScored ? 180 : 90) + (post.text.length > (aiScored ? 180 : 90) ? '…' : ''))}

-
- {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}%` : ''} - + {/* Aside (signal pill / target / impact / AI%) only for scored posts. + Noise posts render as a compact two-column row (no aside) — the + 'off-topic · not crypto' tag in the meta line is enough. */} + {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 )} -
- {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. - - skipped - - )} -
+
+
+ AI + + {post.ai_confidence}% + +
+
+ )} {/* ── expanded detail ── */}