From a3c8341c7681d5f4b289cb5f14b8e50889ee7045 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Wed, 22 Jul 2026 00:00:44 +0200 Subject: [PATCH] fix(release-notes): ring the newest entry when the highlight version is unknown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /code-review (S1, finding 3): C-3.19 switched the banner from CURRENT_VERSION (always RELEASE_NOTES[0]) to FRONTEND_VERSION (VITE_APP_VERSION), which is "dev" in the Vite dev server and can drift from the notes — so the modal highlighted nothing. The modal (which already imports RELEASE_NOTES, keeping App decoupled) now falls back to the newest note when the passed version isn't listed. --- frontend/src/components/ReleaseNotes.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ReleaseNotes.tsx b/frontend/src/components/ReleaseNotes.tsx index 0934dda..19d1d6c 100644 --- a/frontend/src/components/ReleaseNotes.tsx +++ b/frontend/src/components/ReleaseNotes.tsx @@ -20,13 +20,19 @@ export default function ReleaseNotes({ highlight?: string; }) { const { t } = useTranslation(); + // Ring the newest note if `highlight` isn't one of the listed versions — e.g. a Vite dev build + // where the caller's FRONTEND_VERSION is "dev", or a VERSION bump whose note hasn't landed yet — + // so the banner always rings *something* current instead of nothing. + const active = RELEASE_NOTES.some((r) => r.version === highlight) + ? highlight + : RELEASE_NOTES[0]?.version; return (
{RELEASE_NOTES.map((r) => (

v{r.version}