@nebulr-group/bridge-svelte 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -303,8 +303,16 @@ export function startBridgeRuntime(options = {}) {
303
303
  // TBP-660 — the TOKEN refresh above is skipped for a self-induced
304
304
  // reconnect; the STATE catch-up is not. Losing pushes is a property of
305
305
  // the socket swap, whoever caused it, and the catch-up cannot loop.
306
- if (_connectedOnce)
307
- requestCatchUp();
306
+ //
307
+ // TBP-686 — and it runs on the FIRST connect too. It used to be gated on
308
+ // `_connectedOnce`, which read as "only repair a reconnect" — but the
309
+ // first connect is exactly where the snapshot goes missing: the server
310
+ // publishes it fire-and-forget during authorize, before the subscription
311
+ // is live, so it loses the race and there is nothing to replay. The result
312
+ // was a signed-in page with a null workspace id, name and branding for the
313
+ // whole session. `requestCatchUp` already returns early when signed out
314
+ // and coalesces concurrent calls, so this costs one request per session.
315
+ requestCatchUp();
308
316
  _connectedOnce = true;
309
317
  for (const fn of _onOpenSubs) {
310
318
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebulr-group/bridge-svelte",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Bridge Svelte library, This library helps you to add bridge authentication and feature flags, and payments to your svelte application.",
5
5
  "author": "Iman Pouya",
6
6
  "license": "MIT",
@@ -79,7 +79,7 @@
79
79
  "typescript": "^6.0.0",
80
80
  "vite": "^6.2.6",
81
81
  "vitest": "^4.1.4",
82
- "@nebulr-group/bridge-auth-core": "0.7.1"
82
+ "@nebulr-group/bridge-auth-core": "0.7.2"
83
83
  },
84
84
  "keywords": [
85
85
  "svelte",