[Security Assistant] Conversation pagination refactor#211831
[Security Assistant] Conversation pagination refactor#211831stephmilovic merged 100 commits intoelastic:mainfrom
Conversation
spong
left a comment
There was a problem hiding this comment.
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 https://github.com/elastic/kibana/actions/runs/13640012888 |
💔 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:
updatedAtdate of the conversation.useSettingsUpdaterand replaces it with more appropriate hooks likeuseSystemPromptUpdateranduseConversationsUpdater, streamlining state management.Issue Links:
Additional Notes:
Testing
node x-pack/solutions/security/plugins/elastic_assistant/scripts/create_conversations --count 150