From 2a17ea0cca5a074df4c604bef73afb77d0149ee1 Mon Sep 17 00:00:00 2001 From: Ahmet Guzererler Date: Tue, 24 Mar 2026 00:31:16 +0100 Subject: [PATCH] feat: add Force re-run checkbox to dashboard params Adds a 'Force re-run' checkbox that passes force=True to the backend, bypassing all date-based skip checks (scan, pipeline, portfolio, execution). Also fixes auto run: ticker is not required (scan discovers tickers), portfolio_id is the correct required field instead. Co-Authored-By: Claude Sonnet 4.6 --- agent_os/frontend/src/Dashboard.tsx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/agent_os/frontend/src/Dashboard.tsx b/agent_os/frontend/src/Dashboard.tsx index c5ba66e2..0f794c26 100644 --- a/agent_os/frontend/src/Dashboard.tsx +++ b/agent_os/frontend/src/Dashboard.tsx @@ -8,6 +8,7 @@ import { IconButton, Button, Input, + Checkbox, useDisclosure, Drawer, DrawerOverlay, @@ -50,6 +51,7 @@ interface RunParams { date: string; ticker: string; portfolio_id: string; + force: boolean; } const RUN_TYPE_LABELS: Record = { @@ -64,7 +66,7 @@ const REQUIRED_PARAMS: Record = { scan: ['date'], pipeline: ['ticker', 'date'], portfolio: ['date', 'portfolio_id'], - auto: ['date', 'ticker'], + auto: ['date', 'portfolio_id'], }; /** Return the colour token for a given event type. */ @@ -312,6 +314,7 @@ export const Dashboard: React.FC = () => { date: new Date().toISOString().split('T')[0], ticker: 'AAPL', portfolio_id: 'main_portfolio', + force: false, }); // Auto-scroll the terminal to the bottom as new events arrive @@ -335,7 +338,7 @@ export const Dashboard: React.FC = () => { // Validate required params const required = REQUIRED_PARAMS[type]; - const missing = required.filter((k) => !params[k]?.trim()); + const missing = required.filter((k) => { const v = params[k]; return typeof v === 'string' ? !v.trim() : !v; }); if (missing.length > 0) { toast({ title: `Missing required fields for ${RUN_TYPE_LABELS[type]}`, @@ -357,6 +360,7 @@ export const Dashboard: React.FC = () => { portfolio_id: params.portfolio_id, date: params.date, ticker: params.ticker, + force: params.force, }); setActiveRunId(res.data.run_id); } catch (err) { @@ -529,8 +533,18 @@ export const Dashboard: React.FC = () => { onChange={(e) => setParams((p) => ({ ...p, portfolio_id: e.target.value }))} /> + + setParams((p) => ({ ...p, force: e.target.checked }))} + > + Force re-run (ignore cached results) + + - Required: Scan → date · Pipeline → ticker, date · Portfolio → date, portfolio · Auto → date, ticker + Required: Scan → date · Pipeline → ticker, date · Portfolio → date, portfolio · Auto → date, portfolio