Skip to content

[codex] enable DocSearch insights#1299

Merged
jderochervlk merged 1 commit into
masterfrom
codex/enable-docsearch-insights
May 10, 2026
Merged

[codex] enable DocSearch insights#1299
jderochervlk merged 1 commit into
masterfrom
codex/enable-docsearch-insights

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

Context

Algolia's recommended DocSearch path for tracking search result interactions is to enable the built-in Insights integration on the DocSearch modal. The project already depends on search-insights, but the modal binding did not expose or pass the insights prop.

Changes

  • Add the optional insights prop to the ReScript DocSearchModal binding.
  • Pass insights=true from the active search modal.
  • Add a browser regression test that renders the active DocSearch modal and verifies the Insights loader is registered.

Validation

  • yarn build:res
  • env VITE_ALGOLIA_APP_ID= VITE_ALGOLIA_INDEX_NAME= VITE_ALGOLIA_SEARCH_API_KEY= ../../node_modules/.bin/vitest __tests__/Search_.test.jsx --run --browser.headless

The Algolia env vars are blanked for the Search browser suite so the existing disabled-search test remains deterministic in a workspace with .env.local search credentials.

Enable the built-in Algolia Insights integration on the DocSearch modal so search result interactions are tracked by DocSearch. Add a browser regression test that verifies the Insights loader is registered when the active search modal renders.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Cloudflare deployment

Deployement ID: 91215a76-1cf8-4e84-84f1-39210119e507
Deployment Environment: preview

⛅️ wrangler 4.85.0
───────────────────
✨ Compiled Worker successfully
Uploading... (7577/8057)
Uploading... (7737/8057)
Uploading... (7897/8057)
Uploading... (8057/8057)
✨ Success! Uploaded 480 files (7577 already uploaded) (4.01 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://91215a76.rescript-lang.pages.dev
✨ Deployment alias URL: https://codex-enable-docsearch-insig.rescript-lang.pages.dev

@jderochervlk jderochervlk marked this pull request as ready for review May 9, 2026 20:51
@jderochervlk jderochervlk merged commit 78bc4a5 into master May 10, 2026
6 checks passed
@jderochervlk jderochervlk deleted the codex/enable-docsearch-insights branch May 10, 2026 17:42
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.

2 participants