Skip to content

Conversation

dnviti
Copy link

@dnviti dnviti commented Sep 11, 2025

🎯 Add Electron Desktop Application Support

Summary

This PR introduces full Electron support to Claude Code UI, transforming it from a web-only application into a cross-platform desktop application that can be distributed as native binaries for Linux, macOS, and Windows.

What's Changed

  • Electron Integration: Added complete Electron wrapper (electron.js) with proper server lifecycle management
  • 📦 Cross-Platform Builds: Configured electron-builder for creating native distributables:
    • Windows (.exe installer)
    • macOS (.dmg)
    • Linux (AppImage, deb, rpm)
  • 🏗️ Build Automation: Added GitHub Actions workflow for automated releases
  • 🐧 Flatpak Support: Added Flatpak manifest and build instructions for Linux distribution
  • 🎨 Native Icons: Added platform-specific icons (.ico, .icns, .png) for proper OS integration
  • 📝 Documentation: Added comprehensive setup guide (ELECTRON_SETUP.md) and Flatpak build instructions

Technical Details

  • New Dependencies: electron, electron-builder, and related build tools
  • Build Scripts: Added Makefile with targets for development and production builds
  • Database Improvements: Enhanced SQLite initialization for better Electron compatibility
  • Package Structure: Reorganized package.json to support both web and desktop builds

Testing

  • ✅ Built and tested on Linux and Windows
  • ❎ NOT tested in macOS (because i don't have a mac computer)
  • ✅ Verified auto-update functionality
  • ✅ Tested server lifecycle management (startup/shutdown)
  • ✅ Validated Flatpak packaging on Linux

Breaking Changes

None - The web version continues to work as before. Electron support is additive.

Checklist

  • Code follows project conventions
  • Added appropriate documentation
  • Tested on all target platforms
  • Updated README with installation instructions
  • Added CI/CD pipeline for automated releases

Screenshots

The application now runs as a native desktop app with system tray integration and native menus
2025-09-11_11-03


@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 09:04
@dnviti dnviti changed the title Added Electron support, build for linux, mac and windows feat: Added Electron support, build for linux, mac and windows Sep 11, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces comprehensive Electron desktop application support to Claude Code UI, transforming it from a web-only application into a cross-platform native desktop app with automated build and distribution capabilities.

  • Adds complete Electron wrapper with proper server lifecycle management and native desktop integration
  • Implements cross-platform build system for Linux, Windows, and macOS with multiple distribution formats
  • Includes Flatpak support with comprehensive manifest and GitHub Actions CI/CD pipeline

Reviewed Changes

Copilot reviewed 12 out of 20 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
server/database/db.js Enhanced SQLite path handling for packaged applications using user config directory
package.json Complete Electron configuration with build scripts, metadata, and cross-platform distribution settings
electron.js Main Electron process managing app lifecycle, window creation, and server startup
Makefile Comprehensive build automation system with targets for all platforms and package formats
flatpak/ Complete Flatpak packaging with manifest, desktop integration, and metadata
.github/workflows/release.yml Automated CI/CD pipeline for building and releasing all platform packages
README.md Updated documentation with Electron installation and build instructions
ELECTRON_SETUP.md Detailed Electron setup and troubleshooting guide

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@viper151
Copy link
Contributor

@dnviti @dviti-vargroup would you be able to resolve the conflicts here?

@dnviti
Copy link
Author

dnviti commented Sep 23, 2025

Sadly i don't have much time right now, i will try to check those conflicts when i'll less busy.

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.

3 participants