fix: GitHub Actions push permission + submodule + dashboard Taux tab

- add permissions: contents: write + persist-credentials to workflow
- git rm --cached Market-Signal-Finder (submodule sans .gitmodules)
- consolide OIS+STIR en onglet Taux (3 sous-onglets: Courbe/Probabilités/Réunions)
- header summary: 1 ligne, fix bug Hold/Hold, taux actuel dans légende chart
- cache stale: seuil 48h → 7j pour dev local
- stale-while-revalidate: affiche cache immédiatement, refetch en arrière-plan (10s)
- redesign tooltip chart Courbe (Actuel/Sem. préc./Δsem. en bps)
- YAxis affiche taux complets (3.63% vs .63 tronqué)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
caty21
2026-06-29 17:05:50 +02:00
parent 1a086af8e7
commit 416c5348f2
5 changed files with 235 additions and 276 deletions
+10 -7
View File
@@ -225,7 +225,7 @@ function loadCachedRPBody(ccy: string, _slug: string): Record<string, unknown> |
const entry = parsed.data?.[ccy] as Record<string, unknown> | undefined;
if (!entry) return null;
const ageMs = Date.now() - new Date(parsed.fetchedAt).getTime();
if (ageMs > 48 * 60 * 60 * 1000) { // ignore si > 48h (GitHub Actions peut ne pas tourner quotidiennement)
if (ageMs > 168 * 60 * 60 * 1000) { // ignore si > 7 jours
console.warn(`[rate-prob] cache stale (${Math.round(ageMs / 3600000)}h), skipping`);
return null;
}
@@ -358,11 +358,12 @@ export async function fetchAllCBPaths(): Promise<RateProbData> {
const path = data[ccy];
if (!path) continue;
if (typeof ilEntry.bpsYearEnd !== "number") continue;
if (ilEntry.nextMeetingIsNoChange && Math.abs(ilEntry.bpsYearEnd) < 10) continue;
if (ilEntry.nextMeetingIsNoChange && Math.abs(ilEntry.bpsYearEnd) < 5) continue;
const yearEndImplied = ccy === "CHF"
? parseFloat((path.currentRate + ilEntry.bpsYearEnd / 100).toFixed(4))
: path.yearEndImplied;
// Giuseppe lit le STIR complet (toutes les réunions jusqu'en déc) et publie le cumul bps year-end.
// Le Rate Monitor Investing.com ne capture parfois que 2-3 réunions → yearEndImplied partiel.
// → On utilise toujours Giuseppe comme source authoritative pour le cumul fin d'année.
const yearEndImplied = parseFloat((path.currentRate + ilEntry.bpsYearEnd / 100).toFixed(4));
let ilDelta: ILWeeklyDelta | undefined;
const prevEntry = ilPrev[ccy];
@@ -370,13 +371,15 @@ export async function fetchAllCBPaths(): Promise<RateProbData> {
ilDelta = {
probDelta: parseFloat((ilEntry.nextMeetingProbPct - prevEntry.nextMeetingProbPct).toFixed(1)),
bpsDelta: ilEntry.bpsYearEnd - prevEntry.bpsYearEnd,
isCut: !ilEntry.nextMeetingIsHike && !ilEntry.nextMeetingIsNoChange,
isCut: ilEntry.bpsYearEnd < 0,
prevDate,
};
}
const ilProb = ilEntry.nextMeetingProbPct;
const ilIsCut = !ilEntry.nextMeetingIsHike && !ilEntry.nextMeetingIsNoChange;
// Direction basée sur le signe de bpsYearEnd (plus fiable que nextMeetingIsHike
// qui est faux quand Giuseppe dit "no change" à la prochaine réunion mais hausse year-end)
const ilIsCut = ilEntry.bpsYearEnd < 0;
const m0 = path.meetings[0];
const stirProb = m0?.probMovePct ?? 0;