From 2cf2ee9351a292baa5a8e7011622280410dfdbc4 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 30 Jul 2026 23:43:55 -0400 Subject: [PATCH] Widget: dispatch bitlogin-offer-pending when the offer screen shows Hosts that keep the element hidden until needed (the recommended permanent-mount pattern) listen for this to reveal it; the silent outcomes (duplicate, unavailable) never fire it, so nothing flashes for a no-op. Already shipped in the vendored builds consuming this -- the source line lagged the artifact, which this commit corrects. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01CMr9Yt8SYmZcfgrg3CV2G1 --- packages/widget/src/element.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/widget/src/element.ts b/packages/widget/src/element.ts index 55414c6..036f9bc 100644 --- a/packages/widget/src/element.ts +++ b/packages/widget/src/element.ts @@ -289,6 +289,10 @@ export class BitLoginAuthElement extends HTMLElement { label: options.label?.trim() || `${appName} wallet`, resolve }; + // Hosts that keep this element hidden until needed (the recommended + // permanent-mount pattern) listen for this to reveal it: the silent + // outcomes above never fire it, so nothing flashes for a duplicate. + this.dispatchEvent(new CustomEvent("bitlogin-offer-pending")); this.goto("vault-offer"); }); }