Skip to content

Commit 3bfc2bf

Browse files
committed
Merge branch 'main' into releases
2 parents b095cb6 + 712f20a commit 3bfc2bf

215 files changed

Lines changed: 7418 additions & 6449 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-view.yml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
timeout-minutes: 120
1313

1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
include:
1718
- os: macos-latest
@@ -39,6 +40,22 @@ jobs:
3940
run: |
4041
rm -rf node_modules
4142
rm -rf release
43+
rm -rf dist out build .vite
44+
rm -rf node_modules/.cache || true
45+
46+
# Clean build outputs on GitHub-hosted runners to avoid stale artifacts in current job
47+
- name: Clean build outputs (non-Windows)
48+
if: "!contains(matrix.os, 'self-hosted') && runner.os != 'Windows'"
49+
run: |
50+
rm -rf release dist out .vite
51+
rm -rf node_modules/.cache || true
52+
53+
- name: Clean build outputs (Windows)
54+
if: "!contains(matrix.os, 'self-hosted') && runner.os == 'Windows'"
55+
shell: pwsh
56+
run: |
57+
Remove-Item -Recurse -Force release, dist, out, .vite -ErrorAction SilentlyContinue
58+
Remove-Item -Recurse -Force node_modules/.cache -ErrorAction SilentlyContinue
4259
4360
- name: Setup Node.js
4461
if: "!contains(matrix.os, 'self-hosted')"
@@ -92,6 +109,20 @@ jobs:
92109
echo "LLVM_DIR=$(brew --prefix llvm@20)/lib/cmake/llvm" >> $GITHUB_ENV
93110
echo "CMAKE_PREFIX_PATH=$(brew --prefix llvm@20)/lib/cmake/llvm" >> $GITHUB_ENV
94111
112+
# Prebuild separately on macOS so signing/package issues are isolated
113+
- name: Build Release Files (macOS prebuild)
114+
if: runner.os == 'macOS'
115+
timeout-minutes: 45
116+
run: |
117+
npm run prebuild
118+
env:
119+
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
120+
VITE_PROXY_URL: ${{ secrets.VITE_PROXY_URL }}
121+
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
122+
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
123+
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
124+
USE_NPM_INSTALL_BUN: 'true'
125+
95126
# Step for macOS builds with signing
96127
- name: Build Release Files (macOS with signing)
97128
if: runner.os == 'macOS'
@@ -104,15 +135,28 @@ jobs:
104135
fi
105136
ulimit -n 65536 2>/dev/null || ulimit -n 10240 2>/dev/null || true
106137
echo "File descriptor limit: $(ulimit -n) (hard: $(ulimit -Hn 2>/dev/null || echo 'N/A'))"
107-
npm run prebuild
108-
npx electron-builder --mac --${{ matrix.arch }} --publish never
138+
139+
set +e
140+
npx electron-builder --mac dmg --${{ matrix.arch }} --publish never
141+
BUILD_EXIT=$?
142+
143+
if [ $BUILD_EXIT -ne 0 ]; then
144+
echo "First attempt failed with exit code $BUILD_EXIT"
145+
echo "Retrying once in 5 seconds..."
146+
sleep 5
147+
npx electron-builder --mac dmg --${{ matrix.arch }} --publish never
148+
BUILD_EXIT=$?
149+
fi
150+
151+
exit $BUILD_EXIT
109152
env:
110153
CSC_LINK: ${{ secrets.CERT_P12 }}
111154
CSC_KEY_PASSWORD: ${{ secrets.CERT_PASSWORD }}
112155
APPLE_ID: ${{ secrets.APPLE_ID }}
113156
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
114157
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
115158
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
159+
VITE_PROXY_URL: ${{ secrets.VITE_PROXY_URL }}
116160
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
117161
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
118162
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
@@ -127,6 +171,7 @@ jobs:
127171
npx electron-builder --win --${{ matrix.arch }} --publish never
128172
env:
129173
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
174+
VITE_PROXY_URL: ${{ secrets.VITE_PROXY_URL }}
130175
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
131176
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
132177
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
@@ -141,6 +186,7 @@ jobs:
141186
npx electron-builder --linux --${{ matrix.arch }} --publish never
142187
env:
143188
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
189+
VITE_PROXY_URL: ${{ secrets.VITE_PROXY_URL }}
144190
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
145191
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
146192
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
@@ -195,6 +241,7 @@ jobs:
195241
path: |
196242
release/*.AppImage
197243
retention-days: 5
244+
198245
merge-release:
199246
needs: build
200247
runs-on: ubuntu-latest

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
# Note: dorny/paths-filter fetches file info via GitHub API, no checkout needed
1818
- name: Check Not Allowed File Changes
19-
uses: dorny/paths-filter@v3
19+
uses: dorny/paths-filter@v4
2020
id: filter_not_allowed
2121
with:
2222
list-files: json

backend/app/controller/tool_controller.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import logging
1616
import os
1717
import shutil
18+
import threading
1819
import time
1920

2021
from fastapi import APIRouter, HTTPException
@@ -779,15 +780,13 @@ def is_port_in_use(port):
779780
bufsize=1, # Line buffered
780781
)
781782

782-
# Create async task to log Electron output
783-
async def log_electron_output():
783+
def log_electron_output():
784784
for line in iter(process.stdout.readline, ""):
785785
if line:
786786
logger.info(f"[ELECTRON OUTPUT] {line.strip()}")
787787

788-
import asyncio
789-
790-
asyncio.create_task(log_electron_output())
788+
log_thread = threading.Thread(target=log_electron_output, daemon=True)
789+
log_thread.start()
791790

792791
# Wait a bit for Electron to start
793792
import asyncio

backend/app/router.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ def register_routers(app: FastAPI, prefix: str = "") -> None:
7373
},
7474
]
7575

76+
app.include_router(health_controller.router, tags=["Health"])
77+
logger.info(
78+
"Registered Health router at root level for Docker health checks"
79+
)
80+
7681
for config in routers_config:
7782
app.include_router(
7883
config["router"], prefix=prefix, tags=config["tags"]

electron/main/index.ts

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ import {
5050
getInstallationStatus,
5151
PromiseReturnType,
5252
} from './install-deps';
53-
import {
54-
setRoundedCorners,
55-
setTransparentTitlebar,
56-
setVibrancy,
57-
} from './native/macos-window';
53+
import { setRoundedCorners } from './native/macos-window';
5854
import { registerUpdateIpcHandlers, update } from './update';
5955
import {
6056
getEmailFolderPath,
@@ -2741,8 +2737,7 @@ async function createWindow() {
27412737
);
27422738

27432739
// Platform-specific window configuration
2744-
// Windows: Use native frame for better native feel, solid background
2745-
// macOS: Use frameless with transparency and vibrancy effects
2740+
// Windows: native frame and solid background. macOS/Linux: frameless; macOS corner radius via native hook.
27462741
win = new BrowserWindow({
27472742
title: 'Eigent',
27482743
width: 1200,
@@ -2754,12 +2749,16 @@ async function createWindow() {
27542749
show: false, // Don't show until content is ready to avoid white screen
27552750
// Only use transparency on macOS and Linux (not supported well on Windows)
27562751
transparent: !isWindows,
2757-
// Solid background on Windows (respect dark/light mode), fully transparent on macOS for native vibrancy
2752+
// Solid on Windows; macOS solid without vibrancy; Linux unchanged semi-transparent tint
27582753
backgroundColor: isWindows
27592754
? nativeTheme.shouldUseDarkColors
27602755
? '#1e1e1e'
27612756
: '#ffffff'
2762-
: '#00000000',
2757+
: isMac
2758+
? nativeTheme.shouldUseDarkColors
2759+
? '#1e1e1e'
2760+
: '#f5f5f5'
2761+
: '#f5f5f580',
27632762
// macOS-specific title bar styling
27642763
titleBarStyle: isMac ? 'hidden' : undefined,
27652764
trafficLightPosition: isMac ? { x: 10, y: 10 } : undefined,
@@ -2783,23 +2782,13 @@ async function createWindow() {
27832782
},
27842783
});
27852784

2786-
// Apply native macOS effects
27872785
if (process.platform === 'darwin') {
27882786
win.once('ready-to-show', () => {
27892787
if (win && !win.isDestroyed()) {
27902788
try {
2791-
// Apply vibrancy with HUDWindow material (or others like 'Sidebar', 'UnderWindowBackground')
2792-
setVibrancy(win, 'HUDWindow');
2793-
2794-
// Apply rounded corners
27952789
setRoundedCorners(win, 20);
2796-
2797-
// Make titlebar transparent
2798-
setTransparentTitlebar(win);
2799-
2800-
log.info('[MacOS] Applied native visual effects');
28012790
} catch (error) {
2802-
log.error('[MacOS] Failed to apply native visual effects:', error);
2791+
log.error('[MacOS] Failed to apply rounded corners:', error);
28032792
}
28042793
}
28052794
});

0 commit comments

Comments
 (0)