make watchlist fully manual; add price + day-change, two-block overview
Deploy / lint (push) Successful in 6s
Deploy / test (push) Successful in 35s
Deploy / deploy (push) Successful in 24s

Per design decision: the watchlist is now purely user-curated (no auto-seeding
of the top-10), so the auto_populate/dismissed machinery is removed and removals
are plain deletes. Each entry is enriched with latest close + day-over-day move.

Overview now shows two clear blocks: Top Setups (what to trade) and My Watchlist
(my names with current price and today's %). Market watchlist table drops the
now-meaningless auto/manual Type column in favour of Price and Day columns.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 14:25:04 +02:00
parent 0e9f1846f6
commit 6e06f51bb6
6 changed files with 164 additions and 195 deletions
@@ -1,7 +1,6 @@
import { Link } from 'react-router-dom';
import type { WatchlistEntry } from '../../lib/types';
import { formatPrice } from '../../lib/format';
import { Badge } from '../ui/Badge';
import { useRemoveFromWatchlist } from '../../hooks/useWatchlist';
function scoreColor(score: number): string {
@@ -10,6 +9,12 @@ function scoreColor(score: number): string {
return 'text-red-400';
}
function changeColor(value: number): string {
if (value > 0) return 'text-emerald-400';
if (value < 0) return 'text-red-400';
return 'text-gray-300';
}
interface WatchlistTableProps {
entries: WatchlistEntry[];
}
@@ -31,7 +36,8 @@ export function WatchlistTable({ entries }: WatchlistTableProps) {
<thead>
<tr className="border-b border-white/[0.06] text-xs uppercase tracking-wider text-gray-500">
<th className="px-4 py-3">Symbol</th>
<th className="px-4 py-3">Type</th>
<th className="px-4 py-3">Price</th>
<th className="px-4 py-3">Day</th>
<th className="px-4 py-3">Score</th>
<th className="px-4 py-3">Dimensions</th>
<th className="px-4 py-3">R:R</th>
@@ -54,8 +60,17 @@ export function WatchlistTable({ entries }: WatchlistTableProps) {
{entry.symbol}
</Link>
</td>
<td className="px-4 py-3.5">
<Badge label={entry.entry_type} variant={entry.entry_type === 'auto' ? 'auto' : 'manual'} />
<td className="px-4 py-3.5 num text-gray-200">
{entry.last_close !== null ? formatPrice(entry.last_close) : <span className="text-gray-500"></span>}
</td>
<td className="px-4 py-3.5 num">
{entry.change_pct !== null ? (
<span className={changeColor(entry.change_pct)}>
{entry.change_pct >= 0 ? '+' : ''}{entry.change_pct.toFixed(2)}%
</span>
) : (
<span className="text-gray-500"></span>
)}
</td>
<td className="px-4 py-3.5">
{entry.composite_score !== null ? (