From 09becb3d000ee999826438c8c2544abcf66b473a Mon Sep 17 00:00:00 2001 From: npeter83 Date: Sun, 20 Sep 2026 16:33:26 +0200 Subject: [PATCH] fix(plex): pin the compact currency format instead of inheriting the engine's `{ notation: "compact", maximumFractionDigits: 1 }` leaves the MINIMUM to the engine, and engines disagree: the same options render "$160.0M" on Node 22 and "$160M" on Node 24 (measured 2026-09-20 in node:22-bookworm, the image the server gate runs, against the local Node 24.17). Browsers split along the same line, so a viewer on an older engine saw the padded form. `minimumFractionDigits: 0` makes both render "$160M"; the plain `compact` helper (vote counts) was measured too and already agrees on both. This is why the server gate's frontend job was red on PlexInfo since 09-17 while the local gate was green: the two run different Node versions. --- frontend/src/components/PlexInfo.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/PlexInfo.tsx b/frontend/src/components/PlexInfo.tsx index 0614e766..7475f54e 100644 --- a/frontend/src/components/PlexInfo.tsx +++ b/frontend/src/components/PlexInfo.tsx @@ -35,6 +35,11 @@ const money = (n: number) => notation: "compact", style: "currency", currency: "USD", + // The minimum is load-bearing, not a default written out: given only a maximum, a compact + // format is free to pad to it. The very same options render "$160.0M" on Node 22 and "$160M" + // on Node 24 (measured 2026-09-20 — the server gate was red on exactly this while the local one + // was green), and browsers split along the same line. Pin it rather than inherit the engine's. + minimumFractionDigits: 0, maximumFractionDigits: 1, }).format(n);