From 8c34c35b204ed185d2866f3827696a13aa81c462 Mon Sep 17 00:00:00 2001 From: Dawson Toth Date: Tue, 19 May 2026 11:58:35 -0400 Subject: [PATCH] fix: Auto-pick http when entering localhost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you’re self-managing a localhost or 127.0.0.1 instance, we can auto-pick http:// for you to make things easier. https://harperdb.atlassian.net/browse/STUDIO-575 --- .../clusters/upsert/components/InstanceFormInputs.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/features/clusters/upsert/components/InstanceFormInputs.tsx b/src/features/clusters/upsert/components/InstanceFormInputs.tsx index 5b43cf25d..d6223864e 100644 --- a/src/features/clusters/upsert/components/InstanceFormInputs.tsx +++ b/src/features/clusters/upsert/components/InstanceFormInputs.tsx @@ -75,6 +75,16 @@ export function InstanceFormInputs({ autoCapitalize="none" autoComplete="off" autoCorrect="off" + onChange={e => { + field.onChange(e); + const value = e.target.value; + const isLocalhost = value === 'localhost' || value === '127.0.0.1'; + const secureFieldState = form.getFieldState(`instances.${index}.secure`); + + if (isLocalhost && !secureFieldState.isDirty) { + form.setValue(`instances.${index}.secure`, 'false'); + } + }} />