Skip to content

feat(desktop): Fleet Sync — push a path from one host to many at once - #50

Merged
ralyodio merged 1 commit into
mainfrom
feat/fleet-sync
Sep 26, 2026
Merged

ralyodio merged 1 commit into
mainfrom
feat/fleet-sync

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

A new Fleet Sync tab in the desktop app: pick a source (a server or this machine) + a path, tick the destination servers, and it syncs that path out to all of them at once — e.g. a directory on dev1 → the other 7 servers.

How

Pure orchestration over the existing transfer engine — one transfer per destination (server-to-server when the source is remote, local-to-remote when it's this machine), run with bounded concurrency, each streaming its rsync progress on a per-connection channel. buildPlan/runPlan are reused wholesale; no new transfer logic.

  • contract: fleet:sync + fleet:sync-cancel, event:fleet-sync, FleetSyncRequestSchema (source EndpointRef, destinationConnectionIds, destinationPath, options, concurrency). delete is intentionally not exposed — a pruning mirror is a per-host previewed decision, not a fan-out default.
  • main: services/fleet-sync.ts (startFleetSync/cancelFleetSync); a worker pool drains the destination queue and a per-destination failure never takes the fan-out down.
  • preload: fleet.sync / fleet.cancelSync / events.onFleetSync.
  • renderer: self-contained FleetSyncPanel (source + path, destination checklist, dest path, per-destination progress rows) on its own tab; the existing FleetView is untouched.

Tests

fleet-sync.test.ts — schema validation + orchestration (one transfer per dest, per-connection begin/exit events, a done marker), with buildPlan/runPlan stubbed. Desktop suite 165 pass; renderer + electron typecheck clean.

Note

The backend is fully tested; the UI is typecheck-verified, not yet visually verified in a running app — worth a quick look after merge.

🤖 Generated with Claude Code

…at once

Adds a "Fleet Sync" tab: pick a source (a server or this machine) + a path,
tick destination servers, and it syncs that path out to all of them at once —
e.g. a dir on dev1 to the other 7 servers.

It is pure orchestration over the existing transfer engine: one transfer per
destination (server-to-server when the source is remote, local-to-remote when
it is this machine), run with bounded concurrency, each streaming its rsync
progress on a per-connection channel. No new transfer logic — buildPlan/runPlan
are reused wholesale.

- contract: `fleet:sync` + `fleet:sync-cancel` channels, `event:fleet-sync`,
  `FleetSyncRequestSchema` (source EndpointRef, destinationConnectionIds,
  destinationPath, options, concurrency). `delete` is intentionally not exposed
  — a pruning mirror is a per-host previewed decision, not a fan-out default.
- main: `services/fleet-sync.ts` `startFleetSync`/`cancelFleetSync`; a worker
  pool drains the destination queue, a per-destination failure never takes the
  fan-out down. `buildPlan` is exported from transfers.ts for reuse.
- preload: `fleet.sync` / `fleet.cancelSync` / `events.onFleetSync`.
- renderer: self-contained `FleetSyncPanel` (source + path, destination
  checklist, dest path, per-destination progress rows) on a new tab; the
  existing FleetView is untouched.

Tests: fleet-sync.test.ts (schema validation + orchestration: one transfer per
dest, per-connection begin/exit events, a done marker), with buildPlan/runPlan
stubbed. Desktop suite 165 pass; renderer + electron typecheck clean.

The UI is typecheck-verified, not yet visually verified in a running app.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 128c599 into main Sep 26, 2026
4 checks passed
@ralyodio
ralyodio deleted the feat/fleet-sync branch September 26, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant