Skip to content

Fixes electron app packaging and startup issues#5

Merged
newbe36524 merged 1 commit intomainfrom
fix/buildpathissue
Feb 7, 2026
Merged

Fixes electron app packaging and startup issues#5
newbe36524 merged 1 commit intomainfrom
fix/buildpathissue

Conversation

@newbe36524
Copy link
Contributor

@newbe36524 newbe36524 commented Feb 7, 2026

Addresses issues that prevented the packaged Electron application from starting correctly.

  • Prevents the DevTools from opening automatically in production builds, enhancing the user experience.
  • Corrects the loading path for the renderer process, ensuring the application interface loads properly from the asar archive.
  • Maximizes the application window on startup and allows to open hagicode url in app.

Summary by CodeRabbit

  • New Features

    • Added an animated startup loading screen that displays while the app initializes, replacing the initial blank screen.
    • App window now launches in a maximized state by default.
  • Bug Fixes

    • Fixed unwanted DevTools opening in production builds.
    • Resolved rendering issues when running from the packaged application.

Addresses issues that prevented the packaged Electron application from starting correctly.

- Prevents the DevTools from opening automatically in production builds, enhancing the user experience.
- Corrects the loading path for the renderer process, ensuring the application interface loads properly from the asar archive.
- Maximizes the application window on startup and allows to open hagicode url in app.
@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR implements a startup loading screen, maximizes the Electron app window on startup, adds an IPC handler for opening Hagicode URLs within the app, and disables DevTools in production. Changes include UI additions, window lifecycle modifications, preload API expansion, and comprehensive design documentation.

Changes

Cohort / File(s) Summary
Loading Screen UI
src/renderer/index.html, src/renderer/main.tsx
Adds inline CSS-based loading container with branding and spinner animation; removes container from DOM after React mounts.
Window Startup Behavior
src/main/main.ts
Removes fixed window dimensions, maximizes window on ready-to-show, disables DevTools in production, updates production path resolution for renderer loading.
In-App URL Opening
src/main/main.ts, src/preload/index.ts, src/renderer/components/WebServiceStatusCard.tsx
Adds IPC handler open-hagicode-in-app, exposes openHagicodeInApp() API in preload, updates WebServiceStatusCard to use new API instead of window.open().
Design & Specification Documents
openspec/changes/archive/2026-02-07-*/*, openspec/specs/electron-app/spec.md
Introduces design docs, proposals, specifications, and implementation tasks for loading screen, window maximization, and packaging/production fixes; updates main spec with new window and DevTools requirements.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser as Browser<br/>(index.html)
    participant CSS as CSS Engine
    participant React as React App
    participant DOM as DOM

    User->>Browser: Launch App
    Note over Browser: loading-container exists
    Browser->>CSS: Apply inline styles
    CSS->>DOM: Render loading screen
    DOM-->>Browser: Display spinner & text
    Browser->>React: Mount to `#root`
    React->>React: Initialize & render
    React-->>DOM: Main UI ready
    Browser->>DOM: Remove loading-container
    DOM-->>User: Show main application
Loading
sequenceDiagram
    participant Renderer as Renderer Process
    participant IPC as IPC Bridge
    participant MainProcess as Main Process
    participant Window as BrowserWindow
    participant URL as Remote URL

    Renderer->>Renderer: User clicks open Hagicode
    Renderer->>IPC: invoke('open-hagicode-in-app', url)
    IPC->>MainProcess: Handle IPC event
    MainProcess->>Window: Create new window (hidden)
    MainProcess->>Window: Setup ready-to-show listener
    MainProcess->>URL: loadURL(url)
    URL-->>Window: Content loaded
    Window->>MainProcess: ready-to-show event
    MainProcess->>Window: maximize()
    MainProcess->>Window: show()
    Window-->>Renderer: Success
    Renderer->>Renderer: URL opened in-app
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • add basic framework #1 — Both PRs modify the Electron app scaffold (src/main/main.ts, src/preload/index.ts, src/renderer/index.html/main.tsx) and extend the IPC surface and window initialization logic.
  • mvp version #3 — The main PR's updates to WebServiceStatusCard.tsx complement this PR's new preload API and IPC handler for in-app URL opening.

Poem

🐰 Startup sparkles with a loading glow,
Windows maximize before the show,
Hagicode whispers through the IPC lane,
Production thrives DevTools-free and sane, 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/buildpathissue

Comment @coderabbitai help to get the list of available commands and usage tips.

@newbe36524 newbe36524 merged commit b0bd9af into main Feb 7, 2026
1 of 2 checks passed
@newbe36524 newbe36524 deleted the fix/buildpathissue branch February 7, 2026 10:47
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