|
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
User reported UI error. Root cause: API GET /api/meet-kevin/strategy/
performance returns {trade_count, closed_trade_count, total_pnl_usd,
win_rate_pct, wins, losses} but the dashboard's StrategyPerformance
type expected {total_return_pct, sharpe_ratio, max_drawdown_pct,
open_positions, alpha_vs_spy_pct, ...}. So performance.open_positions
was undefined and .toString() crashed the whole page render.
Fix: update StrategyPerformance to match the actual API shape and
rewrite the 6-card headline grid to show the metrics the API
actually computes (trade count, closed count, total P&L, win rate,
wins, losses). Defensive ?? 0 fallbacks everywhere so future
schema drift doesn't crash again.
Long-term: extend the API to compute sharpe/max-dd/alpha vs SPY etc.
once there are real Kevin trades to compute them on (currently 0
trades — all 13 emitted signals fired outside market hours and were
correctly rejected by RiskManager).
|
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||