Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Built an Electron-based macOS desktop application that wraps lovable.dev with enhanced visual design, native platform integration, and automated CI/CD pipelines.

Implementation

Core Application

  • Electron main process with webview integration for lovable.dev
  • Context isolation and CSP for security (sandbox disabled for webview requirement)
  • Hidden inset title bar with draggable navigation region for native macOS feel

Enhanced UI Components

  • Animated loading screen with gradient logo, pulse effects, and staggered dot spinner
  • Navigation bar with back/forward/refresh/home controls and glassmorphism backdrop
  • Status bar with animated connection indicator
  • Purple-to-pink gradient theme (#8B5CF6 → #EC4899) on dark navy background

Build Configuration

  • Electron Builder targeting Intel x64 architecture
  • App bundle and DMG installer build scripts
  • Icon assets and proper macOS categorization

CI/CD Workflows

  • Build and Release workflow: Automatically builds the app on every push and creates GitHub releases when version tags are pushed
  • CI workflow: Validates code quality, JavaScript syntax, package.json format, and project structure on all pushes and pull requests
  • Workflows run on macOS latest with Node.js 20
  • Build artifacts (.app, .dmg, .zip) available for download with 7-day retention

Key Technical Decisions

Webview over BrowserView: Enables full navigation control and simpler state management
Inline scripts: Required for webview event handlers; CSP relaxed for local content only
Backdrop filter with fallbacks: Enhanced glassmorphism for macOS with solid color fallback

// Navigation integration with webview
webview.addEventListener('did-navigate', () => {
  backBtn.disabled = !webview.canGoBack();
  forwardBtn.disabled = !webview.canGoForward();
});

Documentation

  • README: Installation and build instructions with CI badges
  • QUICK_START: User guide with troubleshooting
  • UI_DESIGN: Complete design system specifications
  • VISUAL_PREVIEW: Mockups and visual descriptions
  • .github/workflows/README.md: Workflow documentation and usage instructions

Creating Releases

git tag v1.0.0
git push origin v1.0.0

The release workflow will automatically build and publish the app with auto-generated release notes.

Original prompt

Simply create Intel mac app and just this url https://lovable.dev/

And enhance ui like original


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Note

Adds a native Electron macOS app that wraps https://lovable.dev/, plus packaging and automation.

  • Core app: main.js, index.html, styles.css, preload.js with webview navigation (back/forward/refresh/home), loading screen, status bar, CSP, and context isolation (sandbox off for webviewTag)
  • Packaging: package.json with electron-builder config (Mac x64), build scripts (build, build-dmg), and assets (assets/icon.svg)
  • CI/CD: GitHub Actions workflows build.yml (build artifacts, tag-based releases) and ci.yml (syntax/structure/style checks); docs at .github/workflows/README.md
  • Repo updates: README.md, QUICK_START.md, UI_DESIGN.md, VISUAL_PREVIEW.md, and .gitignore for Node/Electron/build outputs

Written by Cursor Bugbot for commit 8441c95. Configure here.

Copilot AI changed the title [WIP] Create Intel Mac app for lovable.dev Create native Intel Mac app for Lovable.dev with enhanced UI Dec 30, 2025
@sumitduster-iMac
Copy link
Owner

@copilot Create workflow

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot Create workflow

Created GitHub Actions workflows in commit 8441c95:

Build and Release (.github/workflows/build.yml)

  • Builds the app on pushes to main/copilot branches
  • Creates GitHub releases when version tags are pushed
  • Uploads artifacts (.app, .dmg, .zip files)
  • Runs on macOS latest with Node.js 20

CI (.github/workflows/ci.yml)

  • Validates JavaScript syntax (main.js, preload.js)
  • Checks package.json format
  • Verifies project structure and required files
  • Validates HTML/CSS features
  • Runs on every push and pull request

To create a release:

git tag v1.0.0
git push origin v1.0.0

See .github/workflows/README.md for full documentation.

Copilot AI changed the title Create native Intel Mac app for Lovable.dev with enhanced UI Create native Intel Mac app for Lovable.dev with enhanced UI and CI/CD Dec 30, 2025
@sumitduster-iMac sumitduster-iMac marked this pull request as ready for review December 30, 2025 04:02
Copilot AI review requested due to automatic review settings December 30, 2025 04:02
@sumitduster-iMac sumitduster-iMac merged commit f7bcf92 into main Dec 30, 2025
3 of 7 checks passed
}
],
"category": "public.app-category.developer-tools",
"icon": "assets/icon.png"
Copy link

Choose a reason for hiding this comment

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

Build references missing icon.png file

The electron-builder configuration specifies "icon": "assets/icon.png" but only assets/icon.svg exists in the repository. This mismatch will cause the macOS build to fail or produce an application bundle without the intended custom icon. The CI/CD workflow that runs npm run build and npm run build-dmg will be affected.

Fix in Cursor Fix in Web

return { action: 'deny' };
}
return { action: 'allow' };
});
Copy link

Choose a reason for hiding this comment

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

External link handler doesn't apply to webview content

The setWindowOpenHandler is set on mainWindow.webContents, but the lovable.dev content is loaded inside a <webview> tag which has its own separate webContents. Links with target="_blank" or window.open() calls from within the webview will not trigger this handler. The webview needs its own new-window event listener in index.html to properly open external links in the default browser.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link

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 creates a native Intel Mac desktop application for Lovable.dev using Electron, featuring an enhanced UI with modern design elements, animations, and automated CI/CD workflows for building and releasing the application.

Key Changes:

  • Electron-based desktop application with webview integration for lovable.dev
  • Enhanced UI featuring gradient themes, glassmorphism effects, animated loading screen, and custom navigation controls
  • Automated GitHub Actions workflows for continuous integration and release management

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
main.js Electron main process setup with window configuration and webview support
preload.js Context bridge for secure renderer process communication
index.html Main application UI with navigation bar, webview, status bar, and loading screen
styles.css Complete styling with animations, gradients, and glassmorphism effects
package.json Project configuration with Electron dependencies and build scripts
assets/icon.svg SVG application icon with gradient design
assets/icon.png PNG application icon (appears incomplete/placeholder)
README.md Main documentation with installation, build, and feature descriptions
QUICK_START.md User guide with step-by-step instructions and troubleshooting
UI_DESIGN.md Detailed design system specifications and component documentation
VISUAL_PREVIEW.md Visual mockups and descriptions of the application interface
.gitignore Git ignore patterns for dependencies and build artifacts
.github/workflows/build.yml CI/CD workflow for building and releasing the application
.github/workflows/ci.yml Validation workflow for code quality and structure checks
.github/workflows/README.md Documentation for GitHub Actions workflows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +95 to +99
Add these to your README.md:

```markdown
![Build](https://github.com/sumitduster-iMac/Lovable/workflows/Build%20and%20Release/badge.svg)
![CI](https://github.com/sumitduster-iMac/Lovable/workflows/CI/badge.svg)
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The example badge URLs contain 'sumitduster-iMac' which appears to be a personal machine identifier. These should be updated to reflect the actual repository owner's GitHub username or organization name for the badges to work correctly.

Suggested change
Add these to your README.md:
```markdown
![Build](https://github.com/sumitduster-iMac/Lovable/workflows/Build%20and%20Release/badge.svg)
![CI](https://github.com/sumitduster-iMac/Lovable/workflows/CI/badge.svg)
Add these to your README.md (replace `<OWNER>` and `<REPO>` with your GitHub username/organization and repository name):
```markdown
![Build](https://github.com/<OWNER>/<REPO>/workflows/Build%20and%20Release/badge.svg)
![CI](https://github.com/<OWNER>/<REPO>/workflows/CI/badge.svg)

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +58
<button class="nav-button" id="backBtn" title="Go back">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 12H5M12 19l-7-7 7-7"/>
</svg>
</button>
<button class="nav-button" id="forwardBtn" title="Go forward">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M5 12h14M12 5l7 7-7 7"/>
</svg>
</button>
<button class="nav-button" id="refreshBtn" title="Refresh">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2"/>
</svg>
</button>
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The navigation buttons lack proper accessibility attributes. Consider adding aria-label attributes to provide better descriptions for screen readers, since the buttons only contain SVG icons without visible text labels. For example, aria-label="Navigate back" would be more descriptive than just title="Go back".

Copilot uses AI. Check for mistakes.
Comment on lines +65 to +66
- name: Install dependencies
run: npm ci
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The workflow uses 'npm ci' which requires a package-lock.json file, but package-lock.json is listed in .gitignore. This will cause the release workflow to fail. Either remove package-lock.json from .gitignore and commit it to the repository, or change 'npm ci' to 'npm install' in the workflow files.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +12
-webkit-user-select: none;
user-select: none;
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The user-select: none property is applied to the entire body, making all text in the application non-selectable. This creates a poor user experience, as users cannot select and copy text from the lovable.dev website content loaded in the webview. Consider removing this property or applying it more selectively only to UI chrome elements like the navigation bar.

Suggested change
-webkit-user-select: none;
user-select: none;

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +8
<!-- CSP: 'unsafe-inline' is needed for inline scripts in this local Electron app.
Since all content is loaded from local files and not user-generated, the security risk is minimal. -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://lovable.dev https://*.lovable.dev; style-src 'self' 'unsafe-inline' https://lovable.dev https://*.lovable.dev; script-src 'self' 'unsafe-inline' https://lovable.dev https://*.lovable.dev; img-src 'self' https: data:; frame-src https://lovable.dev https://*.lovable.dev; connect-src https://lovable.dev https://*.lovable.dev wss: https:; font-src 'self' https: data:;">
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The Content Security Policy (CSP) allows 'unsafe-inline' for scripts, which undermines the security benefits of CSP. While the comment mentions this is for inline scripts in a local Electron app, the inline scripts in this file (lines 102-154) could be moved to a separate JavaScript file and loaded via script src. This would allow removing 'unsafe-inline' from script-src and improve security posture.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +31
- name: Install dependencies
run: npm ci
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The workflow uses 'npm ci' which requires a package-lock.json file, but package-lock.json is listed in .gitignore. This will cause the build workflow to fail when trying to install dependencies. Either remove package-lock.json from .gitignore and commit it to the repository, or change 'npm ci' to 'npm install' in the workflow files.

Copilot uses AI. Check for mistakes.
Comment on lines +110 to +120
// Show loading screen initially
setTimeout(() => {
loadingScreen.classList.add('fade-out');
setTimeout(() => {
loadingScreen.style.display = 'none';
}, 500);
}, 2000);

// Wait for webview to be ready
webview.addEventListener('dom-ready', () => {
console.log('Lovable webview loaded');
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The loading screen timeout is hardcoded to 2000ms (2 seconds), but this doesn't account for whether the webview has actually finished loading lovable.dev. If the network is slow or the site takes longer to load, users will see a black screen after the loading screen disappears. Consider listening to the webview's 'did-finish-load' or 'dom-ready' event instead to ensure the content is loaded before hiding the loading screen.

Suggested change
// Show loading screen initially
setTimeout(() => {
loadingScreen.classList.add('fade-out');
setTimeout(() => {
loadingScreen.style.display = 'none';
}, 500);
}, 2000);
// Wait for webview to be ready
webview.addEventListener('dom-ready', () => {
console.log('Lovable webview loaded');
// Helper to hide the loading screen once the webview is ready
let loadingScreenHidden = false;
function hideLoadingScreen() {
if (loadingScreenHidden) return;
loadingScreenHidden = true;
loadingScreen.classList.add('fade-out');
setTimeout(() => {
loadingScreen.style.display = 'none';
}, 500);
}
// Wait for webview to be ready before hiding the loading screen
webview.addEventListener('dom-ready', () => {
console.log('Lovable webview loaded');
hideLoadingScreen();

Copilot uses AI. Check for mistakes.
"author": "",
"license": "MIT",
"devDependencies": {
"electron": "^28.0.0",
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The Electron version specified is ^28.0.0, which allows any version from 28.0.0 up to but not including 29.0.0. While this is common practice, Electron major versions can introduce breaking changes. For a desktop application that needs stability, consider using a more restrictive version constraint (e.g., ~28.0.0 for patch updates only, or pinning to a specific version) to avoid unexpected breaking changes from minor version updates.

Suggested change
"electron": "^28.0.0",
"electron": "~28.0.0",

Copilot uses AI. Check for mistakes.
webview.addEventListener('dom-ready', () => {
console.log('Lovable webview loaded');
});

Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The console.log statement outputs a message when the webview loads, but there's no user-facing feedback or error handling if the webview fails to load. Consider adding error event listeners (e.g., 'did-fail-load') to handle and display connection errors to users, rather than just logging to the console.

Suggested change
// Handle webview load failures with user-facing feedback
webview.addEventListener('did-fail-load', (event) => {
console.error('Lovable webview failed to load:', {
errorCode: event.errorCode,
errorDescription: event.errorDescription,
validatedURL: event.validatedURL
});
alert('Unable to load Lovable. Please check your internet connection and try again.');
});

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +4
![Build](https://github.com/sumitduster-iMac/Lovable/workflows/Build%20and%20Release/badge.svg)
![CI](https://github.com/sumitduster-iMac/Lovable/workflows/CI/badge.svg)
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The badge URLs reference 'sumitduster-iMac' as the GitHub username. Verify this is the correct repository owner and not a personal machine identifier. Update to the appropriate organization or user account if needed.

Copilot uses AI. Check for mistakes.
@sumitduster-iMac sumitduster-iMac deleted the copilot/create-intel-mac-app branch December 30, 2025 10:02
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