-
-
Notifications
You must be signed in to change notification settings - Fork 0
Create native Intel Mac app for Lovable.dev with enhanced UI and CI/CD #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: sumitduster-iMac <[email protected]>
Co-authored-by: sumitduster-iMac <[email protected]>
Co-authored-by: sumitduster-iMac <[email protected]>
…acks Co-authored-by: sumitduster-iMac <[email protected]>
Co-authored-by: sumitduster-iMac <[email protected]>
|
@copilot Create workflow |
Co-authored-by: sumitduster-iMac <[email protected]>
Created GitHub Actions workflows in commit 8441c95: Build and Release (
CI (
To create a release: git tag v1.0.0
git push origin v1.0.0See |
| } | ||
| ], | ||
| "category": "public.app-category.developer-tools", | ||
| "icon": "assets/icon.png" |
There was a problem hiding this comment.
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.
| return { action: 'deny' }; | ||
| } | ||
| return { action: 'allow' }; | ||
| }); |
There was a problem hiding this comment.
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)
There was a problem hiding this 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.
| Add these to your README.md: | ||
|
|
||
| ```markdown | ||
|  | ||
|  |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| Add these to your README.md: | |
| ```markdown | |
|  | |
|  | |
| Add these to your README.md (replace `<OWNER>` and `<REPO>` with your GitHub username/organization and repository name): | |
| ```markdown | |
|  | |
|  |
| <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> |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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".
| - name: Install dependencies | ||
| run: npm ci |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| -webkit-user-select: none; | ||
| user-select: none; |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| -webkit-user-select: none; | |
| user-select: none; |
| <!-- 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:;"> |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| - name: Install dependencies | ||
| run: npm ci |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| // 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'); |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| // 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(); |
| "author": "", | ||
| "license": "MIT", | ||
| "devDependencies": { | ||
| "electron": "^28.0.0", |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| "electron": "^28.0.0", | |
| "electron": "~28.0.0", |
| webview.addEventListener('dom-ready', () => { | ||
| console.log('Lovable webview loaded'); | ||
| }); | ||
|
|
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
| // 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
AI
Dec 30, 2025
There was a problem hiding this comment.
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.
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
Enhanced UI Components
Build Configuration
CI/CD Workflows
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
Documentation
Creating Releases
The release workflow will automatically build and publish the app with auto-generated release notes.
Original prompt
💡 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.main.js,index.html,styles.css,preload.jswithwebviewnavigation (back/forward/refresh/home), loading screen, status bar, CSP, and context isolation (sandbox off forwebviewTag)package.jsonwithelectron-builderconfig (Mac x64), build scripts (build,build-dmg), and assets (assets/icon.svg)build.yml(build artifacts, tag-based releases) andci.yml(syntax/structure/style checks); docs at.github/workflows/README.mdREADME.md,QUICK_START.md,UI_DESIGN.md,VISUAL_PREVIEW.md, and.gitignorefor Node/Electron/build outputsWritten by Cursor Bugbot for commit 8441c95. Configure here.