frontend: keep a setting typed while a pipeline save is in flight, and stop promising a create never starts - #2658
Merged
Conversation
…d stop promising a create never starts Post-merge review of #2624. The settings stay editable while a save is in flight, but `markSaved` rebaselined the form to the values on screen when the response landed. A name typed during the round trip became the saved default, so the form read clean, the unsaved-changes guard stood down and the recovery buffer was dropped. The baseline is now the snapshot the request carried, and edits made since stay dirty. A save that navigates unmounts the editor before the debounced write can run, so those edits are written as part of the save, against the target the editor continues on. `CreatePipeline` always deploys, so a create without drafts is a deploy followed by a stop and cannot promise the pipeline never runs. The leave dialog said it creates the pipeline "without starting it"; it now says it stops it afterwards and may run briefly. A create response with no id skipped the stop but still reported the pipeline as parked, which the surrounding comment already ruled out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
🚨 Registry drift detectedApp:
Components needing attention
Refresh command: bunx shadcn@latest add @redpanda/alert @redpanda/button @redpanda/dialog @redpanda/resizable @redpanda/skeleton @redpanda/tabs --overwriteGenerated by lookout audit-changes. |
SpicyPete
requested review from
a team and
jvorcak
and removed request for
a team
September 22, 2026 16:07
malinskibeniamin
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Post-merge review comments on #2624, both marked P1.
A setting typed while a save is in flight was lost without warning. The settings stay editable during a save (only the Save button is disabled, the inline header title is not), but
markSavedrebaselined the form to whatever was on screen when the response landed. So a name typed during the round trip became the saved default: the form read clean, the unsaved-changes guard stood down, and the recovery buffer was dropped. The baseline is now the snapshot the request actually carried, and anything typed since stays dirty.There is a second half to that. A save that navigates unmounts the editor before the 1s debounced autosave can run, and the hook drops its pending timer by design so that Discard means discard. Staying dirty is therefore not enough on the paths that navigate, so those edits are now written as part of the save, against the target the editor continues on. On create that is the new pipeline's editor, so the restore notice offers them on arrival.
Worth noting for reviewers:
reset(values, { keepDirtyValues: true })looks like the one-line version of this and is not. It copies each dirty field's current value into the object that becomes the new defaults, which is the original bug.The create copy promised something the wire cannot deliver.
CreatePipelinealways deploys, so with drafts off the primary Save is a deploy followed by a separate stop, and a fast input can process messages before the stop arrives. The leave dialog said saving "creates the pipeline without starting it". It now says it stops it afterwards and may run briefly. The success toast dropped the "yet" that implied it had never run.Behaviour and button labels are unchanged. The end state is stopped, which beats the pre-#2624 create-and-leave-running, and the window cannot be closed from the client.
Also fixed, found reviewing the above
stopFailednow covers a stop that was needed and did not happen. Only the drafts-enabled twin had a test.localStoragethe preceding block left behind. It now clears in its ownbeforeEach, so its DOM is not order-dependent.Testing
Both new behaviours are verified red against the old code, not just green against the new.
1065unit and1605integration tests pass, plustype:checkandlintwith no net-new diagnostics.Open for discussion
STARTING/STOPPINGplus a rename in the same window, and the signal is arguably true, so I left it.🤖 Generated with Claude Code