@@ -93,7 +98,8 @@ export function AppShell() {
} />
} />
} />
-
} />
+
} />
+
} />
} />
} />
} />
diff --git a/web/src/components/layout/Sidebar.tsx b/web/src/components/layout/Sidebar.tsx
index 227e5ec..ae349c1 100644
--- a/web/src/components/layout/Sidebar.tsx
+++ b/web/src/components/layout/Sidebar.tsx
@@ -9,7 +9,7 @@ const NAV = [
{ to: '/', icon: Home, label: 'Home', end: true },
{ to: '/portfolio', icon: Briefcase, label: 'Portfolio', end: false },
{ to: '/research', icon: FlaskConical, label: 'Research', end: false },
- { to: '/simple', icon: Target, label: 'Plans', end: false },
+ { to: '/plans', icon: Target, label: 'Plans', end: false },
{ to: '/markets', icon: TrendingUp, label: 'Markets', end: false },
{ to: '/screener', icon: SlidersHorizontal, label: 'Screener', end: false },
{ to: '/watchlist', icon: Star, label: 'Watchlist', end: false },
diff --git a/web/src/views/PortfolioView.tsx b/web/src/views/PortfolioView.tsx
index 5c03da8..2621602 100644
--- a/web/src/views/PortfolioView.tsx
+++ b/web/src/views/PortfolioView.tsx
@@ -44,7 +44,7 @@ export function PortfolioView() {
symbol: position.symbol,
});
if (action !== 'open-plan' && position.tradeId) params.set('tradeId', position.tradeId);
- navigate(`/simple?${params.toString()}`);
+ navigate(`/plans?${params.toString()}`);
}}
/>
)}
diff --git a/web/src/views/SimpleView.tsx b/web/src/views/SimpleView.tsx
index c77870f..3bf8dfa 100644
--- a/web/src/views/SimpleView.tsx
+++ b/web/src/views/SimpleView.tsx
@@ -1437,7 +1437,7 @@ export function SimpleView() {
{savedSetups.length === 0 && (
- No Simple setups saved yet.
+ No Trade Plans saved yet.
)}
@@ -1450,6 +1450,18 @@ export function SimpleView() {
const updatedAt = formatSetupUpdatedAt(entry);
const eventHistory = deriveSimpleEventHistory(entry, runtimeEvents);
const holdingMode = normalizeHoldingMode(entry.holding_mode);
+ const linkedHoldingTradeId = String(entry.linked_trade_id || '').trim();
+ const linkedHolding = side === 'sell'
+ ? availableSellHoldings.find((holding) => {
+ if (linkedHoldingTradeId) {
+ return holding.tradeId === linkedHoldingTradeId;
+ }
+ return (
+ holding.symbol === String(entry.symbol || '').trim().toUpperCase()
+ && String(holding.profileId || '').trim() === String(entry.profile_id || '').trim()
+ );
+ }) || null
+ : null;
const canConvertToLongTerm = side === 'buy' && holdingMode === 'short_term' && runtimeSnapshot?.stage === 'filled';
const canResumeExitManagement = side === 'buy' && holdingMode === 'long_term' && runtimeSnapshot?.stage === 'filled';
return (
@@ -1585,6 +1597,39 @@ export function SimpleView() {
) : null}
+ {side === 'sell' ? (
+
+
+ Linked holding
+
+
+
+ {linkedHolding?.symbol || String(entry.symbol || '').trim().toUpperCase()}
+
+ {(linkedHolding?.tradeId || linkedHoldingTradeId) ? (
+
+ Trade {linkedHolding?.tradeId || linkedHoldingTradeId}
+
+ ) : null}
+ {(linkedHolding?.profileId || entry.profile_id) ? (
+
+ Profile {String(linkedHolding?.profileId || entry.profile_id)}
+
+ ) : null}
+ {linkedHolding?.entryPrice ? (
+
+ Entry {Number(linkedHolding.entryPrice).toFixed(4)}
+
+ ) : null}
+ {linkedHolding?.size ? (
+
+ Qty {linkedHolding.size}
+
+ ) : null}
+
+
+ ) : null}
+
{SIMPLE_TIMELINE_STEPS.map((step) => {
const complete = isTimelineStepComplete(runtimeSnapshot?.stage, step);