diff --git a/src/components/charts/trend-card.tsx b/src/components/charts/trend-card.tsx index 155f5d6e2..6f1bf81ea 100644 --- a/src/components/charts/trend-card.tsx +++ b/src/components/charts/trend-card.tsx @@ -61,12 +61,9 @@ export function TrendCard({ ? ArrowRight : Minus; - const trendColor = - slope30?.direction === "up" - ? "text-dracula-orange" - : slope30?.direction === "down" - ? "text-dracula-cyan" - : "text-muted-foreground"; + // P4: Direction-as-good-or-bad is metric-specific (v1.5+ scope) — + // keep the arrow flat at muted-foreground for both up/down/flat. + const trendColor = "text-muted-foreground"; const formatValue = (value: number) => fmt.number(value, 1); @@ -82,66 +79,72 @@ export function TrendCard({ }; return ( -
+
- + {label}
- + {latest !== null ? renderPair(latest, secondary?.latest) : "—"} - {unit} + + {unit} + {slope30 && }
- {avg7 !== null && ( - - {t("charts.avg7dShort")}:{" "} - {avg7Hint ? ( - - - - {renderPair(avg7, secondary?.avg7)} - - - -
{avg7Hint}
-
-
- ) : ( - - {renderPair(avg7, secondary?.avg7)} - - )} -
- )} - {avg30 !== null && ( - - {t("charts.avg30dShort")}:{" "} - {avg30Hint ? ( - - - - {renderPair(avg30, secondary?.avg30)} - - - -
{avg30Hint}
-
-
- ) : ( - - {renderPair(avg30, secondary?.avg30)} - - )} -
- )} + + {t("charts.avg7dShort")}:{" "} + {avg7Hint ? ( + + + + {avg7 !== null ? renderPair(avg7, secondary?.avg7) : "—"} + + + +
{avg7Hint}
+
+
+ ) : ( + + {avg7 !== null ? renderPair(avg7, secondary?.avg7) : "—"} + + )} +
+ + {t("charts.avg30dShort")}:{" "} + {avg30Hint ? ( + + + + {avg30 !== null ? renderPair(avg30, secondary?.avg30) : "—"} + + + +
{avg30Hint}
+
+
+ ) : ( + + {avg30 !== null ? renderPair(avg30, secondary?.avg30) : "—"} + + )} +