From 63adccb1c7f5c20370518dbab5bce3561087f7d1 Mon Sep 17 00:00:00 2001 From: Samuel James <143277412+SamuelSJames@users.noreply.github.com> Date: Sat, 20 Jun 2026 08:53:56 -0400 Subject: [PATCH] Show saved indicator for secret fields instead of appearing deleted (#18) * 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. * Show saved indicator for secret fields instead of appearing blank/deleted GET /api/integrations never returns decrypted secret values (by design), so after navigating away and back, secret/key fields rendered empty - looking exactly like the saved key had been deleted, even though it was still intact and encrypted in the database. Expose which secret keys exist (names only, never values) via secretKeys, and use it to label fields as "saved" with an appropriate placeholder instead of blank. --------- Co-authored-by: Claude --- backend/src/routes/integrations.ts | 4 ++++ src/lib/api.ts | 1 + src/pages/Settings.tsx | 27 ++++++++++++++++++++------- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/backend/src/routes/integrations.ts b/backend/src/routes/integrations.ts index 9b4f50c..a2917ec 100644 --- a/backend/src/routes/integrations.ts +++ b/backend/src/routes/integrations.ts @@ -37,6 +37,9 @@ interface IntegrationRow { } function serialize(row: IntegrationRow) { + const secretKeys = ( + db.prepare('SELECT key FROM secrets WHERE integration_id = ?').all(row.id) as { key: string }[] + ).map((r) => r.key) return { id: row.id, type: row.type, @@ -44,6 +47,7 @@ function serialize(row: IntegrationRow) { enabled: !!row.enabled, status: row.status, config: JSON.parse(row.config_json), + secretKeys, lastCheckedAt: row.last_checked_at, createdAt: row.created_at, } diff --git a/src/lib/api.ts b/src/lib/api.ts index 0fff277..798fdb4 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -185,6 +185,7 @@ export interface Integration { enabled: boolean status: string config: Record + secretKeys: string[] lastCheckedAt: string | null createdAt: string } diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 073ee52..7709c1d 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -562,15 +562,19 @@ function SshHostsSection() { const value = values[f.key] ?? savedValue if (f.file) { + const isSaved = existing?.secretKeys?.includes(f.key) return (
- +