fix(desktop): name the backend when a remote update needs a manual command

When the connected backend refuses a dashboard update and returns a real
command (docker/nix installs), the manual dialog said "You installed
Hermes from the command line" -- untrue for a remote backend. Use
backend-aware copy instead.

Salvaged from #78958. The PR's backend half (returning
recommended_update_command() from the managed-externally refusal) is not
carried: that branch only fires for hosted /opt/data and pip/docker
container installs, where the recommended command is exactly the update
the guard blocks. The earlier commit in this series returns an empty
command there instead.
This commit is contained in:
Larry Pang
2026-09-25 14:25:33 +05:30
committed by kshitij
parent 2e1d976235
commit 745bd737a9
7 changed files with 24 additions and 2 deletions

View File

@@ -130,6 +130,7 @@ export function UpdatesOverlay() {
{phase === 'manual' && (
<ManualView
command={apply.command ?? null}
isBackend={isBackend}
message={apply.message}
onDone={() => handleClose(false)}
refused={apply.error !== null}
@@ -338,11 +339,13 @@ function IdleView({
function ManualView({
command,
isBackend,
message,
onDone,
refused = false
}: {
command: string | null
isBackend: boolean
message?: string
onDone: () => void
refused?: boolean
@@ -390,7 +393,9 @@ function ManualView({
<Terminal className="size-8 text-primary" />
<DialogTitle className="text-center text-xl">{u.manualTitle}</DialogTitle>
<DialogDescription className="text-center text-sm">{guidance ?? u.manualBody}</DialogDescription>
<DialogDescription className="text-center text-sm">
{guidance ?? (isBackend ? u.manualBodyBackend : u.manualBody)}
</DialogDescription>
</div>
<button
@@ -416,7 +421,11 @@ function ManualView({
</span>
</button>
{!guidance && <p className="text-center text-xs text-muted-foreground">{u.manualPickedUp}</p>}
{!guidance && (
<p className="text-center text-xs text-muted-foreground">
{isBackend ? u.manualPickedUpBackend : u.manualPickedUp}
</p>
)}
<Button className="font-semibold" onClick={onDone} size="lg" variant="secondary">
{u.done}

View File

@@ -2659,7 +2659,9 @@ export const ar = defineLocale({
manualTitle: 'التحديث من الطرفية',
manualUnavailableTitle: 'لا يمكن التحديث من هنا',
manualBody: 'لقد ثبّتت Hermes من سطر الأوامر، لذا تُجرى التحديثات من هناك أيضا. الصق هذا في طرفيتك:',
manualBodyBackend: 'تتم إدارة خادم Hermes خارج هذا التطبيق. نفّذ هذا الأمر على الخادم الذي يستضيفه:',
manualPickedUp: 'سيلتقط Hermes الإصدار الجديد في المرة التالية التي تشغّله فيها.',
manualPickedUpBackend: 'سيحمّل الخادم الإصدار الجديد بعد اكتمال التحديث.',
guiSkewTitle: 'تحديث تطبيق سطح المكتب',
guiSkewBody:
'تم تحديث الواجهة الخلفية، لكن حزمة تطبيق سطح المكتب هذه لم تتغير. حدّث أو أعد تثبيت تطبيق Hermes لسطح المكتب (ملف AppImage / ‎.deb / ‎.rpm) لمطابقته.',

View File

@@ -4163,7 +4163,9 @@ export const en: Translations = {
manualTitle: 'Update from your terminal',
manualUnavailableTitle: "Can't update from here",
manualBody: 'You installed Hermes from the command line, so updates run there too. Paste this into your terminal:',
manualBodyBackend: 'The Hermes backend is managed outside this app. Run this on the server that hosts it:',
manualPickedUp: 'Hermes will pick up the new version next time you launch it.',
manualPickedUpBackend: 'The backend picks up the new version after the update completes.',
guiSkewTitle: 'Update the desktop app',
guiSkewBody:
'The backend was updated, but this desktop app package wasn’t changed. Update or reinstall the Hermes desktop app (your AppImage / .deb / .rpm) to match.',

View File

@@ -3038,7 +3038,10 @@ export const ja = defineLocale({
manualUnavailableTitle: 'ここからは更新できません',
manualBody:
'Hermes をコマンドラインからインストールしたため、更新もそこで実行されます。これをターミナルに貼り付けてください:',
manualBodyBackend:
'Hermes バックエンドはこのアプリの外部で管理されています。ホストするサーバーで次のコマンドを実行してください:',
manualPickedUp: 'Hermes は次回起動時に新しいバージョンを読み込みます。',
manualPickedUpBackend: 'バックエンドは更新完了後に新しいバージョンを読み込みます。',
guiSkewTitle: 'デスクトップアプリを更新してください',
guiSkewBody:
'バックエンドは更新されましたが、このデスクトップアプリのパッケージは変更されていません。一致させるために Hermes デスクトップアプリ(AppImage / .deb / .rpm)を更新または再インストールしてください。',

View File

@@ -3465,7 +3465,9 @@ export interface Translations {
manualTitle: string
manualUnavailableTitle: string
manualBody: string
manualBodyBackend: string
manualPickedUp: string
manualPickedUpBackend: string
/** GUI/backend skew (#45205): backend updated but the running desktop app
* package (AppImage/.deb/.rpm) was not changed and must be reinstalled. */
guiSkewTitle: string

View File

@@ -3248,7 +3248,9 @@ export const zhHant = defineLocale({
manualTitle: '從終端機更新',
manualUnavailableTitle: '無法從這裡更新',
manualBody: '您是從命令列安裝的 Hermes,因此更新也需要在那裡執行。請將此指令貼到終端機:',
manualBodyBackend: 'Hermes 後端由本應用程式之外管理。請在託管它的伺服器上執行此指令:',
manualPickedUp: '下次啟動 Hermes 時會使用新版本。',
manualPickedUpBackend: '後端會在更新完成後載入新版本。',
guiSkewTitle: '請更新桌面應用程式',
guiSkewBody:
'後端已更新,但此桌面應用程式套件未變更。請更新或重新安裝 Hermes 桌面應用程式(你的 AppImage / .deb / .rpm)以保持一致。',

View File

@@ -3945,7 +3945,9 @@ export const zh = defineLocale({
manualTitle: '从终端更新',
manualUnavailableTitle: '无法从这里更新',
manualBody: '你是从命令行安装的 Hermes,因此更新也需要在那里运行。请将此命令粘贴到终端:',
manualBodyBackend: 'Hermes 后端由本应用之外管理。请在托管它的服务器上运行此命令:',
manualPickedUp: '下次启动 Hermes 时会使用新版本。',
manualPickedUpBackend: '后端将在更新完成后加载新版本。',
guiSkewTitle: '请更新桌面应用',
guiSkewBody:
'后端已更新,但此桌面应用包未更改。请更新或重新安装 Hermes 桌面应用(你的 AppImage / .deb / .rpm)以保持一致。',