Skip to content

Fix Expo user attribute removal docs#214

Merged
dcrawbuck merged 2 commits into
mainfrom
dcrawbuck/fix-expo-nil-docs
Jun 17, 2026
Merged

Fix Expo user attribute removal docs#214
dcrawbuck merged 2 commits into
mainfrom
dcrawbuck/fix-expo-nil-docs

Conversation

@dcrawbuck

@dcrawbuck dcrawbuck commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

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 that undefined keys are ignored, and notes that nullable attributes require expo-superwall 1.0.5 or later.
The Flutter page no longer shows a non-compiling null removal example because its SDK currently accepts non-null Object values.

Validation

  • bun run build:cf
  • bun test
  • /Users/dcrawbuck/.agents/skills/autoreview/scripts/autoreview --mode local

Note

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, that undefined keys are dropped on the bridge, and the expo-superwall 1.0.5+ requirement; Flutter explicitly states attribute deletion via null is not supported.

Separately, several server routes (search, markdown/LLM/SDK .md/.mdx, sitemap) load @/lib/search, @/lib/markdown-route, and @/lib/source via dynamic import() at request time, with search typed behind a small DocsSearchServer interface and handleSearchGet made async. Vite adds TanStack Router codeSplittingOptions so 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.

@dcrawbuck dcrawbuck marked this pull request as ready for review June 16, 2026 19:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread src/routes/api/search.ts

// 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");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1f1ee1d. Configure here.

@dcrawbuck dcrawbuck merged commit d0ecf4c into main Jun 17, 2026
3 checks passed
@dcrawbuck dcrawbuck deleted the dcrawbuck/fix-expo-nil-docs branch June 17, 2026 19:09
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