[PR #259] [CLOSED] feat: add optional OmniRoute autostart and tray controls #234

Closed
opened 2026-10-18 14:07:11 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/desktop/pull/259
Author: @nicoegerer
Created: 8/19/2026
Status: ❌ Closed

Base: main ← Head: agent/omniroute-autostart


📝 Commits (5)

  • cd500fc feat: add optional OmniRoute autostart
  • c05762b fix: avoid blocking desktop startup
  • 0b9969c fix: wait for OmniRoute HTTP readiness
  • b075d8a fix: harden OmniRoute Windows lifecycle
  • f18fc6b feat: add managed background service registry

📊 Changes

17 files changed (+2385 additions, -0 deletions)

View changed files

➕ FORK_NOTES.md (+32 -0)
📝 src/main/index.ts (+4 -0)
➕ src/main/services/defaults.ts (+127 -0)
➕ src/main/services/index.ts (+21 -0)
➕ src/main/services/ipc.ts (+138 -0)
➕ src/main/services/manager.ts (+454 -0)
➕ src/main/services/network.ts (+83 -0)
➕ src/main/services/registry.ts (+471 -0)
➕ src/main/services/ring-buffer.ts (+32 -0)
📝 src/preload/index.ts (+2 -0)
➕ src/preload/services.ts (+34 -0)
📝 src/renderer/src/lib/components/Main/Connections/StatusBar.svelte (+3 -0)
📝 src/renderer/src/lib/components/Main/Settings/General.svelte (+3 -0)
➕ src/renderer/src/lib/components/Main/Settings/Services.svelte (+712 -0)
➕ src/renderer/src/lib/services/ManagedServiceLogs.svelte (+76 -0)
➕ src/renderer/src/lib/services/ManagedServicesStatus.svelte (+124 -0)
➕ src/shared/services/types.ts (+69 -0)

📄 Description

Summary

  • add a disabled-by-default OmniRoute autostart option to General settings
  • on Windows, detect an existing service on 127.0.0.1:20128 before starting anything
  • start the existing global npm installation directly with shell: false, windowsHide: true, no detached console, and no browser launch
  • avoid OmniRoute's console-backed --tray path and expose an Electron-managed OmniRoute tray icon instead
  • provide tray actions to open the dashboard and stop OmniRoute without PowerShell, VBS, or temporary launcher files
  • use bounded TCP/HTTP readiness checks and keep request error listeners alive so a late socket hang up cannot crash the Electron main process
  • add labels for all currently bundled desktop locales

Scope

This remains a Windows-focused proof of concept for the architecture discussion in #258.

It expects:

  • Node.js at %ProgramFiles%\nodejs\node.exe
  • OmniRoute installed globally below %APPDATA%\npm\node_modules\omniroute

The feature is off by default, so existing users and installations are unaffected. The spawned process uses --max-restarts 0: OmniRoute 3.8.49 otherwise treats an explicit omniroute stop as a crash and its supervisor starts the server again. Open WebUI only starts OmniRoute once and does not restart it after an intentional stop.

Validation

  • npm run typecheck:node
  • npm run svelte-check — 0 errors, 0 warnings
  • npx eslint --quiet src/main/utils/omniroute.ts
  • locale JSON parsing and key-completeness check
  • npm run build
  • Windows runtime process-tree check: serve --no-open --max-restarts 0
  • real omniroute stop check: server and supervisor exited; no OmniRoute process returned during a 15-second observation
  • duplicate-start guard retained for an existing listener on port 20128

The PR stays in draft until the packaged Windows installer has been tested.

Relates to #258


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/desktop/pull/259 **Author:** [@nicoegerer](https://github.com/nicoegerer) **Created:** 8/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `agent/omniroute-autostart` --- ### 📝 Commits (5) - [`cd500fc`](https://github.com/open-webui/desktop/commit/cd500fcdd784d532715613e3500f6204bdb51f4c) feat: add optional OmniRoute autostart - [`c05762b`](https://github.com/open-webui/desktop/commit/c05762bb2b25f4cc7563c386a41cbbe6ba6b56d1) fix: avoid blocking desktop startup - [`0b9969c`](https://github.com/open-webui/desktop/commit/0b9969ca5c93fb2220230e8700b72f056abe220b) fix: wait for OmniRoute HTTP readiness - [`b075d8a`](https://github.com/open-webui/desktop/commit/b075d8a6b3436c919085bb2e8dad91a3802ecf3e) fix: harden OmniRoute Windows lifecycle - [`f18fc6b`](https://github.com/open-webui/desktop/commit/f18fc6bac0c40eb22c0416175379c105a6735af7) feat: add managed background service registry ### 📊 Changes **17 files changed** (+2385 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `FORK_NOTES.md` (+32 -0) 📝 `src/main/index.ts` (+4 -0) ➕ `src/main/services/defaults.ts` (+127 -0) ➕ `src/main/services/index.ts` (+21 -0) ➕ `src/main/services/ipc.ts` (+138 -0) ➕ `src/main/services/manager.ts` (+454 -0) ➕ `src/main/services/network.ts` (+83 -0) ➕ `src/main/services/registry.ts` (+471 -0) ➕ `src/main/services/ring-buffer.ts` (+32 -0) 📝 `src/preload/index.ts` (+2 -0) ➕ `src/preload/services.ts` (+34 -0) 📝 `src/renderer/src/lib/components/Main/Connections/StatusBar.svelte` (+3 -0) 📝 `src/renderer/src/lib/components/Main/Settings/General.svelte` (+3 -0) ➕ `src/renderer/src/lib/components/Main/Settings/Services.svelte` (+712 -0) ➕ `src/renderer/src/lib/services/ManagedServiceLogs.svelte` (+76 -0) ➕ `src/renderer/src/lib/services/ManagedServicesStatus.svelte` (+124 -0) ➕ `src/shared/services/types.ts` (+69 -0) </details> ### 📄 Description ## Summary - add a disabled-by-default OmniRoute autostart option to General settings - on Windows, detect an existing service on `127.0.0.1:20128` before starting anything - start the existing global npm installation directly with `shell: false`, `windowsHide: true`, no detached console, and no browser launch - avoid OmniRoute's console-backed `--tray` path and expose an Electron-managed OmniRoute tray icon instead - provide tray actions to open the dashboard and stop OmniRoute without PowerShell, VBS, or temporary launcher files - use bounded TCP/HTTP readiness checks and keep request error listeners alive so a late `socket hang up` cannot crash the Electron main process - add labels for all currently bundled desktop locales ## Scope This remains a Windows-focused proof of concept for the architecture discussion in #258. It expects: - Node.js at `%ProgramFiles%\nodejs\node.exe` - OmniRoute installed globally below `%APPDATA%\npm\node_modules\omniroute` The feature is off by default, so existing users and installations are unaffected. The spawned process uses `--max-restarts 0`: OmniRoute 3.8.49 otherwise treats an explicit `omniroute stop` as a crash and its supervisor starts the server again. Open WebUI only starts OmniRoute once and does not restart it after an intentional stop. ## Validation - `npm run typecheck:node` - `npm run svelte-check` — 0 errors, 0 warnings - `npx eslint --quiet src/main/utils/omniroute.ts` - locale JSON parsing and key-completeness check - `npm run build` - Windows runtime process-tree check: `serve --no-open --max-restarts 0` - real `omniroute stop` check: server and supervisor exited; no OmniRoute process returned during a 15-second observation - duplicate-start guard retained for an existing listener on port 20128 The PR stays in draft until the packaged Windows installer has been tested. Relates to #258 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 14:07:11 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/desktop#234
No description provided.