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();