From e1d8ec8a7be7d373d654db009f24c6c46f0d58b4 Mon Sep 17 00:00:00 2001 From: Saravana Achu Mac Date: Sat, 9 May 2026 01:46:14 -0700 Subject: [PATCH] refactor(ui): normalize backtest replay controls --- .../components/BacktestComparePanel.tsx | 8 ++-- .../components/BacktestResultsDashboard.tsx | 46 +++++++++++-------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/web/src/backtest/components/BacktestComparePanel.tsx b/web/src/backtest/components/BacktestComparePanel.tsx index d5db07a..b67ee6c 100644 --- a/web/src/backtest/components/BacktestComparePanel.tsx +++ b/web/src/backtest/components/BacktestComparePanel.tsx @@ -558,13 +558,15 @@ export const BacktestComparePanel: React.FC = ({ prof {(row.durationMs / 1000).toFixed(1)}s {row.status === 'success' && row.result ? ( - + ) : ( {row.error || 'Run failed'} )} diff --git a/web/src/backtest/components/BacktestResultsDashboard.tsx b/web/src/backtest/components/BacktestResultsDashboard.tsx index cefe35d..4b64d2e 100644 --- a/web/src/backtest/components/BacktestResultsDashboard.tsx +++ b/web/src/backtest/components/BacktestResultsDashboard.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { ResponsiveContainer, LineChart, Line, XAxis, YAxis, Tooltip, CartesianGrid, ReferenceLine } from 'recharts'; import type { BacktestResult } from '../types'; import { buildInsightCards, toEquitySeries } from '../utils'; +import { Button, Select } from '../../components/ui/Primitives'; interface BacktestResultsDashboardProps { result: BacktestResult; @@ -103,50 +104,55 @@ export const BacktestResultsDashboard: React.FC =
- - - - setSpeed(event.target.value as '1x' | '5x' | '20x' | 'instant')} - className="rounded-lg border border-white/10 bg-zinc-900 px-2 py-1 text-[11px] text-white" - > - - - - - - +