-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Observability:Streams] Child stream input validation #242581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
/ci |
780867a to
b51e9ea
Compare
|
/ci |
6873ed5 to
5b37da3
Compare
|
/ci |
|
Pinging @elastic/obs-onboarding-team (Team:obs-onboarding) |
x-pack/platform/plugins/shared/streams/server/lib/streams/client.ts
Outdated
Show resolved
Hide resolved
6ca2248 to
9ebbf27
Compare
|
Should the |
@gbamparop I Asked the EUI team about this off thread (slack), I think it would make sense to disable the button here but want to make sure it aligns with any UX patterns they have. I couldn't find anything specific to this use case on the EUI doc site. |
I think it makes sense to disable any save or update button when there is a validation error, otherwise we are making a backend call and relying on the backend validation to reject the request. Since we also disable it when there is a |
I think that is from the maxLength property that was set on the input Line 99 in d2e01dc
|
|
@couvq Sorry edited your comment instead of quoting it 😅.
We can probably rely on the custom validation we have to show the error message, otherwise the user won't know why no more typing is allowed. |
Cool that makes sense, I can remove that as part of this change as well 👍. Also the messages are shown as help messages in the current state. Should these be error messages instead? |
I remember I had this discussion with Marco before and we decided on keeping the length messages as help ones not error. Lets keep it this way for now unless the Design team says otherwise |
…ourage reusability between manual child and ai suggested partitions
66df4fe to
1db4d2b
Compare
|
/ci |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
|


Closes #242254
Closes #243566
Closes https://github.com/elastic/streams-program/issues/623
Closes https://github.com/elastic/observability-error-backlog/issues/318
Closes https://github.com/elastic/observability-error-backlog/issues/319
Description
This PR addresses missing input validation and error handling for the child/fork stream UIs and APIs, as well as a performance bug associated with the child stream input. Below is a summary of the cases this PR handles:
Note about what was causing the performance issue and the fix for it:
onChangefunction passed to the<StreamNameFormRow />component was being triggered on every key press. TheonChangefunctions passed to the component updated contexts within the routing state machine and since thePreviewPanelcomponent read the entire snapshot of state from the routing state machine, it caused thePreviewTablecomponent to rerender along with all of its preview data, this caused the input to lag as React has to rerender the preview table along with the input and anything else that reads the routing state. I resolved this by having the component hook manage a local state, and debouncing what was passed to theonChangeso that it would only get called after 300ms of inactivity. This way only the input is rerendered on key press, with theonChangecausing downstream rerendering only after a period of inactivity. Now the input is snappy when typing and the client side validation happens quickly, even when data is rendered in the preview table.Screen recording (works the same on manual and AI suggestion inputs)
Screen.Recording.2025-12-01.at.2.28.01.PM.mov