Skip to content

feat(redesign): search/chat widget powered by Orama#2213

Merged
g-francesca merged 76 commits intoredesignfrom
redesign-search
Mar 24, 2026
Merged

feat(redesign): search/chat widget powered by Orama#2213
g-francesca merged 76 commits intoredesignfrom
redesign-search

Conversation

@g-francesca
Copy link
Collaborator

@g-francesca g-francesca commented Mar 19, 2026

This PR adds a fully-featured search and AI-powered chat experience to the Express.js website, powered by Orama.

What's new

Search modal

  • Replaced the previous SearchTrigger component with a new Searchbox modal powered by @orama/ui
  • Full-text search across docs, blog posts, resources, and API references
  • Faceted filtering by content category (tabs)
  • Result items display a path breadcrumb derived from the document URL
  • Keyboard shortcut to open (⌘K on Mac, Ctrl K on other platforms)
  • Arrow-key navigation within results
  • Skeleton loading state while results are fetching

AI Chat

  • Integrated Orama's AI chat directly into the search modal: users can transition from a search query into a conversational AI answer with one click
  • Smooth streaming responses with a "Thinking..." loading indicator
  • Source cards linked to the relevant docs pages
  • Per-interaction actions: regenerate, copy to clipboard, dislike
  • Abort in-flight requests
  • Auto-scroll to latest message with a "scroll to bottom" button
  • State is preserved when toggling between search and chat modes

Modal header

  • Back button to return to search (or reset the query)
  • Chat session counter showing the number of open interactions
  • Close button

Orama index scripts

  • scripts/orama-documents.mjs: collects and converts all markdown content (docs, blog, resources, API) into Orama index documents
  • scripts/sync-orama.mjs: push the generated documents to Orama Cloud

A GitHub Actions workflow should be added to run this script automatically on each deploy.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

@g-francesca g-francesca changed the title feat(redesign): search/chat feat(redesign): search/chat widget powered by Orama Mar 20, 2026
@socket-security
Copy link

socket-security bot commented Mar 20, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@g-francesca
Copy link
Collaborator Author

Just one comment, I’ll go into more detail about the search feature over the weekend. The initial load looks like this: image And then it looks like this: image

Basically, the buttons look larger on the initial load, and then they shrink.

Right. Can you please check now? should be solved. Thanks for reporting.

site,
vite: {
plugins: [svgr()],
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment explaining why this is necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, added.

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, but Lighthouse performance score dropped quite a bit we should review it.

@g-francesca g-francesca marked this pull request as ready for review March 23, 2026 09:25
@g-francesca g-francesca requested a review from a team as a code owner March 23, 2026 09:25
@g-francesca
Copy link
Collaborator Author

The code looks good, but Lighthouse performance score dropped quite a bit we should review it.

I will check this today

@g-francesca
Copy link
Collaborator Author

@bjohansebas this is what I did to improve performance score:

  • I used client:idle instead of client:load to avoid react hydration immediately on page load
  • I replaced the full fluent icon set with unplugin-icons, to allow importing individual icons as React components and include only the icons that are actually used.

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT, awesome

"astro-expressive-code": "^0.41.7",
"astro-icon": "^1.1.5"
"astro-icon": "^1.1.5",
"dotenv": "^17.3.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this dependency

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

@bjohansebas bjohansebas linked an issue Mar 24, 2026 that may be closed by this pull request
@g-francesca g-francesca merged commit 4d6c42a into redesign Mar 24, 2026
10 checks passed
@bjohansebas bjohansebas deleted the redesign-search branch March 25, 2026 03:38
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.

Search with AI

3 participants