From d2b3dcf0ebb85916a134fb3b131906b0d80ddeac Mon Sep 17 00:00:00 2001 From: Diogo Munhoz Fraga Date: Thu, 26 Feb 2026 15:49:16 -0300 Subject: [PATCH 1/2] fix(portal): guard command.trim when settings.command is array in WebappForm --- portal/src/components/applications/WebappForm.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/portal/src/components/applications/WebappForm.tsx b/portal/src/components/applications/WebappForm.tsx index beeaeef..302752a 100644 --- a/portal/src/components/applications/WebappForm.tsx +++ b/portal/src/components/applications/WebappForm.tsx @@ -36,7 +36,13 @@ export function WebappForm({ settings, onChange, url, onUrlChange, hasGatewayApi const hasAdvancedChanges = () => { const hasEnvs = settings.envs && settings.envs.length > 0 const hasSecrets = settings.secrets && settings.secrets.length > 0 - const hasCommand = settings.command && settings.command.trim() !== '' + const hasCommand = (() => { + const cmd = settings.command + if (cmd == null) return false + if (typeof cmd === 'string') return cmd.trim() !== '' + if (Array.isArray(cmd)) return cmd.length > 0 && cmd.some((c) => String(c).trim() !== '') + return false + })() const hasCustomCpu = settings.cpu !== undefined && settings.cpu !== 0.5 const hasCustomMemory = settings.memory !== undefined && settings.memory !== 512 return hasEnvs || hasSecrets || hasCommand || hasCustomCpu || hasCustomMemory From a0b9074075588d9e08ccefb46eef86f171499fb5 Mon Sep 17 00:00:00 2001 From: Diogo Munhoz Fraga Date: Thu, 26 Feb 2026 15:55:02 -0300 Subject: [PATCH 2/2] fix(portal): fix tsc errors in WebappForm command check --- portal/src/components/applications/WebappForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portal/src/components/applications/WebappForm.tsx b/portal/src/components/applications/WebappForm.tsx index 302752a..a5ce044 100644 --- a/portal/src/components/applications/WebappForm.tsx +++ b/portal/src/components/applications/WebappForm.tsx @@ -37,10 +37,10 @@ export function WebappForm({ settings, onChange, url, onUrlChange, hasGatewayApi const hasEnvs = settings.envs && settings.envs.length > 0 const hasSecrets = settings.secrets && settings.secrets.length > 0 const hasCommand = (() => { - const cmd = settings.command + const cmd: unknown = settings.command if (cmd == null) return false if (typeof cmd === 'string') return cmd.trim() !== '' - if (Array.isArray(cmd)) return cmd.length > 0 && cmd.some((c) => String(c).trim() !== '') + if (Array.isArray(cmd)) return cmd.length > 0 && cmd.some((c: unknown) => String(c).trim() !== '') return false })() const hasCustomCpu = settings.cpu !== undefined && settings.cpu !== 0.5