PhoenixKit 2.21.5: Flash messages close on their own again
PhoenixKit 2.21.5 fixes flash messages that could stay on screen indefinitely.
Any change to a page’s messages, even to a message of another kind, restarted the timer of every message already shown. On a busy page a message could therefore never disappear. The timer now restarts only when the text of that message really changes.
The Development site preset under Website access no longer turns on the visitor notice bar, since the admin header already marks a development site with a “[dev]” tag. The preset now only turns on the password gate and hides the site from search engines. The notice itself is still available.
Upgrading
A site that applied the preset before keeps its notice on until you turn it off on the Website access page.
Full release notes: PhoenixKit 2.21.5
2.21.5 · 8 September 2026
Changed
- The “Development site” preset (Website Access settings) no longer switches on the visitor notice bar — the admin header’s automatic “[dev]” tag (added in 2.21.3) already tells an admin apart from production, so the preset only needs the password gate and hiding from search engines now. The notice feature itself is unchanged and still available for hosts that want a visitor-facing banner for any reason (maintenance, under construction, or their own dev-site text). Existing installs that already applied the old preset keep their notice switched on until turned off by hand on Settings → Website Access → Notice.
Fixed
- Flash notifications could get stuck on screen indefinitely instead of
auto-dismissing.
@flashis one Phoenix assign covering all three kinds (info/warning/error), so putting or clearing a different kind’s flash — or the same kind with unchanged text — marks the whole assign dirty and re-diffs every currently-shown flash node, not just the one that actually changed. TheFlashAutoDismisshook’supdated()callback (added in 2.21.0 to fix a related issue) treated every such patch as “a new message landed” and unconditionally restarted the dismiss timer, so a flash on a page where anything else touched flash state could sit on screen forever. It now fingerprints the message text and only restarts the timer when it actually changed.
PhoenixKit 2.21.5. Install or update: {:phoenix_kit, "~> 2.21"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.