[AI Infra] GenAI Settings: Reflect selected AI Assistants Visibility value from header selector on the Settings page#239555
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a synchronization issue between the AI Assistant Management plugin and GenAI Settings plugin by standardizing both to use the newer coreStart.settings.client API instead of the deprecated coreStart.uiSettings. The change ensures that the AI Assistants Visibility value selected in the header reflects properly on the Settings page.
Key changes:
- Updated AI Assistant Management plugin to use the newer settings client API for consistency
- Added real-time subscription to settings changes in GenAI Settings context
- Updated all related tests to mock the new settings client structure
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
x-pack/platform/plugins/private/gen_ai_settings/public/contexts/settings_context.tsx |
Added real-time subscription to settings changes using the settings client's update stream |
src/platform/plugins/shared/ai_assistant_management/selection/public/plugin.tsx |
Migrated from coreStart.uiSettings to coreStart.settings.client for getting and observing settings |
src/platform/plugins/shared/ai_assistant_management/selection/public/plugin.test.ts |
Updated test mocks to reflect the new settings client structure |
src/platform/plugins/shared/ai_assistant_management/selection/public/hooks/use_is_nav_control_visible.tsx |
Updated to use settings client for observing and checking default values |
src/platform/plugins/shared/ai_assistant_management/selection/public/components/navigation_control/index.tsx |
Changed setting update to use async settings client method |
|
Pinging @elastic/ml-ui (:ml) |
|
Pinging @elastic/appex-ai-infra (Team:AI Infra) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
History
cc @rbrtj |
…` value from header selector on the Settings page (elastic#239555) Resolves elastic#236804 The `ai_assistant_management` plugin was using the old `coreStart.uiSettings` client, while the `GenAI Settings` plugin uses the newer `coreStart.settings.client`. This mismatch prevented them from syncing properly. After: https://github.com/user-attachments/assets/28e3520e-2f59-4976-b0fa-83e0d32cff3b
Resolves #236804
The
ai_assistant_managementplugin was using the oldcoreStart.uiSettingsclient, while theGenAI Settingsplugin uses the newercoreStart.settings.client. This mismatch prevented them from syncing properly.After:
Screen.Recording.2025-10-17.at.14.52.30.mov