feat: desktop startup auto-update before main app launch

Check server version on launch, download/install/relaunch if newer,
then show the main UI. Manual update check no longer triggers full install.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-14 11:58:54 +09:00
parent d2b8affc57
commit 9a0f3f554b
5 changed files with 210 additions and 14 deletions
+4 -8
View File
@@ -4,17 +4,11 @@ import ReactDOM from 'react-dom/client';
import { initStorage, refreshApiBaseFromStorage } from '@goldenchart/shared';
import { installDesktopBridge } from './bridge/installDesktopBridge';
import { ensureDesktopApiBase } from './ensureDesktopApiBase';
import { StartupUpdateGate } from './StartupUpdateGate';
import App from '@frontend/App';
installDesktopBridge();
/** 시작 시 백그라운드 업데이트 확인 (실패 무시) */
void import('./bridge/updater').then(({ checkForUpdates }) => {
window.setTimeout(() => {
void checkForUpdates().catch(() => { /* offline 등 */ });
}, 8000);
});
async function bootstrap() {
await initStorage();
ensureDesktopApiBase();
@@ -22,7 +16,9 @@ async function bootstrap() {
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
<StartupUpdateGate>
<App />
</StartupUpdateGate>
</React.StrictMode>,
);
}