fix(web): hide search without Orama data#894
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview The generator runner now passes Reviewed by Cursor Bugbot for commit c113a5c. Bugbot is set up for automated code reviews on this repo. Configure here. |
avivkeller
left a comment
There was a problem hiding this comment.
You shouldn't read the full config from within the generator if it can be avoided
bjohansebas
left a comment
There was a problem hiding this comment.
think that's fine. If there's no data, why show the search? It could even help with debugging. I haven't looked through the changes yet, but in my opinion, that approach would be fine.
Signed-off-by: w3lld1 <42353747+w3lld1@users.noreply.github.com>
3b26e77 to
c113a5c
Compare
|
Thanks for the review. I pushed a follow-up that avoids reading the full run config from the web config source: the orchestrator now passes requested targets through a small generator context. I also added the suggested |
Description
Only render the web documentation search control when
orama-dbis one of the requested generator targets. This avoids showing a search UI that cannot return results when users generate only theweboutput.The generator orchestration context now supplies the requested targets without making the web config source read the full run configuration. The web generator derives a build-time
searchEnabledflag and supports an explicitweb.showSearchBaroverride for deployments that provide search data separately. The navigation conditionally rendersSearchBox, with regression coverage for bothweb-only andweb+orama-dbgeneration.A patch changeset is included because this changes published web-generator behavior.
Validation
node --test --experimental-test-module-mocks src/generators/web/__tests__/generate.test.mjs(Node.js 24.18.0)node --run test— 514 tests passed (Node.js 24.18.0)node --run lint— no errors; 2 pre-existing warnings inuseOrama.mjsnode --run format:checkgit diff --checkRelated Issues
Fixes #891
Check List
node --run testand all tests passed.node --run format&node --run lint.