fix(sync): harden detached launch, bounded --check probes, and pipe-clos

- `sync --ui` now launches detached; closing standalone Sync window exits app
- `--check` uses BatchMode + ConnectTimeout + 15s timeoutMs on all SSH calls
- `runSyncLauncher` settles on `exit` (not just `close`) for Electron pipe inheritance
- Added `timeoutMs` to `runSyncLauncher`; check-host passes 30s deadline
- `handleSyncCliAtEntry` wraps exit deps for testability; fixes Linux AppImage GUI fallthrough
- `config-settings-window` gains optional `onClosed` hook
- Added preload-syncui bundle to `build:syncui` script
This commit is contained in:
2026-07-12 19:42:34 -07:00
parent a4c12165af
commit 5d8673f299
20 changed files with 246 additions and 68 deletions
+8 -4
View File
@@ -1,14 +1,17 @@
import {
launchAppCommandDetached,
launchAppBackgroundDetached,
launchTexthookerOnly,
runAppCommandInteractive,
runAppCommandWithInherit,
} from '../mpv.js';
import type { LauncherCommandContext } from './context.js';
type AppCommandDeps = {
runAppCommandWithInherit: (appPath: string, appArgs: string[]) => void;
runAppCommandInteractive: (appPath: string, appArgs: string[]) => void;
launchSyncUiDetached: (
appPath: string,
logLevel: LauncherCommandContext['args']['logLevel'],
) => void;
launchAppBackgroundDetached: (
appPath: string,
logLevel: LauncherCommandContext['args']['logLevel'],
@@ -17,7 +20,8 @@ type AppCommandDeps = {
const defaultAppCommandDeps: AppCommandDeps = {
runAppCommandWithInherit,
runAppCommandInteractive,
launchSyncUiDetached: (appPath, logLevel) =>
launchAppCommandDetached(appPath, ['--sync-window'], logLevel, 'sync-ui'),
launchAppBackgroundDetached,
};
@@ -34,7 +38,7 @@ export function runAppPassthroughCommand(
return true;
}
if (args.syncUi) {
deps.runAppCommandInteractive(appPath, ['--sync-window']);
deps.launchSyncUiDetached(appPath, args.logLevel);
return true;
}
if (!args.appPassthrough) {