Skip to content

"Vibe-Trading: Your Personal Trading Agent"

fix(web): mark inferred strategy labels in run dashboard

fixXxerTech6550c7d6a126
diff --git a/frontend/src/components/charts/StrategyResearchDashboard.tsx b/frontend/src/components/charts/StrategyResearchDashboard.tsx
index 6f52ecf34..bc77c90c5 100644
--- a/frontend/src/components/charts/StrategyResearchDashboard.tsx
+++ b/frontend/src/components/charts/StrategyResearchDashboard.tsx
@@ -35,6 +35,7 @@ function timestamp(row: Record<string, string>): string {
type ReportIdentity = {
title: string;
strategy: string;
+ strategyInferred: boolean;
symbols: string[];
startDate: string;
endDate: string;
@@ -82,6 +83,7 @@ export function getStrategyReportIdentity(run: RunData): ReportIdentity {
return {
title: `${symbolLabel} · ${strategy}`,
strategy,
+ strategyInferred: true,
symbols,
startDate,
endDate,
@@ -224,8 +226,15 @@ export function StrategyResearchDashboard({ run }: { run: RunData }) {
<p className="font-mono text-[10px] uppercase tracking-[0.22em] text-[#3676df]">{t("runDashboard.eyebrow")}</p>
<span className="rounded-full border border-[#3676df]/20 bg-background/70 px-2.5 py-1 font-mono text-[10px] text-muted-foreground">RUN {run.run_id.slice(-8).toUpperCase()}</span>
</div>
- <h2 className="mt-4 max-w-4xl text-2xl font-semibold leading-tight tracking-[-0.025em] text-foreground md:text-[30px]">{identity.title}</h2>
- {run.prompt && run.prompt !== identity.strategy && (
+ <div className="mt-4 flex max-w-4xl flex-wrap items-center gap-2">
+ <h2 className="text-2xl font-semibold leading-tight tracking-[-0.025em] text-foreground md:text-[30px]">{identity.title}</h2>
+ {identity.strategyInferred && (
+ <span className="inline-flex items-center gap-1 rounded-full border border-[#ff8a3d]/30 bg-[#ff8a3d]/10 px-2 py-0.5 text-[11px] text-[#c25a14]">
+ {t("runDashboard.strategyInferred")}
+ </span>
+ )}
+ </div>
+ {run.prompt && (
<p className="mt-2 max-w-4xl text-sm leading-6 text-muted-foreground">{compactPrompt(run.prompt)}</p>
)}
<div className="mt-5 flex flex-wrap gap-2 text-xs text-muted-foreground">
diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.json
index 57008ec4c..a85a910a8 100644
--- a/frontend/src/i18n/locales/ar.json
+++ b/frontend/src/i18n/locales/ar.json
@@ -1346,6 +1346,7 @@
"engine": "محرك",
"portfolio": "محفظة",
"systematicStrategy": "استراتيجية منهجية",
+ "strategyInferred": "مُستنتَج",
"strategyMacd": "استراتيجية اتجاه MACD",
"strategyRsi": "استراتيجية توقيت RSI",
"strategyMomentum": "استراتيجية الزخم",
diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json
index 7c66e536b..abdec5afb 100644
--- a/frontend/src/i18n/locales/de.json
+++ b/frontend/src/i18n/locales/de.json
@@ -1346,6 +1346,7 @@
"engine": "Engine",
"portfolio": "Portfolio",
"systematicStrategy": "Systematische Strategie",
+ "strategyInferred": "Inferiert",
"strategyMacd": "MACD-Trend-Strategie",
"strategyRsi": "RSI-Timing-Strategie",
"strategyMomentum": "Momentum-Strategie",
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json
index e22f0f778..393a396f7 100644
--- a/frontend/src/i18n/locales/en.json
+++ b/frontend/src/i18n/locales/en.json
@@ -1346,6 +1346,7 @@
"engine": "engine",
"portfolio": "Portfolio",
"systematicStrategy": "Systematic strategy",
+ "strategyInferred": "Inferred",
"strategyMacd": "MACD trend strategy",
"strategyRsi": "RSI timing strategy",
"strategyMomentum": "Momentum strategy",
diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json
index 4c7dcce80..dee2b6e52 100644
--- a/frontend/src/i18n/locales/es.json
+++ b/frontend/src/i18n/locales/es.json
@@ -1346,6 +1346,7 @@
"engine": "motor",
"portfolio": "Cartera",
"systematicStrategy": "Estrategia sistemática",
+ "strategyInferred": "Inferido",
"strategyMacd": "Estrategia de tendencia MACD",
"strategyRsi": "Estrategia de timing RSI",
"strategyMomentum": "Estrategia de momentum",
diff --git a/frontend/src/i18n/locales/ja.json b/frontend/src/i18n/locales/ja.json
index f8afe4442..5831f68c5 100644
--- a/frontend/src/i18n/locales/ja.json
+++ b/frontend/src/i18n/locales/ja.json
@@ -1346,6 +1346,7 @@
"engine": "エンジン",
"portfolio": "ポートフォリオ",
"systematicStrategy": "システマティック戦略",
+ "strategyInferred": "推定",
"strategyMacd": "MACD トレンド戦略",
"strategyRsi": "RSI タイミング戦略",
"strategyMomentum": "モメンタム戦略",
diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json
index 8113f121d..631825ed9 100644
--- a/frontend/src/i18n/locales/ko.json
+++ b/frontend/src/i18n/locales/ko.json
@@ -1346,6 +1346,7 @@
"engine": "엔진",
"portfolio": "포트폴리오",
"systematicStrategy": "시스테매틱 전략",
+ "strategyInferred": "추정",
"strategyMacd": "MACD 추세 전략",
"strategyRsi": "RSI 타이밍 전략",
"strategyMomentum": "모멘텀 전략",
diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json
index 9ec4a6c82..ce665b428 100644
--- a/frontend/src/i18n/locales/zh-CN.json
+++ b/frontend/src/i18n/locales/zh-CN.json
@@ -1346,6 +1346,7 @@
"engine": "回测引擎",
"portfolio": "投资组合",
"systematicStrategy": "系统化交易策略",
+ "strategyInferred": "推断",
"strategyMacd": "MACD 趋势策略",
"strategyRsi": "RSI 择时策略",
"strategyMomentum": "动量策略",
diff --git a/frontend/src/pages/RunDetail.tsx b/frontend/src/pages/RunDetail.tsx
index 4da56c830..65244c7d3 100644
--- a/frontend/src/pages/RunDetail.tsx
+++ b/frontend/src/pages/RunDetail.tsx
@@ -352,7 +352,14 @@ export function RunDetail() {
</>
)}
<div className="min-w-0">
- <h1 className="truncate text-xl font-semibold tracking-tight">{reportIdentity.title}</h1>
+ <div className="flex flex-wrap items-center gap-2">
+ <h1 className="truncate text-xl font-semibold tracking-tight">{reportIdentity.title}</h1>
+ {reportIdentity.strategyInferred && (
+ <span className="inline-flex items-center gap-1 rounded-full border border-[#ff8a3d]/30 bg-[#ff8a3d]/10 px-2 py-0.5 text-[11px] text-[#c25a14]">
+ {t("runDashboard.strategyInferred")}
+ </span>
+ )}
+ </div>
<p className="mt-0.5 font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground">RUN {runId}</p>
</div>
{run.elapsed_seconds && <span className="text-xs text-muted-foreground">{run.elapsed_seconds.toFixed(1)}s</span>}