fix: Disable inkeep if no API key is provided#3017
Merged
bezbac merged 1 commit intoMay 28, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review |
19776e8 to
4c1370c
Compare
4c1370c to
110b696
Compare
110b696 to
55fa4b2
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greptile Summary
This PR adds a null-safety guard to the
useInkeepSettingshook so that Inkeep UI components gracefully returnnullinstead of crashing whenNEXT_PUBLIC_INKEEP_API_KEYis absent. The hook's return type changes fromInkeepSharedSettingstoInkeepSharedSettings | null, and all three consumers (InkeepSearchBar,InkeepSearchButton,InkeepSharedChat) are updated to handle the new null case.useInkeepSettings.ts: returnsnullearly when the API key env var is missing, adds auseEffectmount warning, and removes the non-null assertion (!) from theapiKeyfield.InkeepSearchBar.tsx: both exported components now perform a null guard on the hook result before rendering.embedded-chat.tsx:InkeepSharedChatadds the same null guard so the Inkeep embedded chat widget is suppressed when unconfigured.Confidence Score: 5/5
Safe to merge — the change is a straightforward guard that suppresses Inkeep widgets when no API key is configured, and the React hooks order is correct throughout.
All three consumer components handle the new null return correctly, and the hooks (useTheme, usePostHog, useEffect) are all called before the early return in useInkeepSettings, so hook ordering is valid. No logic paths are broken by this change.
No files require special attention.
Reviews (2): Last reviewed commit: "fix: Disable inkeep if no API key is pro..." | Re-trigger Greptile