Skip to content

feat(frontend): rebuild Electron desktop UI as a React + Vite renderer#167

Closed
yyovil wants to merge 9 commits into
aoagents:mainfrom
yyovil:feat/electron-renderer-clean
Closed

feat(frontend): rebuild Electron desktop UI as a React + Vite renderer#167
yyovil wants to merge 9 commits into
aoagents:mainfrom
yyovil:feat/electron-renderer-clean

Conversation

@yyovil

@yyovil yyovil commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

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-ci PR (#166).

Stack

Layer Choice
Shell Electron + child_process daemon supervision
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
Layout react-resizable-panels, sizes persisted to Zustand
Terminal @xterm/xterm per-session PTY over /mux WebSocket + WebGL addon
UI state Zustand
Testing Vitest + RTL · Playwright

Backend additions

  • cors.go — allowlist-only CORS middleware, never * or null, handles Private Network Access preflight for file:// → loopback
  • session.TerminalHandleID exposed in domain + OpenAPI spec
  • project.Path added to OpenAPI spec, service, store, and tests
  • CORS origin config threaded through config.go

Design

DESIGN.md added 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)

Credit

All implementation by @ashish921998 — this PR is just a clean split of his work.

🤖 Generated with Claude Code

yyovil and others added 4 commits June 4, 2026 02:25
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

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@yyovil

yyovil commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

Moving this to the fork (yyovil#1) — keeping the renderer work in yyovil's tree rather than targeting aoagents. Closing here.

@yyovil yyovil closed this Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant