Skip to content

fix(extensions): edit-connection UI parity (password keep, Test, sidebar Remove) #518

Description

@ZhuchkaTriplesix

Problem

Follow-up to #510 / PR #517. Extension Edit connection… matches the menu and footer of built-in forms, but several UI/behavior gaps break parity — especially around secrets.

Gaps

1. Password “keep existing” (blocker)

Built-in edit forms allow an empty password and show Leave blank to keep existing; mergeSecretsForConnectionUpdate restores the stored secret after Save.

Extension SDUI password fields:

  • Use the schema placeholder only (no keep-existing hint)
  • Honor field.required — empty password fails validation, so Save can be blocked without retyping the secret

Storage merge after a successful pop is fine; the form never reaches it when validation fails.

2. Test Connection ignores secret merge

In edit mode, Test Connection builds a row from form values without merging the previous password. Save path merges; Test can fail with a blank password even when Save would succeed.

3. Dual Remove on extension tile

Built-in tiles: Remove only via context menu.
Extension tile: context menu Remove and inline × — two delete affordances.

Proposed fix

  1. SDUI edit mode (SduiFormBuilder or edit wrapper in extension_connection_form.dart):
    • Password fields: empty is valid while editing
    • Placeholder / hint: Leave blank to keep existing (same copy as built-ins)
  2. Test Connection (edit): call mergeSecretsForConnectionUpdate (or inject previous password) before ExtensionDriverSession.testConnection
  3. Sidebar: remove the inline × on the extension tile (prefer one dialect: menu-only, matching built-ins)

Acceptance

  • Editing an extension connection with a required password field: leave password empty → Save succeeds and keeps the stored secret
  • Password field shows keep-existing hint in edit mode
  • Test Connection with blank password in edit mode uses the stored secret (same outcome as Save would)
  • Extension connection tile has a single Remove affordance (context menu only, unless product decides otherwise for all drivers)
  • Widget/unit tests cover blank-password validation + secret merge on Test where practical

Files (starting points)

  • lib/features/connections/extension_connection_form.dart
  • lib/core/sdui/sdui_form_builder.dart
  • lib/features/connections/connections_panel_extension.dart
  • lib/features/connections/connection_creation_flow.dart (mergeSecretsForConnectionUpdate)

Out of scope (optional later)

  • Migrate connection form shells to QueryaDialogCard
  • Map SDUI text/password controls to shadcn TextField for full chrome parity
  • Secrets stored only under custom driverOptions keys (not top-level ConnectionRow.password)

Related

Metadata

Metadata

Labels

bugSomething isn't workingconnectionsDatabase connections, URI parsing, poolsmarketplaceExtensions marketplace, ExtensionManifestuiUser interface components and widgets

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions