feat(FN-1072): add Electron desktop renderer integration

- Add Electron main-process IPC handlers and preload bridges for API proxying, window controls, update install, and platform lookup
- Introduce a desktop renderer entrypoint with DesktopWrapper and a custom frameless TitleBar component
- Add Electron-aware renderer utilities including API transport selection and hooks for runtime detection, auto-update events, and deep links
- Update dashboard header behavior for Electron mode and expand desktop tests across preload, transport, hooks, and title bar flows
- Document the desktop renderer architecture and update desktop package config/dependencies
This commit is contained in:
gsxdsm
2026-04-08 00:16:25 -07:00
parent 8c5b5e128c
commit a4a99f31b0
27 changed files with 1325 additions and 28 deletions

View File

@@ -59,6 +59,7 @@ export interface HeaderProps {
onSelectProject?: (project: ProjectInfo) => void;
onViewAllProjects?: () => void;
projectId?: string;
isElectron?: boolean;
}
type ViewportMode = "mobile" | "tablet" | "desktop";
@@ -133,6 +134,7 @@ export function Header({
onSelectProject,
onViewAllProjects,
projectId,
isElectron = false,
}: HeaderProps) {
const mode = useViewportMode();
const isMobile = mode === "mobile";
@@ -443,7 +445,7 @@ export function Header({
)}
{/* Desktop actions */}
{!isCompact && (
{!isCompact && !isElectron && (
<button className="btn-icon" onClick={onOpenGitHubImport} title="Import from GitHub">
<GitHubLogo size={16} />
</button>
@@ -674,14 +676,16 @@ export function Header({
<span>Nodes</span>
</button>
)}
<button
className="mobile-overflow-item"
onClick={() => handleOverflowAction(onOpenGitHubImport)}
role="menuitem"
>
<GitHubLogo size={16} />
<span>Import from GitHub</span>
</button>
{!isElectron && (
<button
className="mobile-overflow-item"
onClick={() => handleOverflowAction(onOpenGitHubImport)}
role="menuitem"
>
<GitHubLogo size={16} />
<span>Import from GitHub</span>
</button>
)}
<div
className="mobile-overflow-group"
data-testid="overflow-terminal-group"