From e6d03035118a563563984cd3ebb0ca8175758276 Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Wed, 30 Sep 2026 21:44:18 +0800 Subject: [PATCH] ui(remote): illustrate access to a remote nanobot --- .../src/components/remote/QuickPairSetup.tsx | 63 +++++++++++-------- webui/src/i18n/locales/en/common.json | 4 +- webui/src/i18n/locales/es/common.json | 4 +- webui/src/i18n/locales/fr/common.json | 4 +- webui/src/i18n/locales/id/common.json | 4 +- webui/src/i18n/locales/ja/common.json | 4 +- webui/src/i18n/locales/ko/common.json | 4 +- webui/src/i18n/locales/pt-BR/common.json | 4 +- webui/src/i18n/locales/vi/common.json | 4 +- webui/src/i18n/locales/zh-CN/common.json | 4 +- webui/src/i18n/locales/zh-TW/common.json | 4 +- webui/src/tests/app-layout.test.tsx | 10 +-- webui/src/tests/quick-pair.test.tsx | 37 +++++++++-- webui/src/tests/remote-instances.test.tsx | 52 +++++++-------- 14 files changed, 122 insertions(+), 80 deletions(-) diff --git a/webui/src/components/remote/QuickPairSetup.tsx b/webui/src/components/remote/QuickPairSetup.tsx index 17fdbebb2..048569708 100644 --- a/webui/src/components/remote/QuickPairSetup.tsx +++ b/webui/src/components/remote/QuickPairSetup.tsx @@ -133,31 +133,26 @@ export function QuickPairSetup({ returned, onSSH, onClose }: { returned?: PairRe const description = preview || reviewingReturn ? "remote.pair.confirmLinkDescription" : restartAvailable ? "remote.pair.introHint" : manual ? "remote.pair.codeHint" : copied ? "remote.pair.afterCopyHint" : "remote.pair.introHint"; const showCopied = copied && !manual && !preview && !restartAvailable; + const showIllustration = !preview && !manual && !reviewingReturn && !restartAvailable; const showBusy = pending && busyVisible; const actionLabel = restartAvailable ? "remote.pair.restart" : reviewingReturn ? error ? "remote.retry" : "remote.pair.review" : preview ? saved ? "remote.retry" : "remote.connect" : manual ? "remote.pair.review" : copied ? "remote.pair.copyAgain" : "remote.pair.copy"; const busyLabel = waitingForLocal ? "remote.pair.waitingForLocal" : preview ? "remote.connecting" : !restartAvailable && (manual || returned) ? "remote.pair.checkingLink" : "remote.pair.preparing"; - return <> - -
- - {showCopied && -
- {t(description)} - {/* Reserve the longer instruction in either state, including translated text. - It is only a layout spacer, never a second screen-reader announcement. */} - {!preview && !manual && !reviewingReturn && } + return
+
+ + {showIllustration && } +
+ + {showCopied && + {t(description)}
-
- -
- {preview ?
+ + {preview ?

{preview.hostname}

{preview.host}

@@ -174,16 +169,16 @@ export function QuickPairSetup({ returned, onSSH, onClose }: { returned?: PairRe summary={<>{t("remote.pair.route")}}>
}
: restartAvailable ? null : <> - {manual &&
+ {manual &&