@autobusal/providers 1.6.5 → 1.6.6

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ All notable changes to `@autobusal/providers` are documented here. This project
4
4
  adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.6.6] - 2026-07-31
8
+
9
+ ### Fixed
10
+
11
+ - **`Providers.tsx`: `Setup` (and its `useGetMenu()` call) now has its own
12
+ inner `<Suspense>` boundary**, instead of sharing the outer one with
13
+ `Recaptcha`/`Styles`/`Notifications`. `Setup` calls a second,
14
+ independently-resolving `useSuspenseQuery` (`get-menu`) after
15
+ `useGetSettings()`; on a cold menu cache this suspended AFTER
16
+ Recaptcha's `GoogleReCaptchaProvider` had already committed and
17
+ injected its script/badge - and a Suspense boundary that re-suspends
18
+ discards its already-committed content and remounts it once ready.
19
+ `GoogleReCaptchaProvider` isn't remount-safe (its script/badge
20
+ injection is async, outside React's own DOM bookkeeping), so the
21
+ remount left a duplicate, half-torn-down `.grecaptcha-badge` behind.
22
+ That corrupted DOM state then threw an uncaught `TypeError: Cannot
23
+ read properties of null (reading 'removeChild')` the next time React
24
+ reconciled anywhere near the root - i.e. on every subsequent route
25
+ change, since Recaptcha wraps the whole router. The exception isn't
26
+ caught by the app's `ErrorBoundary` (render-phase only), so it
27
+ silently aborted the commit: the URL would update (the router's
28
+ `history.pushState` already ran) but the page itself never
29
+ re-rendered - freezing client-side navigation app-wide, most visibly
30
+ reproduced via the account dropdown menu (Password, Telegram, and the
31
+ impersonation-aware Logout/"Return to my account" link, which is what
32
+ surfaced this).
33
+
7
34
  ## [1.6.5] - 2026-07-31
8
35
 
9
36
  ### Added
package/Providers.tsx CHANGED
@@ -24,16 +24,38 @@ const Providers = ({ type, loading, children }: Props): JSX.Element => (
24
24
  // Recaptcha moved INSIDE Queries: it now reads the label's runtime captcha
25
25
  // settings via useGetSettings(), which needs the QueryClientProvider (and
26
26
  // suspends into the outer boundary on a cold cache, like Styles/Setup).
27
+ // Edited: Ferjolt Ozuni - Date: 2026-07-31
28
+ // Bug: Setup also calls useGetMenu() (a SEPARATE useSuspenseQuery, its own
29
+ // cache key/promise) in its own render body, still inside this same outer
30
+ // boundary. On a cold menu cache, that suspends AFTER Recaptcha/Styles/
31
+ // Notifications above it have already committed - and a Suspense boundary
32
+ // re-suspending after its content is already committed hides/discards that
33
+ // whole committed subtree and mounts it again once ready. Recaptcha's
34
+ // GoogleReCaptchaProvider isn't remount-safe: its script/badge injection is
35
+ // async and outside React's DOM bookkeeping, so remounting it left a
36
+ // duplicate, half-torn-down <div class="grecaptcha-badge"> behind. That
37
+ // corrupted DOM state then threw an uncaught "Cannot read properties of
38
+ // null (reading 'removeChild')" the next time React reconciled anywhere
39
+ // near the root - which is every route change, since Recaptcha wraps the
40
+ // whole router - silently aborting the commit. The URL would update (the
41
+ // router's history.pushState already ran) but the page itself would never
42
+ // re-render, freezing navigation app-wide with no console-visible error
43
+ // (uncaught DOM exceptions like this don't hit the render-phase-only
44
+ // ErrorBoundary). Giving Setup its own inner boundary means its menu
45
+ // suspension can only hide/retry ITSELF, not the already-committed
46
+ // Recaptcha/Styles/Notifications above it.
27
47
  <Suspense fallback={ loading }>
28
48
  <Queries>
29
49
  <Recaptcha>
30
50
  <Styles>
31
51
  <Notifications>
32
- <Setup type={ type }>
33
- <Suspense fallback={ loading }>
34
- { children }
35
- </Suspense>
36
- </Setup>
52
+ <Suspense fallback={ loading }>
53
+ <Setup type={ type }>
54
+ <Suspense fallback={ loading }>
55
+ { children }
56
+ </Suspense>
57
+ </Setup>
58
+ </Suspense>
37
59
  </Notifications>
38
60
  </Styles>
39
61
  </Recaptcha>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"