[Streams 🌊] Improve definition narrowing and reduntant requests#215897
[Streams 🌊] Improve definition narrowing and reduntant requests#215897tonyghiani merged 10 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
|
DIdn't check in depth yet, but this might be related to #215517 ? Maybe not. My PR is improving the loading of the definition, maybe it's upstream from your changes. Will check later. |
Does not seems related, this work only help to guarantee the definition already exists inside the StreamDetailProvider that fetches the definition, lifting all the The fix for reduntant requests for connectors is also unrelated. |
|
Cool - let's get rid of all the unnecessary loading :) |
flash1293
left a comment
There was a problem hiding this comment.
Please don't merge yet
@flash1293 is there any specific blocker on this? |
That's a fair concern and we should probably address it, IMO a simple page skeleton or loader while loading would be enough instead of rendering the blank page, mostly because it prevents us from showing a lot of empty components around or multiple loading states. I can take a look back at this, I'll ping you later with some changes. |
|
A proper skeleton would be great 👍 |
|
I think a centered loader would probably be fine too - in a lot of cases this request is fairly fast. I also don't want us to lose too much time on this. |
|
@tonyghiani perhaps just wrap in a |
|
@flash1293 I added a simple spinner as a full page skeleton might be overkilling and it would appear for a very short time, the spinner appears on the first load but not while the definition is revalidated to avoid page unmounts unnecessarily, sort of SWR approach. @dgieselaar thanks for the suggestion, that would make sense if case we have more conditional renders waiting for data-fetching, in this case a simple if statement does the job and the HOC + zod seems a bit too much until we need it, worth keeping an eye on this anyway for upcoming work 👌 |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/14197903074 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/14214475963 |
…tic#215897) ## 📓 Summary These changes lift the check against the definition existence and narrows its value for the react context consumers. It also fixes reduntant requests for the AI connectors used for the grok parsing suggestions. @flash1293 I'd expect to use the AI capabilities across more places for the enrichment experience, we should probably lift the AI capabilities as part of the page initialization at a certain point, although it's not needed yet 👌 (cherry picked from commit 13b536a)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#215897) (#216754) # Backport This will backport the following commits from `main` to `8.x`: - [[Streams 🌊] Improve definition narrowing and reduntant requests (#215897)](#215897) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Antonio Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2025-04-01T14:10:57Z","message":"[Streams 🌊] Improve definition narrowing and reduntant requests (#215897)\n\n## 📓 Summary\n\nThese changes lift the check against the definition existence and\nnarrows its value for the react context consumers.\n\nIt also fixes reduntant requests for the AI connectors used for the grok\nparsing suggestions.\n\n@flash1293 I'd expect to use the AI capabilities across more places for\nthe enrichment experience, we should probably lift the AI capabilities\nas part of the page initialization at a certain point, although it's not\nneeded yet 👌","sha":"13b536aed87710e60adf9a7cc3df852a4fb50542","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","Feature:Streams","v9.1.0","v8.19.0"],"title":"[Streams 🌊] Improve definition narrowing and reduntant requests","number":215897,"url":"https://github.com/elastic/kibana/pull/215897","mergeCommit":{"message":"[Streams 🌊] Improve definition narrowing and reduntant requests (#215897)\n\n## 📓 Summary\n\nThese changes lift the check against the definition existence and\nnarrows its value for the react context consumers.\n\nIt also fixes reduntant requests for the AI connectors used for the grok\nparsing suggestions.\n\n@flash1293 I'd expect to use the AI capabilities across more places for\nthe enrichment experience, we should probably lift the AI capabilities\nas part of the page initialization at a certain point, although it's not\nneeded yet 👌","sha":"13b536aed87710e60adf9a7cc3df852a4fb50542"}},"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/215897","number":215897,"mergeCommit":{"message":"[Streams 🌊] Improve definition narrowing and reduntant requests (#215897)\n\n## 📓 Summary\n\nThese changes lift the check against the definition existence and\nnarrows its value for the react context consumers.\n\nIt also fixes reduntant requests for the AI connectors used for the grok\nparsing suggestions.\n\n@flash1293 I'd expect to use the AI capabilities across more places for\nthe enrichment experience, we should probably lift the AI capabilities\nas part of the page initialization at a certain point, although it's not\nneeded yet 👌","sha":"13b536aed87710e60adf9a7cc3df852a4fb50542"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>


📓 Summary
These changes lift the check against the definition existence and narrows its value for the react context consumers.
It also fixes reduntant requests for the AI connectors used for the grok parsing suggestions.
@flash1293 I'd expect to use the AI capabilities across more places for the enrichment experience, we should probably lift the AI capabilities as part of the page initialization at a certain point, although it's not needed yet 👌