…21901) (#222380)
# Backport
This will backport the following commits from `main` to `8.19`:
- [[Lens] Keep suggestions up to date with the main workspace
(#221901)](#221901)
<!--- Backport version: 10.0.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-05-30T14:14:32Z","message":"[Lens]
Keep suggestions up to date with the main workspace (#221901)\n\n##
Summary\n\nFixes #178571 \n\nThis PR reverts #221248 adding the missing
part on it to make the bug\nfound in #178571 disappear.\nIn fact there
was just a single line missing who was meant to keep the\nsuggestion
frame version up to date with the latest workspace
state.\n\n\n\n\nI've
tried to add a unit test but it was so hard to actually follow the\ncode
underneath, so I settled to add a FTR, which led to few
more\nextras:\n\n* subtype selector now has test ids\n* Lens page now
has few more utility helpers for layer cloning and sub\ntype
selector\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":"0bcd7ffcddb706da6407337ad3e3e85e0713fb13","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport
missing","backport:version","v9.1.0","v8.19.0"],"title":"[Lens] Keep
suggestions up to date with the main
workspace","number":221901,"url":"https://github.com/elastic/kibana/pull/221901","mergeCommit":{"message":"[Lens]
Keep suggestions up to date with the main workspace (#221901)\n\n##
Summary\n\nFixes #178571 \n\nThis PR reverts #221248 adding the missing
part on it to make the bug\nfound in #178571 disappear.\nIn fact there
was just a single line missing who was meant to keep the\nsuggestion
frame version up to date with the latest workspace
state.\n\n\n\n\nI've
tried to add a unit test but it was so hard to actually follow the\ncode
underneath, so I settled to add a FTR, which led to few
more\nextras:\n\n* subtype selector now has test ids\n* Lens page now
has few more utility helpers for layer cloning and sub\ntype
selector\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":"0bcd7ffcddb706da6407337ad3e3e85e0713fb13"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221901","number":221901,"mergeCommit":{"message":"[Lens]
Keep suggestions up to date with the main workspace (#221901)\n\n##
Summary\n\nFixes #178571 \n\nThis PR reverts #221248 adding the missing
part on it to make the bug\nfound in #178571 disappear.\nIn fact there
was just a single line missing who was meant to keep the\nsuggestion
frame version up to date with the latest workspace
state.\n\n\n\n\nI've
tried to add a unit test but it was so hard to actually follow the\ncode
underneath, so I settled to add a FTR, which led to few
more\nextras:\n\n* subtype selector now has test ids\n* Lens page now
has few more utility helpers for layer cloning and sub\ntype
selector\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":"0bcd7ffcddb706da6407337ad3e3e85e0713fb13"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Summary
Fixes #178571
This PR reverts #221248 adding the missing part on it to make the bug found in #178571 disappear.
In fact there was just a single line missing who was meant to keep the suggestion frame version up to date with the latest workspace state.
I've tried to add a unit test but it was so hard to actually follow the code underneath, so I settled to add a FTR, which led to few more extras:
Checklist