Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(settings): mark remote hosts experimental, drop extra switches
vastsaaf5b50c476e4
diff --git a/apps/desktop/src/components/settings/RemoteHostsPage.tsx b/apps/desktop/src/components/settings/RemoteHostsPage.tsxindex f6c63097d..7c51aa231 100644--- a/apps/desktop/src/components/settings/RemoteHostsPage.tsx+++ b/apps/desktop/src/components/settings/RemoteHostsPage.tsx@@ -4,9 +4,10 @@** Inventory of `<dataDir>/remote-hosts.json` plus one Add form: SSH install* first, URL + pairing token second. Instructional copy stays out of the- * renderer. Unscheduled capabilities render as Experimental rows that toast- * unavailability and never call IPC. A password typed into the SSH form lives- * in this component's state only; it is never persisted or logged here.+ * renderer. The destination is marked Experimental on the settings rail and+ * page title; pairing and SSH bootstrap still call the same IPC. A password+ * typed into the SSH form lives in this component's state only; it is never+ * persisted or logged here.*/import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";@@ -14,7 +15,6 @@ import type { RemoteHostSshAuth, RemoteHostSummary } from "@pi-desktop/shared";import { api } from "../../lib/api";import { useAppStore } from "../../stores/app-store";import { Badge, Button, Field, Input, PasswordInput, cx } from "../ui";-import { SettingsCard, SettingsRow } from "../../features/settings/primitives";type AddMode = "ssh" | "pair";@@ -46,14 +46,6 @@ const EMPTY_SSH_FORM: SshForm = {password: "",};-const EXPERIMENTAL_FEATURES = [- { id: "lan", titleKey: "settings.remoteHosts.experimentalLan" },- { id: "gateway", titleKey: "settings.remoteHosts.experimentalGateway" },- { id: "messaging", titleKey: "settings.remoteHosts.experimentalMessaging" },- { id: "wsl", titleKey: "settings.remoteHosts.experimentalWsl" },- { id: "expose", titleKey: "settings.remoteHosts.experimentalExpose" },-] as const;-export function RemoteHostsPage() {const { t } = useTranslation();const showToast = useAppStore((state) => state.showToast);@@ -177,11 +169,6 @@ export function RemoteHostsPage() {},[sshForm, refresh, showToast, t],);-- const onExperimental = useCallback(() => {- showToast(t("settings.remoteHosts.experimentalUnavailable"), { variant: "info" });- }, [showToast, t]);-const busy = installing || pairing;const sshSubmitDisabled =installing ||@@ -484,24 +471,6 @@ export function RemoteHostsPage() {</form></div></section>-- <SettingsCard title={t("settings.remoteHosts.experimentalTitle")}>- {EXPERIMENTAL_FEATURES.map((feature) => (- <SettingsRow key={feature.id} title={t(feature.titleKey)}>- <button- type="button"- className="settings-toggle"- role="switch"- aria-checked={false}- aria-disabled="true"- aria-label={t(feature.titleKey)}- onClick={onExperimental}- >- <span className="settings-toggle-thumb" />- </button>- </SettingsRow>- ))}- </SettingsCard></div>);}diff --git a/apps/desktop/src/features/settings/SettingsPage.tsx b/apps/desktop/src/features/settings/SettingsPage.tsxindex 3ef2280d3..e49c3f0c2 100644--- a/apps/desktop/src/features/settings/SettingsPage.tsx+++ b/apps/desktop/src/features/settings/SettingsPage.tsx@@ -30,7 +30,7 @@ import {IconSliders,IconSparkles,} from "../../components/icons";-import { Button, cx } from "../../components/ui";+import { Badge, Button, cx } from "../../components/ui";import { ModelConfigPage } from "../../components/settings/ModelConfigPage";import { KeyboardShortcutsSection } from "../../components/settings/KeyboardShortcutsSection";import { FontFamilyRow } from "../../components/settings/FontFamilyRow";@@ -271,6 +271,11 @@ export function SettingsPage() {><span className="settings-nav-icon">{item.icon}</span><span className="settings-nav-label">{t(item.labelKey)}</span>+ {item.id === "remoteHosts" ? (+ <Badge tone="warning" className="settings-nav-experimental">+ {t("settings.remoteHosts.experimental")}+ </Badge>+ ) : null}</button>))}</div>@@ -318,7 +323,12 @@ export function SettingsPage() {<div className="settings-content"><div className="settings-content-inner"><div className="settings-content-enter">- <h1 className="settings-section-title">{activeExtension?.label ?? t(activeTitleKey)}</h1>+ <h1 className="settings-section-title">+ <span>{activeExtension?.label ?? t(activeTitleKey)}</span>+ {!activeExtension && tab === "remoteHosts" ? (+ <Badge tone="warning">{t("settings.remoteHosts.experimental")}</Badge>+ ) : null}+ </h1>{activeExtension ? (<PluginScenicThemesDestination destination={activeExtension} selectTheme={selectPluginTheme} />diff --git a/apps/desktop/src/lib/settings-search.ts b/apps/desktop/src/lib/settings-search.tsindex 479c08229..04fc8713a 100644--- a/apps/desktop/src/lib/settings-search.ts+++ b/apps/desktop/src/lib/settings-search.ts@@ -246,12 +246,7 @@ export const SETTINGS_NAV: SettingsNavEntry[] = ["settings.remoteHosts.sshPassword","settings.remoteHosts.statusOnline","settings.remoteHosts.statusOffline",- "settings.remoteHosts.experimentalTitle",- "settings.remoteHosts.experimentalLan",- "settings.remoteHosts.experimentalGateway",- "settings.remoteHosts.experimentalMessaging",- "settings.remoteHosts.experimentalWsl",- "settings.remoteHosts.experimentalExpose",+ "settings.remoteHosts.experimental",],},{diff --git a/apps/desktop/src/styles/settings.css b/apps/desktop/src/styles/settings.cssindex 5c96dc709..a8d888585 100644--- a/apps/desktop/src/styles/settings.css+++ b/apps/desktop/src/styles/settings.css@@ -320,6 +320,9 @@}.settings-section-title {+ display: flex;+ align-items: center;+ gap: 10px;margin: 0 0 28px;color: var(--ds-text-primary);font-size: var(--text-2xl);@@ -328,6 +331,13 @@line-height: var(--leading-heading);}+.settings-nav-experimental {+ flex: 0 0 auto;+ padding: 1px 6px;+ font-size: var(--text-2xs);+ line-height: var(--leading-compact);+}+.settings-recovery {display: flex;min-height: 160px;@@ -930,17 +940,14 @@/*A disabled switch still reads as a switch: dimmed, not restyled, and the- cursor says why clicking does nothing. `aria-disabled` covers Experimental- rows that must stay focusable so a click can announce unavailability.+ cursor says why clicking does nothing.*/-.settings-toggle:disabled,-.settings-toggle[aria-disabled="true"] {+.settings-toggle:disabled {opacity: 0.5;cursor: not-allowed;}-.settings-toggle:disabled:hover,-.settings-toggle[aria-disabled="true"]:hover {+.settings-toggle:disabled:hover {background: var(--ds-switch-track-off);}diff --git a/apps/desktop/test/settings-remote-hosts.test.mjs b/apps/desktop/test/settings-remote-hosts.test.mjsindex 72cfe94ad..8168c15e2 100644--- a/apps/desktop/test/settings-remote-hosts.test.mjs+++ b/apps/desktop/test/settings-remote-hosts.test.mjs@@ -1,19 +1,21 @@/*** Settings ▸ Remote Hosts page contract.*- * Guards the compact inventory + Add (SSH/Pair) + Experimental layout: no- * instructional copy, both add modes stay mounted behind `hidden`, and the- * unscheduled rows toast unavailability without calling IPC.+ * Guards the compact inventory + Add (SSH/Pair) layout: no instructional+ * copy, both add modes stay mounted behind `hidden`, and the destination is+ * marked Experimental on the rail and page title.*/import { readFileSync } from "node:fs";import assert from "node:assert/strict";import test from "node:test";import { loadStylesSync } from "./helpers/styles.mjs";+import { readSettingsSourceSync } from "./helpers/source-contracts.mjs";const page = readFileSync(new URL("../src/components/settings/RemoteHostsPage.tsx", import.meta.url),"utf8",);+const settings = readSettingsSourceSync();const styles = loadStylesSync();function cssRule(selector) {@@ -46,18 +48,13 @@ test("remote hosts omits instructional copy", () => {assert.doesNotMatch(page, /<SettingsCard title=\{t\("settings\.remoteHosts\.listTitle"\)\}/);});-test("experimental remote-host rows stay local and unavailable", () => {- assert.match(page, /EXPERIMENTAL_FEATURES/);- assert.match(page, /settings\.remoteHosts\.experimentalLan/);- assert.match(page, /settings\.remoteHosts\.experimentalGateway/);- assert.match(page, /settings\.remoteHosts\.experimentalMessaging/);- assert.match(page, /settings\.remoteHosts\.experimentalWsl/);- assert.match(page, /settings\.remoteHosts\.experimentalExpose/);- assert.match(page, /aria-disabled="true"/);- assert.match(page, /experimentalUnavailable/);- assert.doesNotMatch(page, /api\.\w*[Ee]xperimental/);- assert.match(- cssRule('.settings-toggle[aria-disabled="true"]'),- /cursor:\s*not-allowed/,- );+test("the remote-hosts destination is marked experimental", () => {+ assert.match(settings, /item\.id === "remoteHosts"/);+ assert.match(settings, /settings\.remoteHosts\.experimental/);+ assert.match(settings, /className="settings-nav-experimental"/);+ assert.match(cssRule(".settings-nav-experimental"), /font-size:\s*var\(--text-2xs\)/);+ assert.doesNotMatch(page, /EXPERIMENTAL_FEATURES/);+ assert.doesNotMatch(page, /experimentalLan/);+ assert.doesNotMatch(page, /experimentalGateway/);+ assert.doesNotMatch(page, /SettingsCard/);});diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex 2afc57d17..5762a644b 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -11983,17 +11983,15 @@ browser milestones are scheduled.- **Preconditions**: The desktop Settings window can open. No paired remotehost is required.-- **Steps**: 1) Open Settings → Remote Hosts. 2) Confirm the destination is a- host inventory, one Add form with SSH and Pair tabs, and an Experimental- section — not three stacked cards of instructional copy. 3) Switch Add to- Pair and back to SSH; confirm both forms stay filled. 4) Click an- Experimental switch (LAN discovery, browser access, messaging, WSL, or- share this machine).-- **Expected**: Field labels and placeholders remain; overview, body, and- hint copy are absent. SSH stays the default Add tab. Experimental switches- stay off, remain focusable, toast that the capability is not available yet,- and issue no IPC. Pairing and SSH bootstrap keep their existing success and- failure toasts.+- **Steps**: 1) Open Settings. 2) Confirm Remote Hosts shows an Experimental+ badge on the rail. 3) Open it and confirm the page title carries the same+ badge, with a host inventory and one Add form (SSH / Pair) and no+ instructional copy. 4) Switch Add to Pair and back to SSH; confirm both+ forms stay filled.+- **Expected**: The whole destination is marked Experimental. Field labels+ and placeholders remain; overview, body, and hint copy are absent. There+ is no Experimental switch list. SSH stays the default Add tab. Pairing and+ SSH bootstrap keep their existing success and failure toasts.- **Specs linked**: `06-delivery/07-remote-control-rollout.md` §2 R2,`02-architecture/05-remote-agent-control.md` §5.2- **Acceptance**: D (surfaces), Qualitydiff --git a/docs/spec/06-delivery/07-remote-control-rollout.md b/docs/spec/06-delivery/07-remote-control-rollout.mdindex e5407e36e..ec9af3c13 100644--- a/docs/spec/06-delivery/07-remote-control-rollout.md+++ b/docs/spec/06-delivery/07-remote-control-rollout.md@@ -142,11 +142,9 @@ Deliverables:- the terminal: `terminal/open`, `terminal/input`, `terminal/resize`,`terminal/close`, `terminal.output`, and a bounded replay ring, running onthe remote machine; and-- the Settings → Remote Hosts destination: a compact host inventory, one Add- form with SSH and Pair tabs and no instructional copy, and Experimental- rows for unscheduled capabilities (LAN discovery, browser access,- messaging, WSL, share this machine) that toast unavailability and do not- call IPC.+- the Settings → Remote Hosts destination: a compact host inventory and one+ Add form with SSH and Pair tabs, no instructional copy, marked Experimental+ on the settings rail and page title because the topology may still fail.Design decisions (D375, recorded 2026-09-10):diff --git a/docs/zh-CN/spec/06-delivery/07-remote-control-rollout.md b/docs/zh-CN/spec/06-delivery/07-remote-control-rollout.mdindex 72c0bd9b8..6abca3e2b 100644--- a/docs/zh-CN/spec/06-delivery/07-remote-control-rollout.md+++ b/docs/zh-CN/spec/06-delivery/07-remote-control-rollout.md@@ -49,7 +49,7 @@ Linux 或 WSL 机器上的项目,即 SSH 隧道远端 Host 拓扑;#100 要`workspace/list`、`workspace/read`、`workspace/diff`);以及远程会话归属划分;反向工具中继(`tools/advertise` 与 `tool/execute` 服务端请求,让桌面 MCP 服务器和不需工作区的插件工具在远程会话中于桌面执行);终端(`terminal/open`、`terminal/input`、`terminal/resize`、`terminal/close`、- `terminal.output` 与有界回放环,在远端机器运行);设置 → 远程主机为紧凑主机清单加一个 SSH/配对添加表单、不含说明性文案,并以实验性行展示未排期能力(局域网发现、浏览器访问、消息通知、WSL、共享本机),点击只提示暂不可用、不发起 IPC。+ `terminal.output` 与有界回放环,在远端机器运行);设置 → 远程主机为紧凑主机清单加一个 SSH/配对添加表单、不含说明性文案;整项功能在导航与标题上标为实验性,因为远程连接仍可能失败。- R3:出站消息集成(#100)。Host 进程内的又一个模块调用方,无传输、无入站监听:订阅 Host 范围与会话事件,把 `turn.completed`、`turn.failed`、`approval.requested`、`input.requested` 的脱敏摘要转发到出站渠道(先 Webhook,diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.tsindex 0d302d9cf..fce762069 100644--- a/packages/i18n/src/locales/de/index.ts+++ b/packages/i18n/src/locales/de/index.ts@@ -849,13 +849,7 @@ sklm: {"sshSucceeded": "{{label}} installiert.","sshFailed": "Installation fehlgeschlagen: {{message}}","transportSsh": "SSH",- "experimentalTitle": "Experimentell",- "experimentalUnavailable": "Noch nicht verfügbar",- "experimentalLan": "LAN-Erkennung",- "experimentalGateway": "Browserzugriff",- "experimentalMessaging": "Nachrichten",- "experimentalWsl": "WSL",- "experimentalExpose": "Diesen Rechner teilen"+ "experimental": "Experimentell"},"importTitle": "Import aus anderen Tools","importScan": "Scannen",diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.tsindex 4bac83a44..6552445f8 100644--- a/packages/i18n/src/locales/en/index.ts+++ b/packages/i18n/src/locales/en/index.ts@@ -856,13 +856,7 @@ sklm: {sshSucceeded: "{{label}} installed.",sshFailed: "Install failed: {{message}}",transportSsh: "SSH",- experimentalTitle: "Experimental",- experimentalUnavailable: "Not available yet",- experimentalLan: "LAN discovery",- experimentalGateway: "Browser access",- experimentalMessaging: "Messaging",- experimentalWsl: "WSL",- experimentalExpose: "Share this machine",+ experimental: "Experimental",},importTitle: "Import from other tools",importScan: "Scan",diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.tsindex c6ba73806..43bcba03a 100644--- a/packages/i18n/src/locales/es/index.ts+++ b/packages/i18n/src/locales/es/index.ts@@ -849,13 +849,7 @@ sklm: {"sshSucceeded": "{{label}} instalado.","sshFailed": "Error de instalación: {{message}}","transportSsh": "SSH",- "experimentalTitle": "Experimental",- "experimentalUnavailable": "Aún no disponible",- "experimentalLan": "Descubrimiento LAN",- "experimentalGateway": "Acceso del navegador",- "experimentalMessaging": "Mensajería",- "experimentalWsl": "WSL",- "experimentalExpose": "Compartir este equipo"+ "experimental": "Experimental"},"importTitle": "Importar desde otras herramientas","importScan": "Escanear",diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.tsindex 3b8fc5d27..7155e20e2 100644--- a/packages/i18n/src/locales/fr/index.ts+++ b/packages/i18n/src/locales/fr/index.ts@@ -849,13 +849,7 @@ sklm: {"sshSucceeded": "{{label}} installé.","sshFailed": "Échec de l'installation : {{message}}","transportSsh": "SSH",- "experimentalTitle": "Expérimental",- "experimentalUnavailable": "Pas encore disponible",- "experimentalLan": "Découverte LAN",- "experimentalGateway": "Accès navigateur",- "experimentalMessaging": "Messagerie",- "experimentalWsl": "WSL",- "experimentalExpose": "Partager cette machine"+ "experimental": "Expérimental"},"importTitle": "Importer à partir d'autres outils","importScan": "Scanner",diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.tsindex 94e03131f..b718b4779 100644--- a/packages/i18n/src/locales/ko/index.ts+++ b/packages/i18n/src/locales/ko/index.ts@@ -857,13 +857,7 @@ sklm: {sshSucceeded: "{{label}} 설치됨.",sshFailed: "설치 실패: {{message}}",transportSsh: "SSH",- experimentalTitle: "실험적",- experimentalUnavailable: "아직 사용할 수 없음",- experimentalLan: "LAN 검색",- experimentalGateway: "브라우저 접근",- experimentalMessaging: "메시징",- experimentalWsl: "WSL",- experimentalExpose: "이 기기 공유",+ experimental: "실험적",},importTitle: "다른 도구에서 가져오기",importScan: "스캔",diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.tsindex 2a8009c5f..93d65252b 100644--- a/packages/i18n/src/locales/tr/index.ts+++ b/packages/i18n/src/locales/tr/index.ts@@ -857,13 +857,7 @@ sklm: {sshSucceeded: "{{label}} kuruldu.",sshFailed: "Kurulum başarısız: {{message}}",transportSsh: "SSH",- experimentalTitle: "Deneysel",- experimentalUnavailable: "Henüz kullanılamıyor",- experimentalLan: "LAN keşfi",- experimentalGateway: "Tarayıcı erişimi",- experimentalMessaging: "Mesajlaşma",- experimentalWsl: "WSL",- experimentalExpose: "Bu makineyi paylaş",+ experimental: "Deneysel",},importTitle: "Diğer araçlardan içe aktar",importScan: "Tara",diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.tsindex cd06e7988..380a313f5 100644--- a/packages/i18n/src/locales/zh-CN/index.ts+++ b/packages/i18n/src/locales/zh-CN/index.ts@@ -846,13 +846,7 @@ sklm: {sshSucceeded: "已安装 {{label}}。",sshFailed: "安装失败:{{message}}",transportSsh: "SSH",- experimentalTitle: "实验性",- experimentalUnavailable: "暂时不可用",- experimentalLan: "局域网发现",- experimentalGateway: "浏览器访问",- experimentalMessaging: "消息通知",- experimentalWsl: "WSL",- experimentalExpose: "共享本机",+ experimental: "实验性",},importTitle: "从其他工具导入",importScan: "扫描",diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.tsindex 3cfbae215..64d592fa3 100644--- a/packages/i18n/src/locales/zh-TW/index.ts+++ b/packages/i18n/src/locales/zh-TW/index.ts@@ -846,13 +846,7 @@ sklm: {sshSucceeded: "已安裝 {{label}}。",sshFailed: "安裝失敗:{{message}}",transportSsh: "SSH",- experimentalTitle: "實驗性",- experimentalUnavailable: "暫時無法使用",- experimentalLan: "區域網路探索",- experimentalGateway: "瀏覽器存取",- experimentalMessaging: "訊息通知",- experimentalWsl: "WSL",- experimentalExpose: "共享本機",+ experimental: "實驗性",},importTitle: "從其他工具匯入",importScan: "掃描",