[Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types#242902
[Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types#242902dej611 merged 9 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
|
Starting backport for target branches: 9.2 https://github.com/elastic/kibana/actions/runs/19428532863 |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Unknown metric groupsAPI count
History
|
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Hey there @dej611, we're looking to backport #240921 (comment) to Are you still intending for this to be backported to |
|
I thought it would be compatible to backport, but I see there are merging conflicts which are not easy to solve. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
8 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…chart sub types (elastic#242902) ## Summary Fixes elastic#241199 This PR addressed an issue with the switching logic when asking the suggestion api to generate a chart type. Added unit tests to check new behaviour. Tested locally with the Agent Builder: <img width="670" height="370" alt="Screenshot 2025-11-13 at 11 52 49" src="https://github.com/user-attachments/assets/4e8b2947-84cc-48a8-8787-b465f145be8a" /> <img width="645" height="365" alt="Screenshot 2025-11-13 at 11 52 11" src="https://github.com/user-attachments/assets/7c08c80c-42f4-48ad-9a66-467bd6199d65" /> <img width="643" height="336" alt="Screenshot 2025-11-13 at 11 51 58" src="https://github.com/user-attachments/assets/ed5905ef-343f-4792-8609-7c282454a707" /> <img width="653" height="352" alt="Screenshot 2025-11-13 at 14 30 00" src="https://github.com/user-attachments/assets/9e7935e0-96b4-4bcc-9f70-b2484175da3b" /> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…chart sub types (elastic#242902) ## Summary Fixes elastic#241199 This PR addressed an issue with the switching logic when asking the suggestion api to generate a chart type. Added unit tests to check new behaviour. Tested locally with the Agent Builder: <img width="670" height="370" alt="Screenshot 2025-11-13 at 11 52 49" src="https://github.com/user-attachments/assets/4e8b2947-84cc-48a8-8787-b465f145be8a" /> <img width="645" height="365" alt="Screenshot 2025-11-13 at 11 52 11" src="https://github.com/user-attachments/assets/7c08c80c-42f4-48ad-9a66-467bd6199d65" /> <img width="643" height="336" alt="Screenshot 2025-11-13 at 11 51 58" src="https://github.com/user-attachments/assets/ed5905ef-343f-4792-8609-7c282454a707" /> <img width="653" height="352" alt="Screenshot 2025-11-13 at 14 30 00" src="https://github.com/user-attachments/assets/9e7935e0-96b4-4bcc-9f70-b2484175da3b" /> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit f7d4891) # Conflicts: # src/platform/packages/shared/kbn-lens-common/visualizations/types.ts # x-pack/platform/plugins/shared/lens/public/lens_suggestions_api/helpers.test.ts
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
12 similar comments
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…erred chart sub types (#242902) (#245029) # Backport This will backport the following commits from `main` to `9.2`: - [[Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types (#242902)](#242902) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-11-17T11:47:36Z","message":"[Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types (#242902)\n\n## Summary\n\nFixes #241199\n\nThis PR addressed an issue with the switching logic when asking the\nsuggestion api to generate a chart type.\nAdded unit tests to check new behaviour.\nTested locally with the Agent Builder:\n\n<img width=\"670\" height=\"370\" alt=\"Screenshot 2025-11-13 at 11 52 49\"\nsrc=\"https://github.com/user-attachments/assets/4e8b2947-84cc-48a8-8787-b465f145be8a\"\n/>\n<img width=\"645\" height=\"365\" alt=\"Screenshot 2025-11-13 at 11 52 11\"\nsrc=\"https://github.com/user-attachments/assets/7c08c80c-42f4-48ad-9a66-467bd6199d65\"\n/>\n<img width=\"643\" height=\"336\" alt=\"Screenshot 2025-11-13 at 11 51 58\"\nsrc=\"https://github.com/user-attachments/assets/ed5905ef-343f-4792-8609-7c282454a707\"\n/>\n<img width=\"653\" height=\"352\" alt=\"Screenshot 2025-11-13 at 14 30 00\"\nsrc=\"https://github.com/user-attachments/assets/9e7935e0-96b4-4bcc-9f70-b2484175da3b\"\n/>\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"f7d4891d8f56b7a457c1467b6d9395941d09fcb2","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport missing","backport:version","v9.3.0"],"title":"[Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types","number":242902,"url":"https://github.com/elastic/kibana/pull/242902","mergeCommit":{"message":"[Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types (#242902)\n\n## Summary\n\nFixes #241199\n\nThis PR addressed an issue with the switching logic when asking the\nsuggestion api to generate a chart type.\nAdded unit tests to check new behaviour.\nTested locally with the Agent Builder:\n\n<img width=\"670\" height=\"370\" alt=\"Screenshot 2025-11-13 at 11 52 49\"\nsrc=\"https://github.com/user-attachments/assets/4e8b2947-84cc-48a8-8787-b465f145be8a\"\n/>\n<img width=\"645\" height=\"365\" alt=\"Screenshot 2025-11-13 at 11 52 11\"\nsrc=\"https://github.com/user-attachments/assets/7c08c80c-42f4-48ad-9a66-467bd6199d65\"\n/>\n<img width=\"643\" height=\"336\" alt=\"Screenshot 2025-11-13 at 11 51 58\"\nsrc=\"https://github.com/user-attachments/assets/ed5905ef-343f-4792-8609-7c282454a707\"\n/>\n<img width=\"653\" height=\"352\" alt=\"Screenshot 2025-11-13 at 14 30 00\"\nsrc=\"https://github.com/user-attachments/assets/9e7935e0-96b4-4bcc-9f70-b2484175da3b\"\n/>\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"f7d4891d8f56b7a457c1467b6d9395941d09fcb2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/242902","number":242902,"mergeCommit":{"message":"[Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types (#242902)\n\n## Summary\n\nFixes #241199\n\nThis PR addressed an issue with the switching logic when asking the\nsuggestion api to generate a chart type.\nAdded unit tests to check new behaviour.\nTested locally with the Agent Builder:\n\n<img width=\"670\" height=\"370\" alt=\"Screenshot 2025-11-13 at 11 52 49\"\nsrc=\"https://github.com/user-attachments/assets/4e8b2947-84cc-48a8-8787-b465f145be8a\"\n/>\n<img width=\"645\" height=\"365\" alt=\"Screenshot 2025-11-13 at 11 52 11\"\nsrc=\"https://github.com/user-attachments/assets/7c08c80c-42f4-48ad-9a66-467bd6199d65\"\n/>\n<img width=\"643\" height=\"336\" alt=\"Screenshot 2025-11-13 at 11 51 58\"\nsrc=\"https://github.com/user-attachments/assets/ed5905ef-343f-4792-8609-7c282454a707\"\n/>\n<img width=\"653\" height=\"352\" alt=\"Screenshot 2025-11-13 at 14 30 00\"\nsrc=\"https://github.com/user-attachments/assets/9e7935e0-96b4-4bcc-9f70-b2484175da3b\"\n/>\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"f7d4891d8f56b7a457c1467b6d9395941d09fcb2"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Summary
Fixes #241199
This PR addressed an issue with the switching logic when asking the suggestion api to generate a chart type.
Added unit tests to check new behaviour.
Tested locally with the Agent Builder:
Checklist