feat(frontend): rebuild Electron desktop UI as a React + Vite renderer#167
feat(frontend): rebuild Electron desktop UI as a React + Vite renderer#167yyovil wants to merge 9 commits into
Conversation
Entire-Checkpoint: b0282cbdd0ee
Full renderer rewrite by @ashish921998 in aoagents#156, extracted without the Prettier mass-reformat and husky/lint-staged tooling (those land separately in the chore/prettier-ci PR). Stack: - Shell: Electron + child_process daemon supervision with stale-handle guard - UI: React 19 + TypeScript renderer (Vite, contextBridge preload) - Data: TanStack Query + EventTransport (CDC SSE on /api/v1/events) - API types: openapi-typescript + openapi-fetch off openapi.yaml - Styling: Tailwind + shadcn/ui (Badge, Tabs, Button, Input, Tooltip) - Layout: react-resizable-panels, sizes persisted to Zustand - Terminal: @xterm/xterm per-session PTY over /mux WebSocket + WebGL addon - UI state: Zustand (selection, active pane, theme, layout sizes) - Testing: Vitest + RTL + Playwright Backend additions: - CORS middleware (cors.go) — allowlist-only, never * or null, handles Private Network Access preflight for file:// → loopback requests - session.TerminalHandleID field exposed in domain + OpenAPI spec - project.Path field added to OpenAPI spec + service/store/tests - CORS origin config wired through config.go Design: DESIGN.md added as source of truth for the emdash-matched dark UI. Co-Authored-By: Ashish Huddar <ashish921998@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Entire-Checkpoint: 9fd9e7f48ec8
There was a problem hiding this comment.
yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Entire-Checkpoint: a14c9f9aec7b
There was a problem hiding this comment.
yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Replace vite-plugin-electron + electron-builder with electron-forge's blessed Vite template. Split vite.config.ts into three configs (main/preload/renderer), add forge.config.ts with 4 makers and publisher-github, update main.ts to use forge-injected globals and update-electron-app, and update the release workflow to use `electron-forge publish`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
- Replace code-based route tree with file-system routing via @tanstack/router-plugin - createAppRouter() factory injects QueryClient into router context for loaders - createHashHistory() preserved for Electron file:// renderer origin - Routes: __root.tsx, index.tsx, workspaces.$workspaceId.tsx, workspaces.$workspaceId_.sessions.$sessionId.tsx - TanStackRouterVite plugin wired into vite.renderer.config.ts (before react plugin) - defaultPreload: 'intent', defaultPreloadStaleTime: 0, scrollRestoration: true - declare module Register moved to main.tsx alongside router instantiation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Entire-Checkpoint: 64aa08569fed
There was a problem hiding this comment.
yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
__root.tsx already wraps every route in TooltipProvider. All routes render <App>, so every render was double-nesting the provider. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Entire-Checkpoint: f466c24a4356
There was a problem hiding this comment.
yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
The migration to electron-forge made the release doc stale: - electron-builder → electron-forge (npm run publish) - electron-updater → update-electron-app (reads Releases API, no latest-mac.yml feed files) - package.json build.publish → forge.config.ts publishers - "identity": null removal → osxSign/osxNotarize already gated on CSC_LINK/APPLE_ID env vars Also fix the now-stale initAutoUpdates() comment in main.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Entire-Checkpoint: a93e60c1314e
There was a problem hiding this comment.
yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Moving this to the fork (yyovil#1) — keeping the renderer work in yyovil's tree rather than targeting aoagents. Closing here. |
What
Clean extraction of @ashish921998's renderer work from #156, without the Prettier mass-reformat and husky/lint-staged tooling that made that PR hard to review. Those land separately in the
chore/prettier-ciPR (#166).Stack
/api/v1/eventsopenapi.yaml/muxWebSocket + WebGL addonBackend additions
cors.go— allowlist-only CORS middleware, never*ornull, handles Private Network Access preflight forfile://→ loopbacksession.TerminalHandleIDexposed in domain + OpenAPI specproject.Pathadded to OpenAPI spec, service, store, and testsconfig.goDesign
DESIGN.mdadded as the source of truth for the emdash-matched dark UI (emdash tokens, blue accent, status glyph spec, orchestrator-led layout).What's not here (vs #156)
.prettierrc/.lintstagedrc/.husky— see chore: add prettier config and CI auto-formatter #166Credit
All implementation by @ashish921998 — this PR is just a clean split of his work.
🤖 Generated with Claude Code