-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security Assistant] Conversation pagination refactor #211831
Conversation
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked out, tested locally, and code reviewed -- LGTM!
Thanks for this giant effort and refactoring @stephmilovic! Really appreciate you taking the time to pair and go over the changes and last couple issues we found. The code base is in a much better spot with all of your changes here! 🙂 🚀
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
|
Starting backport for target branches: 8.x |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 095fc22) # Conflicts: # x-pack/platform/packages/shared/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx # x-pack/platform/packages/shared/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx # x-pack/platform/packages/shared/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings_management/index.tsx # x-pack/solutions/security/plugins/elastic_assistant/server/ai_assistant_data_clients/find.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#212997) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Assistant] Conversation pagination refactor (#211831)](#211831) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"stephanie.milovic@elastic.co"},"sourceCommit":{"committedDate":"2025-03-03T20:41:20Z","message":"[Security Assistant] Conversation pagination refactor (#211831)","sha":"095fc222aa541bf50f57c11958c16eb4c04a282c","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","Team:Security Generative AI","backport:version","v9.1.0","v8.19.0"],"title":"[Security Assistant] Conversation pagination refactor","number":211831,"url":"https://github.com/elastic/kibana/pull/211831","mergeCommit":{"message":"[Security Assistant] Conversation pagination refactor (#211831)","sha":"095fc222aa541bf50f57c11958c16eb4c04a282c"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211831","number":211831,"mergeCommit":{"message":"[Security Assistant] Conversation pagination refactor (#211831)","sha":"095fc222aa541bf50f57c11958c16eb4c04a282c"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…211831) (elastic#212997) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Assistant] Conversation pagination refactor (elastic#211831)](elastic#211831) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"stephanie.milovic@elastic.co"},"sourceCommit":{"committedDate":"2025-03-03T20:41:20Z","message":"[Security Assistant] Conversation pagination refactor (elastic#211831)","sha":"095fc222aa541bf50f57c11958c16eb4c04a282c","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","Team:Security Generative AI","backport:version","v9.1.0","v8.19.0"],"title":"[Security Assistant] Conversation pagination refactor","number":211831,"url":"https://github.com/elastic/kibana/pull/211831","mergeCommit":{"message":"[Security Assistant] Conversation pagination refactor (elastic#211831)","sha":"095fc222aa541bf50f57c11958c16eb4c04a282c"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211831","number":211831,"mergeCommit":{"message":"[Security Assistant] Conversation pagination refactor (elastic#211831)","sha":"095fc222aa541bf50f57c11958c16eb4c04a282c"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Summary
This pull request introduces several improvements and optimizations to the assistant UI and backend logic to address performance issues, particularly Out of Memory (OOM) errors, and enhance the overall user experience. Key updates include pagination support, reduced data fetches, and cleaner logic for conversation management.
Key Changes:
updatedAt
date of the conversation.useSettingsUpdater
and replaces it with more appropriate hooks likeuseSystemPromptUpdater
anduseConversationsUpdater
, streamlining state management.Issue Links:
Additional Notes:
Testing
node x-pack/solutions/security/plugins/elastic_assistant/scripts/create_conversations --count 150