Skip to content

fix(frontend): point non-backtest runs to Studio instead of a blank dashboard - #1259

Open
iagop03 wants to merge 1 commit into
HKUDS:mainfrom
iagop03:fix/dashboard-tab-no-backtest-data
Open

fix(frontend): point non-backtest runs to Studio instead of a blank dashboard#1259
iagop03 wants to merge 1 commit into
HKUDS:mainfrom
iagop03:fix/dashboard-tab-no-backtest-data

Conversation

@iagop03

@iagop03 iagop03 commented Aug 30, 2026

Copy link
Copy Markdown

Summary

  • The "Dashboard" tab (StrategyResearchDashboard) is always shown regardless of run type, and is built entirely around a classic equity-curve backtest (KPIs from run.metrics, nav/drawdown/trade charts).
  • A portfolio-construction / risk-snapshot run — risk_xray + rebalance_notes, no equity curve, no trades — has none of that data. Every KPI silently rendered as a dash and every chart stayed empty, with nothing telling you this run is simply a different type. It just looked broken.

Why

Found while investigating a user report of "the numbers I used to see are gone, just dashes now" on a specific run. The run's backend data (risk_xray.json) was verified complete and correct on disk — the issue is purely that the Dashboard tab has no data of the shape it expects for this run type. The correct data was rendering fine all along on the "Studio" tab (RunDetail.tsx's hasStudio / StudioTab), just not the one the user had open.

Changes

  • StrategyResearchDashboard.tsx: early-return an empty-state card (short message + pointer to Studio) when there's no equity_curve/trade_log/artifacts_equity_csv/artifacts_trades_csv data but the run does have risk_xray or rebalance_notes. Runs with real backtest data render exactly as before, unconditionally, regardless of whether risk_xray also happens to be present.
  • New i18n keys runDashboard.noBacktestData / runDashboard.noBacktestDataStudioHint across all 7 locales.
  • New test file StrategyResearchDashboard.test.tsx: covers the risk_xray-only case, the rebalance_notes-only case, and confirms the normal dashboard still renders when equity/trade data is present alongside risk_xray.

Out of scope

  • Not changing which tab is auto-selected on load, or hiding the Dashboard tab itself for these runs — this only fixes what renders inside it. A "default to the right tab per run type" change would be a separate, more invasive UX decision.

Test Plan

  • New test: npx vitest run src/components/charts/__tests__/StrategyResearchDashboard.test.tsx — 3/3 passing.
  • npx tsc -b — clean.
  • All 7 locale JSON files validated to still parse.
  • Not tested against a live browser session manually; verified via the unit tests instead.

Checklist

  • No changes to protected areas (src/agent/, src/session/, src/providers/)
  • No hardcoded values
  • Follows CONTRIBUTING.md (DCO sign-off on the commit)
  • No user-facing docs needed — pure bugfix, no new config/flags/behavior to document

…ashboard

The "Dashboard" tab is always shown and built around a classic
equity-curve backtest (KPIs from run.metrics, nav/drawdown/trade charts).
A portfolio-construction / risk-snapshot run -- risk_xray + rebalance_notes,
no equity curve or trades -- has none of that data, so every KPI silently
rendered as a dash and every chart stayed empty. Nothing on the tab told
you the run was a different type; it just looked broken.

Add an early empty-state branch: when there's no equity/trade data but the
run does have risk_xray or rebalance_notes, render a short message
pointing at the Studio tab (hidden: !hasStudio in RunDetail.tsx, so it's
only shown when that data exists) instead of the blank KPI/chart shell.

Signed-off-by: Iago Pueyo <iago.pueyo99@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant