Windows compatibility pass (beta target)

External editor via cmd/start + exe picker; Permissions hidden for
Windows-local (chmod only flips read-only there); Explorer/Recycle Bin
wording; Ctrl vs Cmd shortcut labels; separator-aware path joins +
drive-root detection; drives list in the panel source picker; icon.ico
+ colored tray icon; icacls ACL on connections.json; README Windows
(beta) section with upstream known issues and a smoke-test checklist.
Runtime paths pending first boot on a real Windows machine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jokin
2026-07-14 00:02:42 +02:00
co-authored by Claude Fable 5
parent d80d5c23dc
commit c7271fb7cf
23 changed files with 223 additions and 57 deletions
+17 -6
View File
@@ -48,14 +48,25 @@ export function writeFileText(
* Launch a file in an external editor.
*
* PORTABILITY: this is the only platform-specific piece of the edit feature.
* macOS delivers the file to any GUI app uniformly via `open [-a app]`.
* A Windows port should use `cmd /c start "" [app] file` and a Linux port
* `xdg-open file` (or `app file` when an editor is configured) — swap the
* spawn below and the .app picker in pickEditorApp; everything else
* (temp download, directory watch, auto-upload) is platform-neutral.
* macOS delivers the file to any GUI app via `open [-a app]`; Windows via
* `cmd /c start` (empty "" arg = window title slot); Linux via the app
* directly or `xdg-open`. Everything else (temp download, directory watch,
* auto-upload) is platform-neutral. Windows path pending first smoke test.
*/
function launchEditor(filePath: string, editorApp: string): void {
const args = editorApp ? ["open", "-a", editorApp, filePath] : ["open", filePath];
let args: string[];
switch (process.platform) {
case "darwin":
args = editorApp ? ["open", "-a", editorApp, filePath] : ["open", filePath];
break;
case "win32":
args = editorApp
? ["cmd", "/c", "start", "", editorApp, filePath]
: ["cmd", "/c", "start", "", filePath];
break;
default:
args = editorApp ? [editorApp, filePath] : ["xdg-open", filePath];
}
Bun.spawn(args, { stdout: "ignore", stderr: "ignore" });
}