fix(panel): auto-provision Desktop shortcuts and add out-of-job 1-click host relaunch for 2.33.0+

- Add cross-platform desktop launcher manager (backend/desktop-launcher-config.mjs):
  automatically appends --remote-debugging-port=0 to user Desktop (including OneDrive),
  Start Menu, Taskbar pinned, and Startup Antigravity.lnk shortcuts plus existing
  HKCU Run entries on Windows and XDG .desktop launchers on Linux, with clean rollback
  when switching back to Sidebar Only mode
- Remove ineffective Desktop argv.json provisioning (Electron Desktop 2.33.0 does not
  read argv.json) while retaining ~/.antigravity-ide/argv.json for Antigravity IDE
- Add POST /api/bridge/relaunch (with hot-reload POST /api/settings fallback) using
  Shell.Application (-Sta + UTF-8 BOM .ps1) on Windows to break out of the host Job
  Object, exit tray instances, clean up stale DevToolsActivePort files, sanitize host
  environment variables, and relaunch with --remote-debugging-port=0 (plus open -a /
  nohup support on macOS and Linux, and live running-process path discovery across drives)
- Surface dismissible BridgeStatusNotice banner directly at the top of App.js alongside
  Settings tabs so users can activate topbar/composer mounting in one click

Closes #26
This commit is contained in:
fish
2026-11-18 21:42:21 +09:00
parent 935eb001ca
commit 955dfeebb7
16 changed files with 2066 additions and 421 deletions
@@ -269,6 +269,8 @@ export function isEquivalentTelemetry(prev, next) {
(pWb?.state || '') !== (nWb?.state || '') ||
Boolean(pWb?.argvUpdatedThisBoot) !== Boolean(nWb?.argvUpdatedThisBoot) ||
Boolean(pWb?.argvConfigured) !== Boolean(nWb?.argvConfigured) ||
Boolean(pWb?.launcherConfigured) !== Boolean(nWb?.launcherConfigured) ||
Boolean(pWb?.canRelaunch) !== Boolean(nWb?.canRelaunch) ||
Number(pWb?.aliveCount || 0) !== Number(nWb?.aliveCount || 0)
) {
return false;
@@ -1011,6 +1013,18 @@ export async function triggerCloudSync() {
return res;
}
export async function triggerBridgeHostRelaunch() {
try {
return await callSidecarApi('/api/bridge/relaunch', { method: 'POST', body: {} });
} catch {
// 兼容热更新后常驻父进程 main.mjs 尚未重注册新路由的场景,平滑回退至既有 POST /api/settings 通道转发至最新 Worker
return callSidecarApi('/api/settings', {
method: 'POST',
body: { __bridgeAction: 'relaunch' },
});
}
}
export async function triggerPluginUpdate() {
const res = await callSidecarApi('/api/plugin-update', { method: 'POST', body: {} });
if (res?.ok && res?.restarting) {