Skip to content

Let the create connection form start from prefilled values - #2262

Merged
kmcginnes merged 2 commits into
mainfrom
create-connection-initial-values
Sep 24, 2026
Merged

kmcginnes merged 2 commits into
mainfrom
create-connection-initial-values

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • CreateConnection takes an initialValues prop. It prefills a new connection form and stays in add mode, so none of the edit-mode "meaningful change" reset logic runs.
  • mapToConnectionForm now 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 initialValues yet. 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

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

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
kmcginnes marked this pull request as ready for review September 24, 2026 22:37
@kmcginnes
kmcginnes merged commit a6bda77 into main Sep 24, 2026
10 checks passed
@kmcginnes
kmcginnes deleted the create-connection-initial-values branch September 24, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant