전략평가 화면 수정
This commit is contained in:
@@ -222,6 +222,8 @@ export default function StrategyEvaluationPage({ theme = 'dark' }: Props) {
|
||||
selectedStrategy,
|
||||
selectedBarTimeSec,
|
||||
appliedIndicatorParams,
|
||||
bars,
|
||||
chartTimeframe,
|
||||
);
|
||||
if (session !== evalSessionRef.current) return;
|
||||
setSnapshot(snap ?? undefined);
|
||||
@@ -240,7 +242,9 @@ export default function StrategyEvaluationPage({ theme = 'dark' }: Props) {
|
||||
selectedStrategyId,
|
||||
selectedStrategy,
|
||||
selectedBarTimeSec,
|
||||
bars.length,
|
||||
selectedBarIndex,
|
||||
bars,
|
||||
chartTimeframe,
|
||||
appliedIndicatorParams,
|
||||
]);
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ const SideCard: React.FC<SideCardProps> = ({ side, metrics, overallMet, signalAc
|
||||
<VirtualSignalMatchVisual
|
||||
metrics={metrics}
|
||||
title="SIGNAL INTELLIGENCE & MATCH RATES"
|
||||
overallMet={overallMet}
|
||||
panelClassName="seval-side-sig-panel"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,8 @@ import {
|
||||
buildConditionMetrics,
|
||||
computeMatchRate,
|
||||
getTrafficLightState,
|
||||
resolveSideHeadlineMatchRate,
|
||||
resolveSideTrafficState,
|
||||
type ConditionMetric,
|
||||
} from '../../utils/virtualSignalMetrics';
|
||||
import VirtualSignalEqualizer from './VirtualSignalEqualizer';
|
||||
@@ -15,6 +17,8 @@ interface Props {
|
||||
title?: React.ReactNode;
|
||||
/** 백엔드 집계 matchRate — 미지정 시 metrics 로컬 계산 */
|
||||
backendMatchRate?: number | null;
|
||||
/** DSL 전체 Rule 충족 — 헤드라인 일치율·신호등 우선 */
|
||||
overallMet?: boolean | null;
|
||||
className?: string;
|
||||
panelClassName?: string;
|
||||
}
|
||||
@@ -23,16 +27,21 @@ const VirtualSignalMatchVisual: React.FC<Props> = ({
|
||||
metrics,
|
||||
title,
|
||||
backendMatchRate,
|
||||
overallMet,
|
||||
className = '',
|
||||
panelClassName = '',
|
||||
}) => {
|
||||
const matchRate = useMemo(
|
||||
() => computeMatchRate(metrics, backendMatchRate),
|
||||
[metrics, backendMatchRate],
|
||||
() => (overallMet != null
|
||||
? resolveSideHeadlineMatchRate(metrics, overallMet)
|
||||
: computeMatchRate(metrics, backendMatchRate)),
|
||||
[metrics, backendMatchRate, overallMet],
|
||||
);
|
||||
const trafficState = useMemo(
|
||||
() => getTrafficLightState(matchRate, metrics),
|
||||
[matchRate, metrics],
|
||||
() => (overallMet != null
|
||||
? resolveSideTrafficState(metrics, overallMet)
|
||||
: getTrafficLightState(matchRate, metrics)),
|
||||
[matchRate, metrics, overallMet],
|
||||
);
|
||||
const { visualRef, lightRef } = useSignalVisualRailHeight([
|
||||
metrics.length,
|
||||
|
||||
Reference in New Issue
Block a user