From 0bb0f71877961b555bcc10bd0238566e53d8ad93 Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Mon, 15 Jun 2026 12:56:45 +0200 Subject: [PATCH] refine position-sizing UI: top-of-panel controls, segmented risk, no spinners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The account/risk inputs are global "set once" settings, so they're moved out of the panel body into a single compact line in the recommendation header. Replaced the number-input spinners: risk % is now a segmented preset selector (0.5/1/2/3), account size a clean text field with a $ prefix. Relabel "at risk" → "max loss". Co-Authored-By: Claude Opus 4.8 --- .../components/ticker/RecommendationPanel.tsx | 66 +++++++++++-------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/frontend/src/components/ticker/RecommendationPanel.tsx b/frontend/src/components/ticker/RecommendationPanel.tsx index 30a7180..fabd6ef 100644 --- a/frontend/src/components/ticker/RecommendationPanel.tsx +++ b/frontend/src/components/ticker/RecommendationPanel.tsx @@ -173,7 +173,7 @@ function SetupCard({ setup, action, currentPrice, risk, regime }: { setup?: Trad
{formatPrice(sizing.dollarRisk)}
-
at risk
+
max loss
{sizing.exceedsAccount && ( @@ -195,33 +195,44 @@ function SetupCard({ setup, action, currentPrice, risk, regime }: { setup?: Trad ); } -function RiskSettingsBar({ risk, update }: { risk: RiskSettings; update: (p: Partial) => void }) { +const RISK_PRESETS = [0.5, 1, 2, 3]; + +/** Compact, set-once sizing controls: a clean account field (no spinners) and a + * segmented risk-% selector — risk is almost always one of a few values. */ +function RiskControls({ risk, update }: { risk: RiskSettings; update: (p: Partial) => void }) { return ( -
- Risk settings: -

Recommended Action is the ticker-level bias. The preferred setup is shown first; the opposite side is available under Alternative scenario.

@@ -271,8 +285,6 @@ export function RecommendationPanel({ symbol, longSetup, shortSetup, currentPric

{summary.reasoning}

)} - - {earningsDays != null && earningsDays >= 0 && ( earningsDays <= EARNINGS_HORIZON_DAYS ? (