Replace Inkeep with keyword-only Algolia search - #6859
Conversation
Greptile SummaryThe PR replaces the Inkeep search integration with a client-only, keyword-based Algolia implementation while retaining deprecated compatibility imports.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/reflex-site-shared/src/reflex_site_shared/styles/assets/components/AlgoliaSearch.tsx | Implements the client-side Algolia search dialog, result normalization, request lifecycle, accessibility behavior, theme-aware portal, and responsive styling; no eligible follow-up defect was established. |
| packages/reflex-site-shared/src/reflex_site_shared/components/algolia.py | Defines the shared NoSSR Algolia component and navbar-compatible wrapper. |
| packages/reflex-site-shared/src/reflex_site_shared/components/inkeep.py | Preserves the former Inkeep imports as deprecated aliases that render the Algolia replacement. |
| packages/reflex-site-shared/src/reflex_site_shared/plugins.py | Adds the Algolia TypeScript component to the plugin’s published static assets. |
| packages/reflex-site-shared/src/reflex_site_shared/templates/docs.py | Changes the default docs search control from Inkeep to the shared Algolia component. |
| docs/app/reflex.lock/bun.lock | Removes Inkeep and its unused transitive dependencies from the generated frontend lockfile. |
| tests/units/reflex_site_shared/test_algolia.py | Verifies the generated Algolia asset’s configuration and key interaction, request, accessibility, and styling contracts. |
Reviews (5): Last reviewed commit: "docs: deprecate legacy Inkeep search ali..." | Re-trigger Greptile
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bf59e0fc9
ℹ️ 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".
There was a problem hiding this comment.
All reported issues were addressed across 14 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
2 issues found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/reflex-site-shared/src/reflex_site_shared/styles/assets/components/AlgoliaSearch.tsx">
<violation number="1" location="packages/reflex-site-shared/src/reflex_site_shared/styles/assets/components/AlgoliaSearch.tsx:488">
P2: Changing a query leaves prior-query links clickable until the replacement request completes, so a click can navigate to a result unrelated to the visible query. Clear `hits` when a cache miss starts (or hide results during loading) before exposing the new query.</violation>
</file>
<file name="packages/reflex-site-shared/src/reflex_site_shared/components/inkeep.py">
<violation number="1" location="packages/reflex-site-shared/src/reflex_site_shared/components/inkeep.py:16">
P3: Deprecation warnings identify `inkeep.py` rather than the downstream legacy call site, so users cannot locate usages and separate callers share one dedupe key. Treat `reflex_site_shared` as a framework frame (or add caller-location support to `console.deprecate`) before emitting this warning.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| }, [isOpen]); | ||
| const activeResultId = | ||
| activeIndex >= 0 ? `${resultsId}-result-${activeIndex}` : undefined; | ||
| const showResults = |
There was a problem hiding this comment.
P2: Changing a query leaves prior-query links clickable until the replacement request completes, so a click can navigate to a result unrelated to the visible query. Clear hits when a cache miss starts (or hide results during loading) before exposing the new query.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/reflex-site-shared/src/reflex_site_shared/styles/assets/components/AlgoliaSearch.tsx, line 488:
<comment>Changing a query leaves prior-query links clickable until the replacement request completes, so a click can navigate to a result unrelated to the visible query. Clear `hits` when a cache miss starts (or hide results during loading) before exposing the new query.</comment>
<file context>
@@ -467,28 +448,45 @@ export function AlgoliaSearch() {
+ }, [isOpen]);
+ const activeResultId =
+ activeIndex >= 0 ? `${resultsId}-result-${activeIndex}` : undefined;
+ const showResults =
+ status !== "idle" && (status !== "loading" || hits.length > 0);
</file context>
| Args: | ||
| feature_name: The legacy entry point used by the caller. | ||
| """ | ||
| console.deprecate( |
There was a problem hiding this comment.
P3: Deprecation warnings identify inkeep.py rather than the downstream legacy call site, so users cannot locate usages and separate callers share one dedupe key. Treat reflex_site_shared as a framework frame (or add caller-location support to console.deprecate) before emitting this warning.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/reflex-site-shared/src/reflex_site_shared/components/inkeep.py, line 16:
<comment>Deprecation warnings identify `inkeep.py` rather than the downstream legacy call site, so users cannot locate usages and separate callers share one dedupe key. Treat `reflex_site_shared` as a framework frame (or add caller-location support to `console.deprecate`) before emitting this warning.</comment>
<file context>
@@ -1,8 +1,55 @@
+ Args:
+ feature_name: The legacy entry point used by the caller.
+ """
+ console.deprecate(
+ feature_name=feature_name,
+ reason="Use the keyword-only Algolia search API instead.",
</file context>
What
@inkeep/cxkit-reactand its OpenAI/AI transitive dependencies from the docs lockfilesinkeepimports for downstream consumers/, Escape, focus trapping/restoration, responsive styling, query debounce/cache, and Algolia attributionWhy
The existing Inkeep integration includes AI chat code and does not reliably surface all current Reflex pages. In particular,
https://reflex.dev/docs/ai/integrations/anthropic/was missing from site search even though it is present in the Algolia page index. This change queries that page index directly and keeps the search experience lexical only—no AI requests or AI search dependency.Impact
The browser sends only standard Algolia keyword queries after a 350 ms debounce and two-character minimum. Results are limited to Reflex-owned URLs and the published search client requests at most 10 hits. Algolia crawler coverage and API-key rate limits are configured separately in the Algolia dashboard.
Verification
pytest -q tests/units/reflex_site_shared— 62 passedpytest -q docs/app/tests/test_docs_navbar.py— 6 passedgit diff --check— passedreflex compile --dry— compiled 1,009 pagesreflex run --env prod --single-port— production build passed and Safari smoke-tested in light and dark modeuv build --directory packages/reflex-site-shared— sdist and wheel passedManual Safari verification confirms
anthropicreturns the Anthropic integration page first.