D2: Remote Host browser, compare and sync preview in the UI; docs and G17
Some checks failed
ci / ci (macos-15) (push) Has been cancelled
ci / ci (ubuntu-24.04) (push) Has been cancelled
ci / ci (windows-2025) (push) Has been cancelled

Remote Host tool window (server select, tree, read-only viewer with Edit
and Upload, rename, new folder, delete after its question), server tabs
in the diff viewer, sync preview (uploads preselected, deletions never,
extra confirmation before deleting on the server), Compare with Server
in the tree menu and Tools › Deployment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-11-06 19:49:53 +01:00
parent 7601ce12f6
commit 1c6c67194a
16 changed files with 1813 additions and 19 deletions

View file

@ -1,6 +1,6 @@
# Deployment
> **Status:** Deployment v1 (C9 D1, owner decision D27): servers per project, upload, download, upload on save, test connection, host keys, Deployment log. Remote browser, compare and sync follow in D2 · **Last updated:** 2026-11-06
> **Status:** Deployment v1 (C9 D1, owner decision D27): servers per project, upload, download, upload on save, test connection, host keys, Deployment log. v2 (C9 D2): Remote Host browser, compare with the server, sync with a preview, save before upload · **Last updated:** 2026-11-06
Lutra uploads a PHP project to a server and downloads files back, the way people deploy shared hosting and small servers every day.
@ -41,14 +41,29 @@ Uploads and downloads never ask about a key; they fail with a message pointing t
- **Project tree:** right-click a file or folder › **Upload to Server** / **Download from Server** (default server).
- **Tools › Deployment:** Upload Current File, Download Current File, Upload Project, Test Connection, Deployment Log.
- The same actions are in the command palette. Lutra assigns no default shortcuts; bind them in the keymap.
- Uploads send what is on disk; save first. Downloads replace the local files.
- An upload first saves the open, unsaved files it covers, so the server gets what the editor shows. Downloads replace the local files.
- While a job runs, the status bar shows it with a Cancel button. One job runs at a time; uploads on save wait for the running one.
- Every file, skip and error goes to the **Deployment** log in the bottom panel (newest 1,000 lines). A failing file is logged and the job goes on; a lost connection or a refused sign-in stops it. Each error says what to do.
## Remote Host
**Tools › Deployment › Remote Host** opens the server's folders in the bottom panel (the default server; choose another in the toolbar). Paths are relative to the server's root folder; the browser never leaves it.
- Click a folder to expand it, a file to open it. Files open **read-only**; **Edit** makes the text editable and **Upload** writes it back. Files that are not text, or larger than 4 MiB, are not shown.
- **Rename** and **Delete on Server** are on each row; **New Folder** goes into the selected folder. Delete always asks first, names what goes (a folder with everything inside it), and only the red button deletes. The root folder cannot be deleted.
## Compare and sync
- **Compare with Server** on a file (project tree, or Tools › Deployment › Compare Current File with Server) opens the diff viewer: the server's copy on the left (read-only), your working copy on the right (editable as usual).
- On a folder, or **Sync Project with Server…**, Lutra lists every file that differs: only in the project, only on the server, or changed (sizes first, then contents up to 8 MiB per file; larger files of equal size count as equal). Excluded and unmapped files are left out.
- The preview selects the uploads (new and changed files). Files only on the server would be **deleted on the server**; they are never selected for you, and once you select one, Sync stays disabled until you tick "I understand that … files will be deleted on the server". Sync goes from the project to the server only; to take a server change into the project, use Download.
## For agents and scripts
The `deploy.*` engine commands (`deploy.servers`, `deploy.saveServer`, `deploy.setSecret`, `deploy.testConnection`, `deploy.trustHostKey`, `deploy.upload`, `deploy.download`, `deploy.cancel`, `deploy.log`, …) work over the control channel and MCP like every command; see `docs/architecture.md` › Deployment. Their results never contain a secret.
The `deploy.*` engine commands (`deploy.servers`, `deploy.saveServer`, `deploy.setSecret`, `deploy.testConnection`, `deploy.trustHostKey`, `deploy.upload`, `deploy.download`, `deploy.browse`, `deploy.readRemote`, `deploy.writeRemote`, `deploy.renameRemote`, `deploy.mkdirRemote`, `deploy.deleteRemote`, `deploy.compare`, `deploy.sync`, `deploy.cancel`, `deploy.log`, …) work over the control channel and MCP like every command; see `docs/architecture.md` › Deployment. Their results never contain a secret. `deploy.deleteRemote` refuses without `confirm: true`, and `deploy.sync` refuses deletions without `confirmDelete: true`: an agent must have asked the user.
## Not yet (D2)
## Not yet
A remote file browser, opening and editing remote files, compare with the server, and sync with a preview.
- Remote files open in the Remote Host viewer, not as editor tabs with highlighting.
- FTPS accepts only certificates the system trusts; servers with a self-signed certificate cannot be pinned yet.
- Linux has no keychain store yet.