Skip to content

Messenger frame: load watchdog, back/forward-cache restore and a clean reset so the widget opens on iPhone - #215

Merged
boehlerlukas merged 1 commit into
masterfrom
gleap/g2-ios-widget-open
Nov 13, 2026
Merged

boehlerlukas merged 1 commit into
masterfrom
gleap/g2-ios-widget-open

Conversation

@boehlerlukas

Copy link
Copy Markdown
Contributor

What (GleapFrameManager.js)

  • Load watchdog (10 s per stage): no ping → load the messenger into the frame directly; still nothing → remove the frame so the next tap starts fresh (before: full-screen loader with no close button on phones).
  • pageshow (persisted): a still-loading frame is rebuilt and reopened; a connected one gets its classes fixed and state re-sent.
  • A second open before the ping keeps the loader up instead of a blank frame.
  • destroy() resets comReady and clears the watchdog, so a re-init (e.g. setLanguage) doesn't send queued messages to a frame that isn't ready.

Why

G2 review (Vira C., Feb 2026): sometimes Gleap doesn't open on iPhone without restarting. Root cause not certain from code; this hardens the three likeliest causes.

Checks

  • 7 new tests; npx jest 40 suites / 750 tests ✅; npm run build compiles (build/ and published/ left out). No CHANGELOG entry (comes with the version bump).
  • Not tested on a real iPhone. Needs a device check before the next SDK release.

🤖 Generated with Claude Code

…n reset so the widget opens on iPhone

On iOS Safari the launcher sometimes didn't open the widget until a reload.
- Load watchdog (10 s per stage): no ping from the messenger → load it into
  the frame directly; still nothing → remove the frame so the next tap
  starts fresh, instead of a full-screen loader with no way out.
- pageshow (persisted): a frame that was still loading is rebuilt and
  reopened; a connected one gets its open/closed classes and state re-sent.
- A second open before the ping keeps the loader up, not a blank frame.
- destroy() resets comReady and clears the watchdog, so a re-init
  (e.g. setLanguage) doesn't send queued messages to a frame not yet ready.

From a G2 review (Vira C., Feb 2026). Not yet tried on a real iPhone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boehlerlukas
boehlerlukas merged commit 5f544d9 into master Nov 13, 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.

1 participant