Skip to content

Conversation

@aminghadersohi
Copy link
Contributor

Summary

  • Add Electron-based desktop application for macOS
  • Custom URL support for connecting to local or remote Agor instances
  • macOS-native title bar with traffic lights (VS Code-like appearance)
  • Draggable header region for window movement
  • Skip local daemon startup when custom URL is configured
  • Graceful error handling when daemon unavailable

Features

  • Change UI URL menu item in Agor menu for connecting to different backends
  • Dark theme matching Agor UI
  • Configurable via Agor > Change UI URL... menu
  • Persists URL configuration across sessions

Technical Changes

  • Simplified Electron Forge config for macOS-only distribution
  • Disabled ASAR packaging to work with pnpm symlinks
  • Removed Windows-only electron-squirrel-startup
  • Added app icon for dock and DMG

Build

cd apps/agor-desktop
pnpm package  # Creates .app
# Then create DMG:
cd out && hdiutil create -volname "Agor" -srcfolder Agor-darwin-arm64/Agor.app -ov -format UDZO Agor-arm64.dmg

Test plan

  • App launches and shows window
  • Can change UI URL via menu
  • Custom URL persists after restart
  • Window draggable via header
  • App quits properly (dock icon removed)
  • Test with remote Agor URL
  • Test with local dev servers

aminghadersohi and others added 2 commits December 3, 2025 18:17
Implements Phase 1 of PROJECT.md - Foundation for native Mac application.

Architecture (inspired by VS Code):
- Main process: Manages daemon lifecycle and system integration
- Daemon process: Node.js backend (spawned as child process)
- Renderer process: React UI (served by daemon)
- Menu bar tray: Quick access and controls

Key Components:
- DaemonManager: Spawns/monitors daemon with health checks
- TrayManager: Menu bar icon with status and controls
- Main process: Electron app lifecycle orchestration

Development workflow:
1. Terminal 1: cd apps/agor-daemon && pnpm dev
2. Terminal 2: cd apps/agor-ui && pnpm dev
3. Terminal 3: cd apps/agor-desktop && pnpm dev

This wraps the existing daemon + UI code without major rewrites,
following the exact same pattern as VS Code and Atom.

Next steps (see PROJECT.md):
- Phase 2: Packaging & distribution (DMG, code signing)
- Phase 3: Auto-updater via GitHub releases
- Phase 4: Enhanced features (notifications, deep links)

Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Add "Change UI URL" menu item for connecting to remote Agor instances
- macOS-native title bar with traffic lights (hiddenInset style)
- Draggable header region like VS Code
- Skip local daemon startup when custom URL is configured
- Graceful error handling when daemon unavailable in packaged mode
- Fix pnpm compatibility for Electron Forge packaging
- Add app icon for dock and DMG
- Remove electron-squirrel-startup (Windows-only)
- Simplify forge config for macOS-only distribution
- Start local daemon only for localhost/local IP URLs
- Skip daemon startup for remote URLs (e.g., https://agor.preset.io)
- Daemon manager detects if already running before spawning
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.

2 participants