From 2572132117b37d41f574e3c8345c7bf994765707 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 6 Sep 2026 16:27:00 +0200 Subject: [PATCH] fix(notices): let the 4.0.0 release modal cover the whole 4.x line The version window already said 4.0.0 to 5.0.0, and the test above it is even called "covers the whole 4.x line", but that was only half the story: without `recurring: 'per-version'` a notice falls back to a one-time dismissal, so everyone who closed the modal on 4.0.0 never saw it again. It did not come back on 4.1, 4.2 or 4.2.1, which is the opposite of what the window says. The mechanism was already there and in use one entry below, on thank-you-support. The dismissal path records the app version it was closed at, so the notice re-surfaces on the next upgrade and stays down within the same version. Rows dismissed before that column existed read as 0.0.0 and simply come back once. --- server/src/systemNotices/registry.ts | 7 +++++-- server/tests/unit/systemNotices/registry.test.ts | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/server/src/systemNotices/registry.ts b/server/src/systemNotices/registry.ts index faf2f8198..20e901348 100644 --- a/server/src/systemNotices/registry.ts +++ b/server/src/systemNotices/registry.ts @@ -36,10 +36,13 @@ export const RETIRED_NOTICE_IDS = [ export const SYSTEM_NOTICES: SystemNotice[] = [ // ── 4.0.0 release — what shipped, and a note from the maintainer ──────────── // Carries `release`, so it renders as the two-column release modal rather than - // the generic notice body. Shown once, not per-version: the copy is about this - // release. The next one gets its own entry with its own id. + // the generic notice body. 4.0.0 was big enough that the whole 4.x line should + // carry it, so `recurring: 'per-version'` brings it back on each upgrade inside + // the window rather than the default one-time dismissal, which retired it for + // everyone who closed it once on 4.0.0. A 5.x release gets its own entry. { id: 'release-4-0-0', + recurring: 'per-version', display: 'modal', severity: 'info', titleKey: 'system_notice.release_400.headline', diff --git a/server/tests/unit/systemNotices/registry.test.ts b/server/tests/unit/systemNotices/registry.test.ts index 0d7a4d6c7..aab20dc0e 100644 --- a/server/tests/unit/systemNotices/registry.test.ts +++ b/server/tests/unit/systemNotices/registry.test.ts @@ -82,6 +82,14 @@ describe('registry integrity', () => { expect(isNoticeVersionActive(release!, '5.0.0')).toBe(false); }); + it('the 4.0.0 release notice comes back on each upgrade inside that line', () => { + const release = SYSTEM_NOTICES.find(n => n.id === 'release-4-0-0')!; + // The version window above is only half of "covers the whole 4.x line". Without + // this, the default one-time dismissal retired the notice for everyone who + // closed it on 4.0.0, so none of them saw it again on 4.1, 4.2 or later. + expect(release.recurring).toBe('per-version'); + }); + it('the thank-you notice hands over to the release modal at 4.0.0', () => { const thankYou = SYSTEM_NOTICES.find(n => n.id === 'thank-you-support'); expect(thankYou).toBeDefined();