Track Record: Strategy/Lookback selects use the shared Dropdown
Deploy / lint (push) Successful in 7s
Deploy / test (push) Successful in 1m3s
Deploy / deploy (push) Successful in 34s

The portfolio-monitor filters were native <select> elements with a
hardcoded bg-slate-950 - a look from before the design system. They
now use the shared Dropdown (same as the Setups filters), which also
gives them the dark themed menu and the portal fix from 6464fdd.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 23:23:09 +02:00
co-authored by Claude Fable 5
parent 6464fdd4af
commit 924c474624
@@ -5,6 +5,7 @@ import { triggerJob } from '../../api/admin';
import { Button } from '../ui/Button'; import { Button } from '../ui/Button';
import { Callout } from '../ui/Callout'; import { Callout } from '../ui/Callout';
import { Disclosure } from '../ui/Disclosure'; import { Disclosure } from '../ui/Disclosure';
import { Dropdown } from '../ui/Dropdown';
import { Section } from '../ui/Section'; import { Section } from '../ui/Section';
import { useToast } from '../ui/Toast'; import { useToast } from '../ui/Toast';
import type { BacktestCurvePoint, BacktestPortfolioMonitorRun } from '../../lib/types'; import type { BacktestCurvePoint, BacktestPortfolioMonitorRun } from '../../lib/types';
@@ -217,32 +218,29 @@ export function BacktestPanel() {
</p> </p>
</div> </div>
<div className="flex flex-wrap gap-2"> <div className="flex flex-wrap gap-2">
<label className="flex flex-col gap-1 text-[11px] uppercase tracking-wider text-gray-500"> <div className="flex flex-col gap-1 text-[11px] uppercase tracking-wider text-gray-500">
Strategy <label htmlFor="monitor-strategy">Strategy</label>
<select <Dropdown
id="monitor-strategy"
className="w-64 normal-case tracking-normal"
value={activeStrategy} value={activeStrategy}
onChange={(e) => setSelectedStrategy(e.target.value)} onChange={setSelectedStrategy}
className="rounded border border-white/10 bg-slate-950 px-3 py-2 text-xs normal-case tracking-normal text-gray-200" options={monitor.strategies.map((s) => ({
> value: s.strategy,
{monitor.strategies.map((s) => ( label: `${s.is_production ? 'Production: ' : ''}${s.label}`,
<option key={s.strategy} value={s.strategy}> }))}
{s.is_production ? 'Production: ' : ''}{s.label} />
</option> </div>
))} <div className="flex flex-col gap-1 text-[11px] uppercase tracking-wider text-gray-500">
</select> <label htmlFor="monitor-lookback">Lookback</label>
</label> <Dropdown
<label className="flex flex-col gap-1 text-[11px] uppercase tracking-wider text-gray-500"> id="monitor-lookback"
Lookback className="w-36 normal-case tracking-normal"
<select
value={activeLookback} value={activeLookback}
onChange={(e) => setSelectedLookback(e.target.value)} onChange={setSelectedLookback}
className="rounded border border-white/10 bg-slate-950 px-3 py-2 text-xs normal-case tracking-normal text-gray-200" options={monitor.lookbacks.map((l) => ({ value: l.lookback, label: l.label }))}
> />
{monitor.lookbacks.map((l) => ( </div>
<option key={l.lookback} value={l.lookback}>{l.label}</option>
))}
</select>
</label>
</div> </div>
</div> </div>