From ad2cfe808c8f5a3d429af84b318ad213c8811685 Mon Sep 17 00:00:00 2001 From: Samuel James <143277412+SamuelSJames@users.noreply.github.com> Date: Sat, 20 Jun 2026 09:00:04 -0400 Subject: [PATCH] Default-collapse already-configured SSH hosts on page load (#19) * Add editable display-name field to generic integrations Lets users set a custom name for Proxmox, Docker, AWS, Remote Desktop, Netbird, Cloudflare, Uptime Kuma, and Weather integrations, separate from the host/IP field, mirroring the SSH host rename pattern. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_016kF4hZWEkRCPPvCZTeXxn4 * Surface the new-integration name field as a labeled input The name field for new generic integrations was a faint header input with only placeholder text, easy to miss. Move it into the form grid as a proper labeled "Name" field next to the other connection fields. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_016kF4hZWEkRCPPvCZTeXxn4 * Add file upload for SSH private key and certificate fields Lets users pick a key file from disk (e.g. ~/.ssh) instead of pasting its contents into the Private Key / OPKSSH Certificate fields. * Fix SSH private key paste corrupting multi-line PEM format Private Key and Certificate fields were single-line elements, which strip newlines on paste and corrupt PEM-formatted keys (causing 'Unsupported key format' errors). Render them as multi-line textareas instead so pasted keys keep their line breaks. * Default-collapse already-configured SSH hosts on page load Previously every SSH host card reset to expanded on each page visit, showing blank secret fields that looked like saved keys had been deleted. Hosts with saved secrets now start collapsed on first load. --------- Co-authored-by: Claude --- src/pages/Settings.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 7709c1d..7612984 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -389,6 +389,7 @@ function SshHostsSection() { const [newDrafts, setNewDrafts] = useState<{ key: number; values: Record }[]>([]) const nextNewKey = useRef(-1) const fileInputRefs = useRef>({}) + const collapseInitialized = useRef(false) function toggleCollapsed(id: number) { setCollapsed((prev) => { @@ -404,7 +405,14 @@ function SshHostsSection() { }, []) function refresh() { - api.listIntegrations().then(({ integrations }) => setHosts(integrations.filter((i) => i.type === 'ssh'))) + api.listIntegrations().then(({ integrations }) => { + const sshHosts = integrations.filter((i) => i.type === 'ssh') + setHosts(sshHosts) + if (!collapseInitialized.current) { + collapseInitialized.current = true + setCollapsed(new Set(sshHosts.filter((h) => h.secretKeys.length > 0).map((h) => h.id))) + } + }) } function toggleReveal(key: string) {