From bbc9461a8be3a47a7a0d9ac487995fc288a88d5b Mon Sep 17 00:00:00 2001 From: OpenSquared Date: Fri, 19 Jun 2026 22:35:26 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Trades=20du=20cycle=20=E2=80=94=20show?= =?UTF-8?q?=20suggested=20trade=20details=20for=20non-logged=20patterns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For patterns added in the cycle but below log threshold, display the recommended_trade (underlying + strategy + score) from scoreMap instead of just the pattern name. Pattern name moves to secondary small italic line. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/Dashboard.tsx | 40 +++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index fd225b0..f7776aa 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -651,14 +651,38 @@ export default function Dashboard() {
{p.name}
) : ( -
- - {p.name} - {score !== null && ( - {score} - )} - non loggé -
+ <> + {/* Suggested trade from scoreMap — primary */} + {(() => { + const sp = scoreMap[p.id] + const rec = sp?.recommended_trade ?? sp?.trade_rankings?.[0] + const underlying = rec?.underlying ?? rec?.ticker ?? null + const strategy = rec?.strategy ?? rec?.trade_type ?? null + const evVal: number | null = rec?.ev_net ?? rec?.ev ?? null + const isBearS = strategy?.toLowerCase().includes('put') || strategy?.toLowerCase().includes('bear') + return ( + <> +
+ {isBearS ? '🐻' : '🐂'} + + {underlying ?? '—'} + + {strategy ?? 'trade suggéré'} + {evVal !== null && ( + + EV{evVal >= 0 ? '+' : ''}{evVal.toFixed(2)} + + )} + {score !== null && ( + {score} + )} + non loggé +
+
{p.name}
+ + ) + })()} + )} )