fix(frontend): point non-backtest runs to Studio instead of a blank dashboard - #1259
Open
iagop03 wants to merge 1 commit into
Open
fix(frontend): point non-backtest runs to Studio instead of a blank dashboard#1259iagop03 wants to merge 1 commit into
iagop03 wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StrategyResearchDashboard) is always shown regardless of run type, and is built entirely around a classic equity-curve backtest (KPIs fromrun.metrics, nav/drawdown/trade charts).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'shasStudio/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 noequity_curve/trade_log/artifacts_equity_csv/artifacts_trades_csvdata but the run does haverisk_xrayorrebalance_notes. Runs with real backtest data render exactly as before, unconditionally, regardless of whetherrisk_xrayalso happens to be present.runDashboard.noBacktestData/runDashboard.noBacktestDataStudioHintacross all 7 locales.StrategyResearchDashboard.test.tsx: covers therisk_xray-only case, therebalance_notes-only case, and confirms the normal dashboard still renders when equity/trade data is present alongsiderisk_xray.Out of scope
Test Plan
npx vitest run src/components/charts/__tests__/StrategyResearchDashboard.test.tsx— 3/3 passing.npx tsc -b— clean.Checklist
src/agent/,src/session/,src/providers/)