Skip to content

The agent that grows with you

fix(desktop): label this device's version beside the connected backend's

Tekniumaa12502f7dae
diff --git a/apps/desktop/src/components/version-details.test.tsx b/apps/desktop/src/components/version-details.test.tsx
index d76b716cc9d..2320b6fd558 100644
--- a/apps/desktop/src/components/version-details.test.tsx
+++ b/apps/desktop/src/components/version-details.test.tsx
@@ -89,7 +89,12 @@ describe('VersionDetails', () => {
// clone (live provenance, no receipt): both honestly say Source.
{ version: { installedByScript: true }, visible: ['Source (install script)'] },
{ version: { source: 'git' }, visible: ['Distribution', 'Source'], absent: ['Source (install script)'] },
- { version: {}, visible: ['Version'], absent: ['Distribution'] }
+ { version: {}, visible: ['Version'], absent: ['Distribution', 'This device', 'Connected backend'] },
+ // Both sides, labelled: this machine's install beside the active connection's backend.
+ {
+ version: { appVersion: '0.21.6', clientVersion: '0.22.2', backendVersion: '0.21.6' },
+ visible: ['This device', 'v0.22.2', 'Connected backend', 'v0.21.6']
+ }
]
it.each(cases)('renders $version', ({ version, visible, absent = [] }: VersionCase): void => {
diff --git a/apps/desktop/src/components/version-details.tsx b/apps/desktop/src/components/version-details.tsx
index 4b08e403d0c..e2aa5ffbcf4 100644
--- a/apps/desktop/src/components/version-details.tsx
+++ b/apps/desktop/src/components/version-details.tsx
@@ -41,6 +41,20 @@ function ChannelRow({ action }: { action?: ReactNode }) {
)
}
+/** One side of a client/backend pair; a side that did not answer renders nothing. */
+function SideVersionRow({ label, value }: { label: string; value?: string }) {
+ if (!value) {
+ return null
+ }
+
+ return (
+ <div className="flex justify-between gap-4">
+ <dt className="text-muted-foreground">{label}</dt>
+ <dd>v{shortVersion(value)}</dd>
+ </div>
+ )
+}
+
/**
* Shared build-provenance display. Reads from `$desktopVersion`
* (populated from the build stamp / `hermes:version` IPC), so every
@@ -87,6 +101,8 @@ export function VersionDetails({ version, channelAction }: { version: DesktopVer
{version.dirty && <span className="text-warning"> (!)</span>}
</dd>
</div>
+ <SideVersionRow label={u.versionDetailsClient} value={version.clientVersion} />
+ <SideVersionRow label={u.versionDetailsBackend} value={version.backendVersion} />
{version.commit && (
<div className="flex justify-between gap-4">
<dt className="text-muted-foreground">{u.versionDetailsCommit}</dt>
diff --git a/apps/desktop/src/global.d.ts b/apps/desktop/src/global.d.ts
index 70062a69e9c..bcfbcb0dbfe 100644
--- a/apps/desktop/src/global.d.ts
+++ b/apps/desktop/src/global.d.ts
@@ -832,6 +832,10 @@ export interface DesktopSyncReceipt {
export interface DesktopVersionInfo {
/** Packaged client version, or the runtime version for source installs. */
appVersion: string
+ /** The active connection's backend runtime version ('' when unreachable). */
+ backendVersion?: string
+ /** This machine's install: the stamp for packages, `hermes --version` for source installs. */
+ clientVersion?: string
/** Fixed release identity. Commit builds have no update channel. */
channel?: string | null
electronVersion: string
diff --git a/apps/desktop/src/i18n/ar_boot.ts b/apps/desktop/src/i18n/ar_boot.ts
index 1b2a602ba5c..5738ada0c4b 100644
--- a/apps/desktop/src/i18n/ar_boot.ts
+++ b/apps/desktop/src/i18n/ar_boot.ts
@@ -141,6 +141,8 @@ export const arBoot = {
versionDetailsTitle: 'تفاصيل الإصدار',
versionDetailsBody: 'هذا التثبيت مُدار خارج التطبيق. حدّثه بالطريقة نفسها التي استخدمتها لتثبيته.',
versionDetailsVersion: 'الإصدار',
+ versionDetailsClient: 'هذا الجهاز',
+ versionDetailsBackend: 'الخادم المتصل',
versionDetailsCommit: 'الالتزام',
versionDetailsBuildOrigin: 'مصدر البناء',
versionDetailsDistribution: 'التوزيع',
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index 4d764110426..4a6cd714e1e 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -4115,6 +4115,8 @@ export const deOverrides = {
versionDetailsBody:
'Diese Installation wird außerhalb der App verwaltet. Aktualisieren Sie sie auf dieselbe Weise, wie Sie sie installiert haben.',
versionDetailsVersion: 'Version',
+ versionDetailsClient: 'Dieses Gerät',
+ versionDetailsBackend: 'Verbundenes Backend',
versionDetailsCommit: 'Commit',
versionDetailsBuildOrigin: 'Build-Ursprung',
versionDetailsDistribution: 'Distribution',
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 98f16031fa4..71bda372ce4 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -3799,6 +3799,8 @@ export const en: Translations = {
versionDetailsTitle: 'Version details',
versionDetailsBody: 'This install is managed outside the app. Update it the same way you installed it.',
versionDetailsVersion: 'Version',
+ versionDetailsClient: 'This device',
+ versionDetailsBackend: 'Connected backend',
versionDetailsCommit: 'Commit',
versionDetailsBuildOrigin: 'Build Origin',
versionDetailsDistribution: 'Distribution',
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index a7e33bfc430..bc5da139557 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -4104,6 +4104,8 @@ export const esOverrides = {
versionDetailsBody:
'Esta instalación se administra fuera de la app. Actualízala de la misma forma en que la instalaste.',
versionDetailsVersion: 'Versión',
+ versionDetailsClient: 'Este dispositivo',
+ versionDetailsBackend: 'Backend conectado',
versionDetailsCommit: 'Commit',
versionDetailsBuildOrigin: 'Origen de la compilación',
versionDetailsDistribution: 'Distribución',
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index 12cc2d2fe42..e88ba109cee 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -4124,6 +4124,8 @@ export const frOverrides = {
versionDetailsBody:
"Cette installation est gérée hors de l'application. Mettez-la à jour de la même manière que vous l'avez installée.",
versionDetailsVersion: 'Version',
+ versionDetailsClient: 'Cet appareil',
+ versionDetailsBackend: 'Backend connecté',
versionDetailsCommit: 'Commit',
versionDetailsBuildOrigin: 'Origine de la compilation',
versionDetailsDistribution: 'Distribution',
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index 9d7f1b3bad0..34e726f5cd0 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -3271,6 +3271,8 @@ catalog: CatalogTranslations
versionDetailsTitle: string
versionDetailsBody: string
versionDetailsVersion: string
+ versionDetailsClient: string
+ versionDetailsBackend: string
versionDetailsCommit: string
versionDetailsBuildOrigin: string
versionDetailsDistribution: string
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 0a69b127540..50eb542b0a4 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -3674,6 +3674,8 @@ export const zhOverrides = {
versionDetailsTitle: '版本详情',
versionDetailsBody: '此安装在应用外部管理。请使用与安装时相同的方式更新。',
versionDetailsVersion: '版本',
+ versionDetailsClient: '本设备',
+ versionDetailsBackend: '已连接的后端',
versionDetailsCommit: '提交',
versionDetailsBuildOrigin: '构建来源',
versionDetailsDistribution: '发行版',