Let the create connection form start from prefilled values - #2262
Merged
Merged
Conversation
initialValues prefills an add-mode form with fully editable values, without running the existingConfig edit-mode reset logic. mapToConnectionForm now takes just the label and connection body it actually reads, so a caller with nothing saved yet has no id to invent for the name fallback, and is exported for reuse and direct testing.
kmcginnes
marked this pull request as ready for review
September 24, 2026 22:37
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.
Description
CreateConnectiontakes aninitialValuesprop. It prefills a new connection form and stays in add mode, so none of the edit-mode "meaningful change" reset logic runs.mapToConnectionFormnow takes a name and a connection body instead of a whole stored configuration, so it can map a connection that hasn't been saved and has no id. The edit form still falls back to the id when a connection has no label, which matches how the rest of the app names it.Nothing on main passes
initialValuesyet. The connect route in Add connection links via a dedicated #/connect route will use it to prefill the form from a link. I split this out so the form change gets reviewed separately from the feature.Validation
The add and edit connection dialogs behave as before. New tests cover the prefill, the mapping, and editing a connection that has no label.
Related Issues
Prep for Add connection links via a dedicated #/connect route.
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.