From 2f42f1cd55610e94565bf924f6c3035477d2d311 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Tue, 10 Nov 2026 15:07:53 +0000 Subject: [PATCH 1/3] chore: pull sponsor logos from the docs site --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3aba472..11bac70 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,10 @@ For a paid sponsor spot, email [mail@termix.site](mailto:mail@termix.site). Hetzner +    + + Ember Swan + From e26564083151b739e7d9bbe933b15c5f458f16c6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 17:34:26 +0000 Subject: [PATCH 2/3] chore: update the demo video link --- README.md | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11bac70..f359e21 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ -Watch the demo on YouTube +Watch the demo on YouTube diff --git a/manifest.json b/manifest.json index 00f4ef2..07b8845 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "license": "Apache-2.0", "repository": "https://github.com/Termix-SSH/Plugin-SSH-Terminal", "docs": "https://docs.termix.site/plugins/ssh-terminal", - "video": "https://www.youtube.com/watch?v=htdU7pw1fiw", + "video": "https://www.youtube.com/watch?v=A8mSVayxS7o", "category": "Terminal", "icon": "SquareTerminal", "features": [ From d21578d6bf0db48d4d35a44567f928a051448ad8 Mon Sep 17 00:00:00 2001 From: Li-Lee <4946929+Li-Lee@users.noreply.github.com> Date: Tue, 10 Nov 2026 14:03:55 -0500 Subject: [PATCH 3/3] fix: upload terminal images to the backend that holds the session In the desktop app, a terminal whose session was started on the linked server still posted /image-upload to the app's local backend. That backend has no such session, so it had no SFTP connection to store the image through and answered 503 IMAGE_STORAGE_UNAVAILABLE. Send the upload through usePluginApiFor("remote") when the session's origin is remote, and through the local client otherwise. Co-Authored-By: Claude Fable 5.2 --- src/frontend/terminal/Terminal.tsx | 10 +++++++++- src/frontend/terminal/terminal-image-upload.ts | 14 ++++++++++++++ .../terminal-image-upload-metadata.test.ts | 18 +++++++++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/frontend/terminal/Terminal.tsx b/src/frontend/terminal/Terminal.tsx index 1cf0f89..b41c990 100644 --- a/src/frontend/terminal/Terminal.tsx +++ b/src/frontend/terminal/Terminal.tsx @@ -60,6 +60,7 @@ import { useCommandHistory } from "./command-history/CommandHistoryContext"; import { getAndroidHardwareKeySequence } from "./android-hardware-keyboard"; import { buildImageUploadFormData, + selectImageUploadApi, type TerminalImageUploadSource, } from "./terminal-image-upload"; import { createTerminalNativePasteHandler } from "./terminal-native-paste"; @@ -163,6 +164,7 @@ import { useTranslation, invokeAction, usePluginApi, + usePluginApiFor, useSlotContributions, getCustomKeybindings, runKeybindingAction, @@ -257,6 +259,7 @@ const TerminalInner = forwardRef( ) { const { t } = useTranslation(); const api = usePluginApi(); + const remoteApi = usePluginApiFor("remote"); const { instance: terminal, ref: xtermRef } = useXTerm(); const commandHistoryContext = useCommandHistory(); const confirm = useConfirm(); @@ -3837,7 +3840,12 @@ const TerminalInner = forwardRef( hostConfig.instanceId ?? "", source, ); - const response = await api.post("/image-upload", form, { + const uploadApi = selectImageUploadApi( + sessionOriginRef.current, + api, + remoteApi, + ); + const response = await uploadApi.post("/image-upload", form, { headers: { "Content-Type": undefined }, }); const { shellPath } = response.data as { diff --git a/src/frontend/terminal/terminal-image-upload.ts b/src/frontend/terminal/terminal-image-upload.ts index e92688c..3775b73 100644 --- a/src/frontend/terminal/terminal-image-upload.ts +++ b/src/frontend/terminal/terminal-image-upload.ts @@ -13,3 +13,17 @@ export function buildImageUploadFormData( form.append("clientUploadTimestamp", clientUploadTimestamp); return form; } + +/** + * The API client an image upload goes to. The backend stores the image through + * the terminal's SSH session, so the upload has to reach the backend that holds + * that session: the linked server for a session opened there from the desktop + * app, the local backend otherwise. + */ +export function selectImageUploadApi( + sessionOrigin: "local" | "remote", + localApi: T, + remoteApi: T, +): T { + return sessionOrigin === "remote" ? remoteApi : localApi; +} diff --git a/tests/frontend/terminal/terminal-image-upload-metadata.test.ts b/tests/frontend/terminal/terminal-image-upload-metadata.test.ts index c0576f0..4765444 100644 --- a/tests/frontend/terminal/terminal-image-upload-metadata.test.ts +++ b/tests/frontend/terminal/terminal-image-upload-metadata.test.ts @@ -1,5 +1,8 @@ import { describe, expect, it } from "vitest"; -import { buildImageUploadFormData } from "../../../src/frontend/terminal/terminal-image-upload"; +import { + buildImageUploadFormData, + selectImageUploadApi, +} from "../../../src/frontend/terminal/terminal-image-upload"; describe("buildImageUploadFormData", () => { it("tags a picked-file upload with source=file and a client timestamp", () => { @@ -38,3 +41,16 @@ describe("buildImageUploadFormData", () => { expect(form.get("clientUploadTimestamp")).toBe("2026-08-15T12:00:00.000Z"); }); }); + +describe("selectImageUploadApi", () => { + const localApi = { name: "local" }; + const remoteApi = { name: "remote" }; + + it("uploads to the linked server when the session was opened there", () => { + expect(selectImageUploadApi("remote", localApi, remoteApi)).toBe(remoteApi); + }); + + it("uploads to the local backend when the session is local", () => { + expect(selectImageUploadApi("local", localApi, remoteApi)).toBe(localApi); + }); +});