Skip to content

[9.2] [Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types (#242902)#245029

Merged
markov00 merged 2 commits intoelastic:9.2from
markov00:backport/9.2/pr-242902
Dec 19, 2025
Merged

[9.2] [Lens][Suggestion API] Improve suggestion API to listen to preferred chart sub types (#242902)#245029
markov00 merged 2 commits intoelastic:9.2from
markov00:backport/9.2/pr-242902

Conversation

@markov00
Copy link
Copy Markdown
Contributor

@markov00 markov00 commented Dec 3, 2025

Backport

This will backport the following commits from main to 9.2:

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
@markov00 markov00 added the backport This PR is a backport of another PR label Dec 3, 2025
@markov00 markov00 enabled auto-merge (squash) December 3, 2025 08:58
@markov00 markov00 merged commit 5e36c8c into elastic:9.2 Dec 19, 2025
13 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
lens 599 601 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.5MB 1.5MB +210.0B
Unknown metric groups

API count

id before after diff
lens 698 700 +2

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants