Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
superwall-docs-staging | c89d158 | Commit Preview URL Branch Preview URL |
Apr 14 2026, 08:40 PM |
| const grouped = new Map<string, StaticSearchDocument[]>(); | ||
|
|
||
| for (const id of results) { | ||
| const doc = index.get(id) as StaticSearchDocument | null; |
There was a problem hiding this comment.
FlexSearch Document likely lacks get() method
High Severity
searchStaticSearchIndex calls index.get(id) to retrieve stored documents, but FlexSearch's Document class does not have a documented get() method. The documented API includes add, update, remove, search, and searchAsync, but no get(). If this method doesn't exist at runtime, it will throw a TypeError, completely breaking static search. Stored documents are typically accessed via index.store[id] or by using the enrich option in search.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 41dbe6a. Configure here.
| await runAgentBrowser(sessionName, profileDir, cwd, ["fill", inputRef, currentValue]); | ||
| if (!currentValue.endsWith(char)) { | ||
| throw new Error("failed to update search input during typing simulation"); | ||
| } |
There was a problem hiding this comment.
Benchmark typing validation checks local variable, not browser
Low Severity
The validation currentValue.endsWith(char) is a tautology — currentValue was just set to ${currentValue}${char} on line 443, so it always ends with char. This error is never thrown. The intent was likely to verify the browser input state was updated, not the local variable. As written, the typing simulation silently proceeds even if the browser fill command fails.
Reviewed by Cursor Bugbot for commit 97dfa66. Configure here.
| "flutter", | ||
| "expo", | ||
| "react-native", | ||
| ] as const; |
There was a problem hiding this comment.
Exported constants only used within defining module
Low Severity
SHARED_SEARCH_GROUP, COMMUNITY_SEARCH_GROUP, and SDK_SEARCH_GROUPS are all exported but never imported by any other file in the codebase. They're only referenced internally within search.shared.ts itself (in the type definitions and helper functions). These exports expand the module's public API surface without any consumers.
Reviewed by Cursor Bugbot for commit 97dfa66. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c89d158. Configure here.
| } | ||
|
|
||
| return [...COMMON_SEARCH_GROUPS, COMMUNITY_SEARCH_GROUP]; | ||
| } |
There was a problem hiding this comment.
Default search excludes all SDK-specific content
High Severity
getSearchGroupsForScope(undefined) returns only common + community groups, actively excluding all SDK groups (ios, android, flutter, expo, react-native). Since tags is always passed to the search client (never undefined), the default search state now filters OUT all SDK-specific pages. Previously, tag was undefined when no scope was selected, meaning all content was searchable. Now a user typing "purchase controller" without first selecting a scope gets zero SDK results.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c89d158. Configure here.


This switches production docs search to a prebuilt static FlexSearch index while keeping the API-backed path for development. It also adds SDK tag-aware indexing, reduces the search debounce, and generates the search bundle during normal and staging Cloudflare builds. The branch includes an end-to-end browser benchmark script that measures both API-backed and static-index search behavior against a supplied URL. Validation: bun test, bun run build:cf, and a local production-preview search smoke test.
Note
Medium Risk
Introduces a new production search path (static index generation, loading, and ranking) and changes build/deploy scripts, so regressions could impact docs search availability/performance.
Overview
Production docs search is switched to a prebuilt static FlexSearch index: a new
scripts/generate-search-index.tsbuildsdist/client/docs/search-index.json, and the search UI loads/caches it via a newcreateStaticSearchClient.Search now supports scope-aware tagging (SDK + common groups) via
search.shared.ts, updates the search API to use the same indexing logic in dev, and reduces debounce to100ms.Adds an end-to-end search benchmark script (
scripts/search-benchmark.ts), integrates an “Ask AI” Superchat launcher + Cmd/Ctrl+I hotkey into the search dialog, and enablesAgentationin dev. Build scripts are updated so Cloudflare staging builds run the full build (including index generation), and new depsflexsearch/agentationare added.Reviewed by Cursor Bugbot for commit c89d158. Bugbot is set up for automated code reviews on this repo. Configure here.