connection_url_parser.dart reads uri.port unconditionally on line 89. If the URI omits the port, uri.port returns the scheme's default port, which is correct for postgresql/postgres (5432), but the code does not explicitly check uri.hasPort. This is fragile if other schemes are added or if Uri behavior changes.
Impact: Persisted port can be 5432 even when not specified, which is mostly harmless but inconsistent with how the form handles omitted ports.
Expected: Only store port when uri.hasPort is true; otherwise leave it null and rely on driver defaults.
Acceptance criteria:
connection_url_parser.dartreadsuri.portunconditionally on line 89. If the URI omits the port,uri.portreturns the scheme's default port, which is correct forpostgresql/postgres(5432), but the code does not explicitly checkuri.hasPort. This is fragile if other schemes are added or ifUribehavior changes.Impact: Persisted
portcan be 5432 even when not specified, which is mostly harmless but inconsistent with how the form handles omitted ports.Expected: Only store
portwhenuri.hasPortis true; otherwise leave itnulland rely on driver defaults.Acceptance criteria:
uri.hasPortbefore assigninguri.port.