Skip to content

chore: update project management and API integration#42

Merged
webdevcody merged 16 commits intomainfrom
removing-electron-features-build-api
Dec 12, 2025
Merged

chore: update project management and API integration#42
webdevcody merged 16 commits intomainfrom
removing-electron-features-build-api

Conversation

@SuperComboGamer
Copy link
Collaborator

  • Added new scripts for server development and full application startup in package.json.
  • Enhanced project management by checking for existing projects to avoid duplicates.
  • Improved API integration with better error handling and connection checks in the Electron API.
  • Updated UI components to reflect changes in project and session management.
  • Refactored authentication status display to include more detailed information on methods used.

- Added new scripts for server development and full application startup in package.json.
- Enhanced project management by checking for existing projects to avoid duplicates.
- Improved API integration with better error handling and connection checks in the Electron API.
- Updated UI components to reflect changes in project and session management.
- Refactored authentication status display to include more detailed information on methods used.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @SuperComboGamer, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a fundamental architectural shift, transforming the application from an Electron-centric desktop app into a versatile platform capable of running seamlessly in both web browsers and a simplified Electron environment. This was achieved by extracting all core application logic into a new, standalone backend server that communicates via a unified HTTP/WebSocket API. The change significantly enhances deployment flexibility, improves project and session management, and provides a more robust foundation for future development, ensuring a consistent user experience regardless of the operating mode.

Highlights

  • Architectural Shift to Universal Backend: The application has undergone a significant architectural change, moving from Electron-specific Inter-Process Communication (IPC) to a universal HTTP/WebSocket backend. This enables the application to run fully in web browsers while maintaining Electron support, with Electron now spawning and connecting to a local instance of the same backend server.
  • New Backend Server (apps/server): A new apps/server package has been introduced, housing all core backend logic and services (e.g., agent interactions, file system operations, auto-mode, Git worktree management) that were previously embedded within the Electron main process. This server provides a comprehensive HTTP/WebSocket API.
  • Simplified Electron Main Process: The Electron main process (main-simplified.js) has been drastically simplified. It now primarily focuses on spawning the local backend server and creating the Electron window, delegating most application logic to the HTTP API, similar to the web client.
  • Dynamic API Client in Frontend: The frontend's API client (electron.ts and http-api-client.ts) has been refactored to dynamically adapt. It can now connect to the full Electron IPC (for native features), the simplified Electron's local HTTP server, or a remote HTTP server for web mode, ensuring a consistent API interface across all environments.
  • Enhanced Project and Session Management: Project management has been improved to prevent duplicate entries by checking for existing projects based on their path, preserving user settings. Session management in the backend now supports listing, creating, updating, archiving, and deleting sessions.
  • Detailed Authentication Status Display: The UI now provides more granular details regarding authentication methods for Claude and Codex, including detection of credentials files, environment variables, stored API keys, and subscription statuses, offering clearer insights into how API access is configured.
  • Docker Support for Backend Deployment: New Dockerfile and docker-compose.yml configurations have been added, facilitating easy containerization and deployment of the backend server for self-hosting or cloud environments.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This is a significant and well-executed architectural refactoring. The pull request introduces a standalone backend server in apps/server and refactors the Electron application to act as a thin client, communicating with the server via an HTTP/WebSocket API. This change decouples the frontend from the backend logic, enabling future web-based deployments while maintaining the Electron app.

Key changes include:

  • A new apps/server package built with Express, containing all the core services previously in the Electron main process.
  • A new HttpApiClient on the frontend (apps/app/src/lib/http-api-client.ts) that implements the same interface as the old IPC bridge, ensuring minimal changes to the UI components.
  • A simplified Electron main process (main-simplified.js) that now primarily spawns the local server and handles native OS integrations like file dialogs.
  • Improved project and session management logic to prevent duplicates and handle errors more gracefully.
  • Docker support for easy self-hosting of the new backend server.

The code is well-structured, and the inclusion of a plan.md demonstrates thoughtful planning. My review includes a couple of suggestions for improving error logging during server startup and a minor cleanup in the .gitignore file. Overall, this is an excellent pull request that greatly improves the application's architecture.

Comment on lines +93 to +95
} catch {
await new Promise((r) => setTimeout(r, 500));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This catch block is empty, which means any errors during the server health check attempts will be silently ignored. This can make it very difficult to debug startup issues. It's better to log the error to understand why a retry is happening.

    } catch (error) {
      console.error(`[Electron] Server readiness check failed on attempt ${i + 1}. Retrying...`, error.message);
      await new Promise((r) => setTimeout(r, 500));
    }

# Build outputs
dist/
.next/
node_modules
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This entry is redundant as node_modules/ is typically ignored at the root of a monorepo, which would cover this. If this is intended to be a specific rule, it's best practice to use a trailing slash (node_modules/) to ensure only directories are matched. Given the context, this line can likely be removed.

import { createEventEmitter, type EventEmitter } from "./lib/events.js";
import { initAllowedPaths } from "./lib/security.js";
import { authMiddleware, getAuthStatus } from "./lib/auth.js";
import { createFsRoutes } from "./routes/fs.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The getAuthStatus function is imported but appears to be unused in this file. It's good practice to remove unused imports to keep the code clean.

Suggested change
import { createFsRoutes } from "./routes/fs.js";
import { authMiddleware } from "./lib/auth.js";

webdevcody and others added 15 commits December 12, 2025 02:14
- Removed unused Electron API methods and simplified the main process.
- Introduced a new workspace picker modal for improved project selection.
- Enhanced error handling for authentication issues across various components.
- Updated UI styles for dark mode support and added new CSS variables.
- Refactored session management to utilize a centralized API access method.
- Added server routes for workspace management, including directory listing and configuration checks.
…ed accessibility

- Relocated the button from the bottom sidebar to the header next to the AutoMaker logo.
- Updated the button to be a compact icon-only version with a tooltip on hover.
- Adjusted the header layout to accommodate the new button placement.
- Removed the old button from the sidebar to streamline the UI.
- Deleted the "Agent Tools" navigation item from the sidebar.
- Updated keyboard shortcuts and app store types to reflect the removal.
- Cleaned up imports and references in relevant files.
- Retained the `agent-tools-view.tsx` component for potential future use.
…ment

- Added .automaker/images/ to .gitignore to prevent tracking of generated images.
- Deleted obsolete agent-output.md and feature.json files related to removed "Agent Tools" feature.
- Introduced a new script for uploading build artifacts to R2 and updating releases.json.
- Enhanced GitHub Actions workflow to include artifact uploads for different platforms.
… selection

- Replaced prompt-based directory input with a web-based directory picker in HttpApiClient.
- Added server endpoint for resolving directory paths based on directory name and file structure.
- Enhanced error handling and logging for directory and file selection processes.
- Updated file picker to validate file existence with the server for better user feedback.
- Introduced a new FileBrowserProvider to manage file browsing state and functionality.
- Added FileBrowserDialog component for user interface to navigate and select directories.
- Updated Home component to utilize the file browser context and provide global access.
- Enhanced HttpApiClient to use the new file browser for directory and file selection.
- Implemented server-side route for browsing directories, including drive detection on Windows.
…handling

- Introduced errorType property to the AutoModeActivity interface to categorize errors as "authentication" or "execution".
- This addition improves the granularity of error reporting and handling within the application.
- Updated the build command for Electron to ensure it correctly references the workspace for the app.
- This change improves the build process and resolves potential issues with workspace management.
- Updated CoursePromoBadge to accept a sidebarOpen prop, allowing it to render differently based on the sidebar's state.
- Implemented tooltip functionality for the collapsed state, improving user interaction and accessibility.
- Adjusted styles and structure to support both expanded and collapsed views of the badge.
- Added .automaker/ to .gitignore to prevent tracking of the entire directory.
- Deleted outdated files including app_spec.txt, categories.json, memory.md, clean-code.md, and gemini.md from the .automaker context.
- Enhanced the mcp-server-factory.js and spec-regeneration-service.js to enforce status management for new features, ensuring they default to "backlog" and clarifying status handling in comments.
- Introduced a new file browsing endpoint in fs.ts to improve directory navigation while maintaining security constraints.
Resolved conflict in http-api-client.ts by adopting the server-side
file browser dialog approach from fs/ui branch.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex added the Refactor A complete logic rewrite is requested or being performed for an issue. label Dec 12, 2025
@webdevcody webdevcody merged commit 7791801 into main Dec 12, 2025
1 check passed
@Shironex Shironex deleted the removing-electron-features-build-api branch December 13, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor A complete logic rewrite is requested or being performed for an issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants