From 82d7775e60c6de8c0b47cf86ba22c2122a4179e4 Mon Sep 17 00:00:00 2001 From: caty21 Date: Sat, 27 Jun 2026 18:47:01 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20OIS=20charts=20=E2=80=94=20tooltip=20lis?= =?UTF-8?q?ible,=20l=C3=A9gende=20visuelle,=20d=C3=A9tection=20article=20p?= =?UTF-8?q?r=C3=A9c=C3=A9dent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Tooltip: ajout color:#e2e8f0 sur les deux charts (texte invisible sur fond sombre) - Rate Curve: légende visuelle inline (Actuel blanc / Sem. préc. bleu pointillé) - Implied Pts: légende couleurs barres (vert Hausse / rose Baisse) - investinglive.ts tryUrl: cache no-store au lieu de revalidate:21600 (les 404 cachées empêchaient de trouver l'article de la semaine précédente) Co-Authored-By: Claude Sonnet 4.6 --- components/CurrencyCard.tsx | 32 +++++++++++++++++++++++++++----- lib/investinglive.ts | 2 +- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/components/CurrencyCard.tsx b/components/CurrencyCard.tsx index ac29b6b..a5069ca 100644 --- a/components/CurrencyCard.tsx +++ b/components/CurrencyCard.tsx @@ -497,8 +497,19 @@ function OISEnhancedBlock({ ratePath }: { ratePath: CBRatePath }) { {/* Chart 1 — Implied Interest Rate Curve */} {chartTab === "curve" && (
-
- Courbe de taux implicite{ilDelta ? " · blanc = actuel · bleu = sem. préc. (approx)" : ""} + {/* Légende visuelle */} +
+ Courbe de taux implicite +
+ + + Actuel + + + + {ilDelta ? `Sem. préc. (${ilDelta.prevDate})` : "Sem. préc. (indispo)"} + +
@@ -507,7 +518,7 @@ function OISEnhancedBlock({ ratePath }: { ratePath: CBRatePath }) { domain={[minR - yMargin, maxR + yMargin]} tickFormatter={(v: number) => v.toFixed(2)} /> [`${v.toFixed(3)}%`, name === "current" ? "Actuel" : "Sem. préc."]} /> @@ -522,7 +533,18 @@ function OISEnhancedBlock({ ratePath }: { ratePath: CBRatePath }) { {/* Chart 2 — Implied Points (bps cumulatifs par réunion) */} {chartTab === "implied" && (
-
Implied Points (bps par réunion)
+ {/* Légende couleurs barres */} +
+ Implied Points (bps par réunion) +
+ + Hausse + + + Baisse + +
+
@@ -530,7 +552,7 @@ function OISEnhancedBlock({ ratePath }: { ratePath: CBRatePath }) { tickFormatter={(v: number) => `${v}bps`} /> [`${v > 0 ? "+" : ""}${v.toFixed(1)}bps`, "Implied"]} /> diff --git a/lib/investinglive.ts b/lib/investinglive.ts index 375015f..f7b7591 100644 --- a/lib/investinglive.ts +++ b/lib/investinglive.ts @@ -55,7 +55,7 @@ async function tryUrl(daysAgo: number): Promise { const res = await fetch(url, { method: "HEAD", headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/124.0.0.0 Safari/537.36" }, - next: { revalidate: 21600 }, + cache: "no-store", }); return res.ok ? { url, dateStr, daysAgo } : null; } catch { return null; }