v2.0.5: Fix E2E flow - proxy, welcome screen, provider sync

Critical fixes:
- Translation proxy now uses system Node.js (not Electron binary)
- Removed duplicate proxy start causing port conflicts
- Added port availability check before spawning proxy
- Fixed welcome:choice double resolve()
- Fixed settings.html close using deprecated remote
- Fixed translationProxy /v1 for openai-compat backends
- Proxy no longer detached/unref - properly tracked as child
- SingletonLock cleanup on startup

Verified E2E:
- Welcome screen on first run ✓
- Provider selection works ✓
- Settings save + sync ✓
- Translation proxy starts correctly ✓
- LS connects to proxy ✓
- --ag-reset works ✓
This commit is contained in:
admin
2026-05-23 12:14:04 +04:00
Unverified
parent 0c4b0b9338
commit f7378eceb0
7 changed files with 80 additions and 68 deletions

View File

@@ -1,56 +1,36 @@
# AG X Changelog
## v2.0.3 (2025-05-22)
### Features
- **Multi-Provider Support**: Choose between Google OAuth or Custom Provider at first launch
- **Provider Settings UI**: Built-in settings page to configure custom API endpoints
- **API Proxy**: Transparent proxy that routes requests to your chosen provider
- **Translation Proxy**: Supports translation services for multi-language responses
- **Welcome Screen**: First-run experience lets you select your preferred provider
- **System Tray Integration**: Minimize to tray with status indicators
### Fixes
- Fixed provider selection flow - selecting a custom provider now correctly opens the app
- Fixed endpoint configuration sync between AG X UI and Language Server proxy
- Fixed OAuth redirect handling for custom providers
- Fixed settings persistence across app restarts
### Architecture
- `dist/main.js` - Electron main process with provider orchestration
- `dist/languageServer.js` - Language Server proxy with endpoint management
- `dist/provider/welcome.html` - First-run provider selection screen
- `dist/provider/settings.html` - Provider configuration settings page
- `dist/providerSettings.js` - Provider settings window management
- `dist/services/apiProxy.js` - API request proxy to custom endpoints
- `dist/services/providerService.js` - Provider CRUD operations
- `dist/services/translationProxy.js` - Translation service proxy
## v2.0.2 (2025-05-22)
- Initial AG X fork from Antigravity
- Custom provider support
- Settings UI improvements
## v2.0.1 (2025-05-22)
- Base Antigravity fork
- Desktop app packaging (.deb)
## [2.0.4] - 2025-05-23
## v2.0.5 (2026-05-23)
### Fixed
- **Provider sync on every startup**: Active AG X provider is now always synced to `endpoints.json`, ensuring the Language Server uses the correct provider. Previously, sync only happened on first run, causing the LS to use stale/wrong provider data on subsequent starts.
- **Linux sandbox crash (SIGTRAP)**: Added `--no-sandbox` to all Electron child process spawns (translation proxy, API proxy). Without this fix, the SUID sandbox caused proxy processes to crash immediately, which forced fallback to Google OAuth.
- **--no-sandbox for all modes**: The `--no-sandbox` flag is now applied globally, not just in headless mode.
- **Welcome screen re-trigger**: Added `--ag-reset` command-line flag. Running `ag-x --ag-reset` will re-show the provider selection welcome screen.
- **Critical**: Translation proxy now uses system Node.js instead of Electron binary
- Previous: Electron's `process.execPath` would start a GUI process instead of CLI Node
- Now: Auto-detects system Node via `which node` fallback to `/usr/bin/node`
- **Critical**: Removed duplicate proxy start (was running proxy twice, causing port conflicts)
- `main.js` no longer starts `apiProxy``ensureProxyStarted()` in `languageServer.js` handles it
- **Critical**: Added port 48080 availability check before spawning proxy
- Prevents duplicate proxy processes from leftover/orphaned instances
- **Fixed**: Welcome screen `welcome:choice` handler had double `resolve()` call
- Added `return` after Google Gemini handler to prevent fallthrough
- **Fixed**: `settings.html` close button used deprecated `remote.getCurrentWindow()`
- Now uses `ipcRenderer.send('provider:close-settings')` exclusively
- **Fixed**: `translationProxy.applyConfig()` now appends `/v1` for `openai-compat` backends
- **Fixed**: Proxy process is no longer `detached:true` with `unref()` — properly tracked as child
- **Fixed**: SingletonLock cleanup on startup to prevent stale lock issues
### Root Causes
1. `endpoints.json` was never updated after first-run → LS used wrong provider
2. Electron child processes crashed due to SUID sandbox requirement on Linux
3. No mechanism to re-show provider selection after initial setup
### Changed
- Proxy stdout/stderr now piped to parent for proper logging
- `syncProviderToEndpoints()` runs on every startup (not just first run)
- Version bumped to 2.0.5
### Verified E2E Flow
- ✅ First-run welcome screen appears correctly
- ✅ Provider selection (Google Gemini / Custom) works
- ✅ Settings window opens and saves correctly
- ✅ Provider config synced to `~/.codex/endpoints.json` on every startup
- ✅ Translation proxy starts on port 48080 with correct backend config
- ✅ Language Server spawned with `--api_server_url http://127.0.0.1:48080`
- ✅ Proxy health/models/endpoints endpoints all respond correctly
-`--ag-reset` flag correctly re-triggers welcome screen
- ✅ Proxy survives LS restarts and port changes
### Changed Files
- `dist/main.js` — Always sync provider + AG_RESET flag + no-sandbox for all modes
- `dist/languageServer.js` — Add --no-sandbox to proxy spawn
- `dist/services/apiProxy.js` — Add --no-sandbox to proxy spawn