Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Removes the Orama Cloud sync workflow/script and the custom searchbox/chat UI/components that depended on Updates configuration and deps accordingly: introduces Reviewed by Cursor Bugbot for commit 073cd74. Bugbot is set up for automated code reviews on this repo. Configure here. |
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/web-infra @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
There was a problem hiding this comment.
Pull request overview
This PR migrates the website search integration away from Orama Cloud toward a locally generated (and locally loaded) Orama database that merges the Learn + API docs indexes.
Changes:
- Generate a merged
orama-db.jsonduring site prebuild and load it client-side for search. - Replace the site’s Orama Cloud searchbox + chat integration with the UI-components
SearchBoxwired to the local DB. - Remove Orama Cloud configuration, sync workflow, and related scripts/tests.
Reviewed changes
Copilot reviewed 44 out of 46 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates lockfile for Orama package changes across workspaces. |
| packages/ui-components/src/hooks/useOrama.ts | Adds a hook to create a local Orama DB and lazy-load it from a JSON snapshot. |
| packages/ui-components/src/Common/Search/index.tsx | Adds a new SearchBox component that uses the local Orama hook. |
| packages/ui-components/src/Common/Search/index.module.css | Styles for the new SearchBox layout/footer. |
| packages/ui-components/src/Common/Search/Suggestions/index.tsx | Removes suggestions component (part of prior chat/suggestions UX). |
| packages/ui-components/src/Common/Search/Suggestions/index.module.css | Removes styles for suggestions component. |
| packages/ui-components/src/Common/Search/Results/index.tsx | Hardcodes search params (limit/threshold/boost) rather than receiving them from site. |
| packages/ui-components/src/Common/Search/Results/Hit/index.tsx | Simplifies hit rendering by removing now-unused chat/search mode handling. |
| packages/ui-components/src/Common/Search/README.md | Removes Orama search component README. |
| packages/ui-components/src/Common/Search/Chat/Trigger/index.tsx | Removes chat trigger UI. |
| packages/ui-components/src/Common/Search/Chat/Trigger/index.module.css | Removes chat trigger styles. |
| packages/ui-components/src/Common/Search/Chat/Input/index.tsx | Removes chat input UI. |
| packages/ui-components/src/Common/Search/Chat/Input/index.module.css | Removes chat input styles. |
| packages/ui-components/src/Common/Search/Chat/Actions/index.tsx | Removes chat actions UI. |
| packages/ui-components/src/Common/Search/Chat/Actions/index.module.css | Removes chat actions styles. |
| packages/ui-components/package.json | Swaps dependencies to use @orama/orama and moves @orama/core. |
| apps/site/turbo.json | Removes Orama Cloud env vars from turbo pipeline config. |
| apps/site/scripts/orama/index.mjs | New script that fetches two remote Orama DBs, merges them, and writes public/orama-db.json. |
| apps/site/scripts/orama/constants.mjs | Adds constants for remote Orama DB URLs. |
| apps/site/scripts/orama-search/sync-orama-cloud.mjs | Removes Orama Cloud sync script. |
| apps/site/scripts/orama-search/process-documents.mjs | Removes old document processing for cloud sync. |
| apps/site/scripts/orama-search/get-documents.mjs | Removes old document fetching logic for cloud sync. |
| apps/site/scripts/orama-search/tests/process-documents.test.mjs | Removes tests for deleted processing logic. |
| apps/site/scripts/orama-search/tests/get-documents.test.mjs | Removes tests for deleted fetching logic. |
| apps/site/package.json | Runs Orama DB generation in prebuild/dev/deploy and removes cloud sync script entry. |
| apps/site/next.constants.mjs | Removes Orama Cloud constants and default query/suggestions config. |
| apps/site/components/withSearch.tsx | New wrapper component that mounts the new SearchBox. |
| apps/site/components/withNavBar.tsx | Re-enables search in the navbar via the new wrapper. |
| apps/site/components/Common/Searchbox/orama-client.ts | Removes Orama Cloud client initialization. |
| apps/site/components/Common/Searchbox/index.tsx | Removes old site-specific searchbox (chat + suggestions + i18n wiring). |
| apps/site/components/Common/Searchbox/index.module.css | Removes old searchbox styles. |
| apps/site/components/Common/Searchbox/SlidingChatPanel/index.tsx | Removes sliding chat panel. |
| apps/site/components/Common/Searchbox/SlidingChatPanel/index.module.css | Removes sliding chat panel styles. |
| apps/site/components/Common/Searchbox/SearchItem/utils.ts | Removes old hit formatting + locale/base-path link building utilities. |
| apps/site/components/Common/Searchbox/SearchItem/index.tsx | Removes old adapter from Orama hit docs to UI-components hit rendering. |
| apps/site/components/Common/Searchbox/Footer/index.tsx | Removes old footer (powered-by + shortcuts). |
| apps/site/components/Common/Searchbox/Footer/index.module.css | Removes old footer styles. |
| apps/site/components/Common/Searchbox/DocumentLink/index.tsx | Removes locale-aware next/link wrapper for search/chat sources. |
| apps/site/components/Common/Searchbox/ChatSources/index.tsx | Removes chat sources UI. |
| apps/site/components/Common/Searchbox/ChatSources/index.module.css | Removes chat sources styles. |
| apps/site/components/Common/Searchbox/ChatMessage/index.tsx | Removes chat message renderer. |
| apps/site/components/Common/Searchbox/ChatMessage/index.module.css | Removes chat message styles. |
| apps/site/components/Common/Searchbox/ChatInteractions/index.tsx | Removes chat interactions container. |
| apps/site/components/Common/Searchbox/ChatInteractions/index.module.css | Removes chat interactions styles. |
| .gitignore | Ignores generated apps/site/public/orama-db.json. |
| .github/workflows/sync-orama.yml | Removes workflow that synced Orama Cloud. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8836 +/- ##
==========================================
- Coverage 73.88% 73.19% -0.70%
==========================================
Files 105 102 -3
Lines 8889 8615 -274
Branches 326 313 -13
==========================================
- Hits 6568 6306 -262
+ Misses 2320 2308 -12
Partials 1 1 ☔ View full report in Codecov by Sentry. |
|
|
Perhaps I should GZip the file? |
|
I imagine you're going to want to chunk that file, GZiping would only be a temporary fix and would bite us again as the site grows. |
This file shouldn't be commited IMO. (The Orama DB) |
|
It isn't committed, but does need to be included as an asset in the worker build. |
|
I don't see in this PR where we are generating the orama DB for the website-specific pages? 🤔 |
Could be uploaded to R2. Doesn't need to live with the worker, it is a static asset Cloudflare loads in the client-side, not on the bundle. |
|
Yeh, that's possible, but I imagine will then introduce a lot of similar complexities to what we had with the cloud sync flow before -- I think it'd be easier to keep it self-contained to each deployment, assuming we can split the file. |
|
well, in the latest change I changed it not build a file at all, but load both Orama DB files from the learn and API docs and use that at run time. It adds a second fetch request, but shouldn't make a difference. |
What do you mean by this? At the moment, none is created. There really aren't any website specific pages that need searchable content, right? |
about pages? download pages? ...? |
IMO there's not much that's search-worthy on those pages. Even so, a 95% search complete site is better than a 0% searchable one. |
I don't know chief. This sort of decision needs consensus. Can you explicitly ask this on Slack? |
|
👍 I'd be fine with landing using just the learn + API DBs. I agree with the notion that some searching for most of our content is better than the no searching we have currently. |
|
Also @avivkeller would you mind addressing or dismissing cursor comments? 🙏 |
ovflowd
left a comment
There was a problem hiding this comment.
Btw, SGTM with the changes, just want to wait for consensus on the approach, but code looks good ;)
bmuenzenmeyer
left a comment
There was a problem hiding this comment.
Did a functional pass.
Question: does anyone else wish we had this documented within https://github.com/nodejs/nodejs.org/blob/main/docs/technologies.md ? I was surprised to see no mention of Orama in there.
Wait, really? Interesting. We should probably document it now, can also be done in a follow-up PR if needed, @avivkeller! |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 073cd74. Configure here.
| navigateShortcutLabel = 'to navigate', | ||
| selectShortcutLabel = 'to select', | ||
| }) => { | ||
| return ( |
| const client = useMemo(() => { | ||
| loadPromiseRef.current = null; | ||
|
|
||
| const db = create({ |
There was a problem hiding this comment.
I see you call create() in two different places w/ same schema?
| "dependencies": { | ||
| "@heroicons/react": "^2.2.0", | ||
| "@orama/core": "^1.2.19", | ||
| "@orama/orama": "^3.1.18", |
There was a problem hiding this comment.
I see orama/core still being used somewhere?
|
@avivkeller Not sure if you’re aware, but API docs results are redirecting to 404 pages |

cc @nodejs/web-infra
This PR changes our Orama implementation to use a locally-merged version of our API docs Orama and Learn Orama.