P3: transfer engine with queue, progress, cancel + transfer bar UI

- TransferEngine: FIFO queue, provider-generic stream pipeline (covers all four
  panel combos), throttled transferUpdate push, cancel via stream destroy,
  self-copy guards, failSession hook for dead SSH sessions
- TransfersService + TransferBar: per-job rows, progress bars, cancel/dismiss,
  auto-dismiss completed, dst panel refresh
- F5 + Copy button wired to active-panel selection
- verified: 30MB nested tree copy (UTF-8 names, empty dirs), self-copy rejection,
  mid-transfer cancel leaving partial file

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jokin
2026-07-11 13:46:34 +02:00
co-authored by Claude Fable 5
parent b907e0a4ce
commit 88af44acfc
9 changed files with 455 additions and 7 deletions
+5 -1
View File
@@ -2,6 +2,7 @@ import { BrowserWindow, Updater } from "electrobun/bun";
import { BRANDING } from "../shared/branding";
import { SessionRegistry } from "./fs/registry";
import { createAppRPC } from "./rpc-handlers";
import { TransferEngine } from "./transfers/engine";
const PROD_URL = "views://app/index.html";
@@ -24,7 +25,8 @@ async function getMainViewUrl(): Promise<string> {
}
const registry = new SessionRegistry();
const rpc = createAppRPC(registry);
const engine = new TransferEngine(registry);
const rpc = createAppRPC(registry, engine);
const url = await getMainViewUrl();
new BrowserWindow({
@@ -39,4 +41,6 @@ new BrowserWindow({
rpc,
});
engine.onUpdate = (snapshot) => rpc.send.transferUpdate(snapshot);
console.log(`${BRANDING.appName} started (${url})`);