Skip to content

Banners: report the close of "until dismissed" banners - #205

Merged
boehlerlukas merged 1 commit into
masterfrom
feature/banner-until-dismissed
Nov 9, 2026
Merged

boehlerlukas merged 1 commit into
masterfrom
feature/banner-until-dismissed

Conversation

@floooat

@floooat floooat commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Until dismissed banners: shown on every page load until the person closes them. Server: GleapSDK/Server#2838 · Dashboard: GleapSDK/Frontend#2882

What changes (GleapBannerManager)

  • A banner action with untilDismissed: true reports its close (the X or any banner button, both post banner-close) as the streamed event outbound-<outboundId>-closed, flushed right away instead of on the next 2.5 s tick.
  • The closed engagement is remembered per contact (gleap-closed-banners-<gleapId> in localStorage, max 50). A remembered banner is not shown again; the close is re-sent once per page load, so a close that never reached the server (tab closed before the flush) heals.
  • An until-dismissed banner already on screen is not injected again when the next trigger (e.g. a page view) delivers it.
  • Banners without the flag behave exactly as before.

Release

Must ship as 19.5.0: the server only enables the mode for JS SDK ≥ 19.5.0 (UNTIL_DISMISSED_MIN_JS_SDK). If the version differs, update it in the Server and Frontend PRs. build/ and published/ are untouched; the release step generates them.

Testing

  • npx jest: 619/619 pass (7 new tests in GleapBannerManager.test.js).
  • npm run build compiles.

🤖 Generated with Claude Code

An until-dismissed banner (action.untilDismissed) sends the streamed event
outbound-<id>-closed when its X or a button closes it, flushed right away,
and is remembered per contact in localStorage. A remembered banner is not
shown again; the close is re-sent once per page load so a close that never
reached the server heals. One already on screen is not injected again on
the next trigger. Other banners behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boehlerlukas
boehlerlukas merged commit 8670d0e into master Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants