From 3b0bbfc40a08ce58046ba16214c2d99a72998b9c Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Thu, 9 Oct 2025 09:37:11 +0800 Subject: [PATCH] fix: include statsConfig in SSH host create/update requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The statsConfig field was being dropped by createSSHHost and updateSSHHost functions in main-axios.ts, preventing layout customization from persisting. Fixed by adding statsConfig to the submitData object in both functions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/ui/main-axios.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ui/main-axios.ts b/src/ui/main-axios.ts index f72fefdb..16e1b553 100644 --- a/src/ui/main-axios.ts +++ b/src/ui/main-axios.ts @@ -526,7 +526,10 @@ function handleApiError(error: unknown, operation: string): never { if (axios.isAxiosError(error)) { const status = error.response?.status; - const message = error.response?.data?.message || error.response?.data?.error || error.message; + const message = + error.response?.data?.message || + error.response?.data?.error || + error.message; const code = error.response?.data?.code || error.response?.data?.error; const url = error.config?.url; const method = error.config?.method?.toUpperCase(); @@ -683,6 +686,7 @@ export async function createSSHHost(hostData: SSHHostData): Promise { enableFileManager: Boolean(hostData.enableFileManager), defaultPath: hostData.defaultPath || "/", tunnelConnections: hostData.tunnelConnections || [], + statsConfig: hostData.statsConfig || null, }; if (!submitData.enableTunnel) { @@ -739,6 +743,7 @@ export async function updateSSHHost( enableFileManager: Boolean(hostData.enableFileManager), defaultPath: hostData.defaultPath || "/", tunnelConnections: hostData.tunnelConnections || [], + statsConfig: hostData.statsConfig || null, }; if (!submitData.enableTunnel) {