Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
superwall-docs-staging | 97dfa66 | Apr 14 2026, 12:46 AM |
| 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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 97dfa66. 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.


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
Changes the docs search architecture and build pipeline (new static index generation and client-side loading), which could affect search correctness and deploy-time artifacts if misconfigured.
Overview
Production docs search now uses a prebuilt static FlexSearch index: a new build step generates
dist/client/docs/search-index.json, and the search UI loads it via a new static search client instead of calling the search API.Search indexing is updated to be scope/tag-aware (shared + SDK scopes), the search debounce is reduced, and the dev path continues to use the API route (now backed by the new FlexSearch-based docs search builder).
Adds tooling to evaluate search performance/behavior: a new
benchmark:searchscript usingagent-browser, plus dev-onlyAgentationintegration for debugging.Reviewed by Cursor Bugbot for commit 97dfa66. Bugbot is set up for automated code reviews on this repo. Configure here.