feat: Electron screen share picker, instance selector, and system audio loopback

- Custom screen share picker for Electron (ScreenSharePicker.tsx) with
  Aether Drift design: glass-bubble footer, adaptive grid, pill tabs,
  border-based selection (avoids overflow clipping), hover brightness
- Instance URL picker so Electron connects to any Backspace server
- System audio loopback on Windows/Linux via desktopCapturer callback
- macOS: video-only callback (OS blocks system audio capture)
- IPC bridge for screen source enumeration and selection
- Purge stale service worker caches on Electron launch
This commit is contained in:
Jannis Braun
2026-03-16 03:50:07 +01:00
parent 8ae3ffc912
commit 95ec3ff952
20 changed files with 1042 additions and 95 deletions
+17
View File
@@ -1,5 +1,13 @@
/** Type augmentation for the Electron IPC bridge exposed by preload.ts */
interface ElectronScreenSource {
id: string; // "screen:0:0" or "window:12345:0"
name: string; // "Entire Screen" or "Firefox"
thumbnailDataUrl: string; // PNG data URL at 320×180
appIconDataUrl: string | null; // App icon (windows only)
isScreen: boolean; // true = display, false = window
}
interface BackspaceElectronAPI {
// Platform info
platform: NodeJS.Platform;
@@ -25,6 +33,15 @@ interface BackspaceElectronAPI {
// Deep linking (Task 2.3)
onDeepLink: (callback: (url: string) => void) => void;
// Screen share picker coordination
onScreenShareSources: (callback: (sources: ElectronScreenSource[]) => void) => void;
selectScreenSource: (sourceId: string | null) => void;
// Instance URL management
getInstanceUrl: () => Promise<string | null>;
setInstanceUrl: (url: string) => Promise<void>;
clearInstanceUrl: () => Promise<void>;
}
interface Window {