Skip to content

fix(orama): use relative path#746

Merged
avivkeller merged 5 commits intomainfrom
fix/orama/rel
Apr 3, 2026
Merged

fix(orama): use relative path#746
avivkeller merged 5 commits intomainfrom
fix/orama/rel

Conversation

@avivkeller
Copy link
Copy Markdown
Member

Orama is located at the root, not at the same depth as a given page.

@avivkeller avivkeller requested a review from a team as a code owner April 2, 2026 19:21
Copilot AI review requested due to automatic review settings April 2, 2026 19:21
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Apr 3, 2026 7:54am

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.17%. Comparing base (0306f18) to head (fa098c4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #746   +/-   ##
=======================================
  Coverage   77.17%   77.17%           
=======================================
  Files         153      153           
  Lines       13771    13771           
  Branches     1114     1114           
=======================================
  Hits        10628    10628           
  Misses       3139     3139           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix loading of the Orama search database JSON by resolving it relative to the current page path (since orama-db.json lives at the site root, not alongside nested pages).

Changes:

  • Update useOrama to compute the fetch URL via utils/url.mjs#relative() using the current pathname.
  • Thread page path information into the search UI (NavBar/SearchBox) to supply useOrama with a pathname.
  • Bump package version to 1.3.1.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/generators/web/ui/hooks/useOrama.mjs Fetches orama-db.json via a computed relative URL based on pathname.
src/generators/web/ui/components/SearchBox/index.jsx Changes SearchBox props to provide a path into useOrama.
src/generators/web/ui/components/NavBar.jsx Attempts to pass path info down to SearchBox.
src/generators/web/ui/components/Layout/index.jsx Attempts to pass metadata/path info into NavBar.
package.json Version bump to 1.3.1.
package-lock.json Lockfile version bump to 1.3.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

orama-db Generator

File Base Head Diff
orama-db.json 8.26 MB 8.26 MB -1.41 KB (-0.02%)

Copy link
Copy Markdown
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

SGTM and let's fast track it

Copy link
Copy Markdown
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

SGTM!

@avivkeller avivkeller enabled auto-merge (squash) April 3, 2026 07:51
@avivkeller avivkeller disabled auto-merge April 3, 2026 07:52
@avivkeller avivkeller merged commit 63c24b9 into main Apr 3, 2026
21 checks passed
@avivkeller avivkeller deleted the fix/orama/rel branch April 3, 2026 07:54
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.

3 participants