Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(settings): integrate remote host actions and project creation

vastsa2cfc3b183d73
diff --cc apps/desktop/src/components/settings/RemoteHostsPage.tsx
index f6f86013e,31b267717..c25e6485a
--- a/apps/desktop/src/components/settings/RemoteHostsPage.tsx
+++ b/apps/desktop/src/components/settings/RemoteHostsPage.tsx
@@@ -70,7 -69,8 +69,8 @@@ export function RemoteHostsPage()
const [removing, setRemoving] = useState<string | null>(null);
const [sshForm, setSshForm] = useState<SshForm>(EMPTY_SSH_FORM);
const [installing, setInstalling] = useState(false);
- const [addMode, setAddMode] = useState<AddMode>("ssh");
+ const [addMode, setAddMode] = useState<AddMode | null>(null);
+ const sshIdentityFileInput = useRef<HTMLInputElement>(null);
const refresh = useCallback(async () => {
const generation = ++refreshGeneration.current;
diff --cc apps/desktop/test/settings-remote-hosts.test.mjs
index 234158206,d5e9ee4a2..30aa4bc4c
--- a/apps/desktop/test/settings-remote-hosts.test.mjs
+++ b/apps/desktop/test/settings-remote-hosts.test.mjs
@@@ -53,6 -46,38 +53,37 @@@ test("remote hosts keeps Add actions vi
assert.match(cssRule(".settings-remote-host-name"), /font-size:\s*var\(--text-md-plus\)/);
});
+ test("remote host cards open project creation instead of a session workbench", () => {
+ assert.match(page, /openProject\(\{ remoteHostKey: host\.hostKey \}\)/);
+ assert.match(page, /remoteT\("newProject"\)/);
+ assert.doesNotMatch(page, /RemoteHostSessions|selectedHost|remoteT\("sessions"\)/);
+ });
+
+ test("SSH key mode selects a local identity file instead of accepting a typed path", () => {
+ const start = page.indexOf('<Field label={t("settings.remoteHosts.sshIdentityFile")}>');
+ const end = page.indexOf(") : (", start);
+ assert.ok(start >= 0 && end > start, "key-auth identity field should exist");
+ const identityField = page.slice(start, end);
+ const displayInput = identityField.match(/<Input[\s\S]*?\/>/)?.[0];
+ assert.ok(displayInput, "selected path should use the shared Input primitive");
+ assert.match(displayInput, /readOnly/);
+ assert.doesNotMatch(displayInput, /onChange=/);
+ assert.match(identityField, /sshIdentityFileChoose/);
+ assert.match(identityField, /sshIdentityFileClear/);
+ assert.match(identityField, /type="file"/);
+ assert.match(identityField, /onChange={handleSshIdentityFileChange}/);
+ assert.match(page, /api\.getDroppedFilePath\(file\)/);
+ assert.match(page, /input\.value = ""/);
+ assert.match(page, /if \(!file\) return/);
+ assert.match(page, /const identityFile = sshForm\.identityFile;/);
+ assert.match(page, /sshIdentityFileError/);
+ assert.match(
+ cssRule(".settings-remote-host-identity-file"),
+ /grid-template-columns: minmax\(0, 1fr\) auto auto/,
+ );
+ assert.match(cssRule(".settings-remote-host-identity-file-input"), /display: none/);
+ });
-});
+
test("remote hosts omits instructional copy", () => {
assert.doesNotMatch(page, /role="note"/);
assert.doesNotMatch(page, /settings-row-desc/);
diff --cc docs/spec/04-ux/06-settings-ia.md
index 3080d88ea,6f9303ffa..33051b273
--- a/docs/spec/04-ux/06-settings-ia.md
+++ b/docs/spec/04-ux/06-settings-ia.md
@@@ -82,12 -82,12 +82,15 @@@ Settings is a **full-window page** tha
- **Remote Hosts / 远程主机** is an Experimental destination in all builds,
independent of developer mode. The rail, page and search hits remain available.
The row and title carry `settings.remoteHosts.experimental`. After pairing,
- each host offers reconnect and an inline project/session workbench. The
- inventory is the default view; SSH installation and existing-host pairing are
- explicit actions that reveal one form on demand. Cancel and successful submission
- close the form and clear its draft. SSH hosts offer eligible-provider copy with
- empty selection and explicit credential-copy consent. Remote chat uses Host
- defaults and never activates local workspaces.
+ each host offers **New project**, reconnect, and remove. New project opens the
+ unified Create project dialog with Remote selected and that host preselected;
+ selecting an absolute directory creates a locally managed project bound to
+ the remote workspace. The inventory does not list or create conversations.
- SSH hosts offer eligible-provider copy with empty selection and explicit credential-copy
- consent. Remote chat uses Host defaults and never activates local workspaces.
++ The inventory is the default view; SSH installation and existing-host pairing
++ are explicit actions that reveal one form on demand. Cancel and successful
++ submission close the form and clear its draft. SSH hosts offer eligible-provider
++ copy with empty selection and explicit credential-copy consent. Remote chat
++ uses Host defaults and never activates local workspaces.
The narrow MVP supports text, tool/input responses and read-only files/diffs;
terminal, attachments, local model controls and local plugin/MCP actions are absent.
- Loaded plugin Settings entries may appear only in a final **Extensions** group