Tray icon with live transfer progress and tabs menu
- AppTray: template menu-bar icon (22pt, adapts to light/dark). While transfers run it swaps to pre-rendered frames — faded arrows + a fill bar showing aggregate doneBytes/totalBytes of the queue (nearest 5%, throttled 500ms); back to the glyph when idle. No runtime image encoding. - Menu: one entry per tab (checkmark on the active one) with live per-tab transfer count and percentage (jobs mapped via session ids), an overall progress row while transferring, Show <app>, Quit. Selecting a tab activates the window and switches to it. - First use of webview->bun messages: PanelsService pushes workspacesSync (tab names, sessions, active id) via a new ready-gated send proxy; verified end-to-end in the running app. - engine.aggregateProgress(): totals + per-session breakdown over non-terminal jobs (unit-verified idle/mid-transfer/idle). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { BrowserView, Utils } from "electrobun/bun";
|
||||
import type { AppRPC } from "../shared/rpc";
|
||||
import type { AppRPC, WorkspaceSyncInfo } from "../shared/rpc";
|
||||
import { effectiveConcurrency, type Result } from "../shared/types";
|
||||
import { readFileText, writeFileText, type EditManager } from "./edits";
|
||||
import type { SessionRegistry } from "./fs/registry";
|
||||
@@ -23,6 +23,7 @@ export interface AppDeps {
|
||||
events: {
|
||||
sessionClosed: (info: { sessionId: string; reason: string }) => void;
|
||||
connectionsChanged: () => void;
|
||||
workspacesSync: (sync: WorkspaceSyncInfo) => void;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -202,6 +203,9 @@ export function createAppRPC({ registry, engine, store, settings, edits, events
|
||||
return {};
|
||||
}),
|
||||
},
|
||||
messages: {
|
||||
workspacesSync: (sync) => events.workspacesSync(sync),
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user