Skip to content

fix(connections): a URI connection without a name is named after the URI's host (#1257) - #1264

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1257-uri-connection-name
Oct 10, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1257-uri-connection-name

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

With an empty name and a URI, PostgreSQL named the connection after the URI's host, MySQL MySQL (URI), and Redis and MongoDB after the form's host field (Redis localhost:6379), so several URI connections looked identical in the sidebar.

defaultConnectionName (features/connections/connection_default_name.dart) is now used by all four forms:

  • <Type>: host:port from the URI; the port is the URI's, else the type's default; a +srv URI has none (MongoDB: c0.example.net);
  • <Type> (URI) when the URI has no host or does not parse;
  • without a URI, the name from the fields, as before.

An explicitly typed name always wins. The PostgreSQL name is unchanged.

Tests: the helper (URI with and without port, +srv, no host, no URI) and the e2e form scenarios assert the saved name contains the URI's host.

Closes #1257

Test plan

  • CI: all test sections pass (no local runs, per team rule)

…URI's host (#1257)

Redis and MongoDB named it after the form's default host field
(Redis localhost:6379), MySQL 'MySQL (URI)'. One helper,
defaultConnectionName, now gives '<Type>: host:port' from the URI in all
four forms (port: the URI's, else the type default; none for +srv),
'<Type> (URI)' when the URI has no host. The form scenarios assert the name.
@github-actions github-actions Bot added bug Something isn't working connections Database connections, URI parsing, pools ux User experience, keyboard shortcuts and interactions P3 Low priority / Polish & Enhancements labels Oct 10, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 1c07e69 into dev Oct 10, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1257-uri-connection-name branch October 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working connections Database connections, URI parsing, pools P3 Low priority / Polish & Enhancements ux User experience, keyboard shortcuts and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant