[9.1] [Obs AI Assistant] knowledge base UI works offline (#229874)#230281
Closed
kibanamachine wants to merge 1 commit intoelastic:9.1from
Closed
[9.1] [Obs AI Assistant] knowledge base UI works offline (#229874)#230281kibanamachine wants to merge 1 commit intoelastic:9.1from
kibanamachine wants to merge 1 commit intoelastic:9.1from
Conversation
## Summary When using kibana without an network connection, as is potentially the case in airgapped environments, most requests in observability ai assistant management UI will not fire. This results in the inability to use the knowledge base UI, though the api endpoints still work. By default, [TanStack Query (used by useQuery) disables all network requests when the browser reports offline status](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode). This isn't necessary for kb endpoints that operate entirely against the local Elasticsearch cluster and do not require internet access. This change updates all useQuery calls in the Observability AI Assistant Management to use `networkMode: 'always'`. This ensures that queries are executed even when the browser is offline (`navigator.onLine === false`). Not all air-gapped environments would be affected. In many real-world deployments machines still have network interfaces configured, and `navigator.onLine` remains true. In those cases, the UI works as expected. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine This brings management in line with other kibana endpoints which do not use `react-query` and do not have the issue, including `observability_ai_assistant/kb/status` ### Test - Run es and kibana offline - Visit knowledge tab in settings and interact with the app - the network tab should have requests (they will fail unless you have elser running locally, but that is ok), eg New Entry should make the request to save when trying to save. (cherry picked from commit 0b1864a)
Contributor
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Contributor
⏳ Build in-progress, with failures
Failed CI Stepscc @neptunian |
Contributor
|
closed for #230651 |
auto-merge was automatically disabled
August 5, 2025 17:44
Pull request was closed
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.
Backport
This will backport the following commits from
mainto9.1:Questions ?
Please refer to the Backport tool documentation