Fix Expo user attribute removal docs#214
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f74474d606
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| :::expo | ||
| <Note> | ||
| If a paywall uses the **Set user attributes** action, the merged attributes are sent back to your app via the `onUserAttributesChange` callback in `useSuperwallEvents`. |
There was a problem hiding this comment.
Document a real Expo attribute-change hook
For Expo users trying to react to a paywall Set user attributes action, this points them to onUserAttributesChange, but the current expo-superwall event surface does not define or dispatch that callback: I checked upstream src/SuperwallEventCallbacks.ts and src/internal/superwallEventBridge.ts, and the callback list/switch only includes the existing paywall, subscription, log, purchase, and custom-callback events. Following this quickstart would therefore compile against a nonexistent callback (or never fire if forced through types); please document the supported Expo path or add the bridge before referencing it here.
Useful? React with 👍 / 👎.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
superwall-docs-staging | 1f1ee1d | Commit Preview URL Branch Preview URL |
Jun 17 2026, 06:54 PM |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1f1ee1d. Configure here.
|
|
||
| // In development, the fetch-based search client still hits this route. | ||
| // The production client loads a prebuilt FlexSearch index instead. | ||
| const { createDocsSearchApi } = await import("@/lib/search"); |
There was a problem hiding this comment.
Search server double initialization
Medium Severity
getServer checks server, then awaits a dynamic import before assigning. Concurrent /api/search requests can both pass the null check and each call createDocsSearchApi(), breaking the singleton and duplicating FlexSearch setup work on cold start.
Reviewed by Cursor Bugbot for commit 1f1ee1d. Configure here.


Summary
Clarifies the shared Setting User Attributes docs so each SDK sees platform-specific callback and attribute removal guidance.
The Expo page now tells users to unset attributes with
null, explains thatundefinedkeys are ignored, and notes that nullable attributes requireexpo-superwall1.0.5 or later.The Flutter page no longer shows a non-compiling
nullremoval example because its SDK currently accepts non-nullObjectvalues.Validation
bun run build:cfbun test/Users/dcrawbuck/.agents/skills/autoreview/scripts/autoreview --mode localNote
Low Risk
Mostly documentation and lazy-loading/build config; route behavior should be equivalent with a possible one-time async import on first request.
Overview
Updates Setting User Attributes so iOS, Android, Flutter, and Expo each get their own callback note and merge/unset behavior instead of one shared Swift-centric flow. Expo now documents unsetting with
null, thatundefinedkeys are dropped on the bridge, and theexpo-superwall1.0.5+ requirement; Flutter explicitly states attribute deletion vianullis not supported.Separately, several server routes (search, markdown/LLM/SDK
.md/.mdx, sitemap) load@/lib/search,@/lib/markdown-route, and@/lib/sourcevia dynamicimport()at request time, with search typed behind a smallDocsSearchServerinterface andhandleSearchGetmade async. Vite adds TanStack RoutercodeSplittingOptionsso loaders, components, and error/not-found chunks split by default—likely to keep heavy doc/source code out of the main server bundle.Reviewed by Cursor Bugbot for commit 1f1ee1d. Bugbot is set up for automated code reviews on this repo. Configure here.