Skip to the content.

Architecture

The window on the XENEON EDGE (no iCUE)

Since 0.8.0 the hub shows the interface itself, without iCUE: the screen helper (apps/hub/src/screen/) is a PowerShell/WinForms process, like the tray icon, that compiles EdgeScreen.cs at start and opens a borderless, topmost WebView2 window over the whole XENEON EDGE. It loads http://localhost:47821/m/ui/index.html (apps/widget/screen/index.html, copied into dist/ui by the build), the same bundle as the iCUE widget.

Why two programs?

An iCUE widget is an HTML/JS page running in a Chromium embedded in iCUE (QtWebEngine). It can display things, react to touch ("interactive": true) and make fetch/WebSocket calls to hosts declared in manifest.json. It cannot launch a program, read the system or connect to Discord locally, and iCUE does not let a widget open another one.

Hence:

Loader + interface served by the hub

The .icuewidget only contains static/: an index.html that declares the iCUE settings and loads http://localhost:47821/m/ui/app.js and app.css. The bundle is built in apps/widget/dist/ui and served by the hub’s ui module (folder can be changed with RAIDTECH_UI_DIR). When that folder changes, the hub sends the ui/changed event and every widget runs location.reload().

Result: interface updates without re-importing, and live reload on the Edge during development. If the hub is missing, the loader shows “Raidtech Edge Hub not connected” and retries every 3 s.

The update module updates the hub itself from the repository’s GitHub releases (RaidtechEdgeHub.exe asset, URL restricted to github.com/raidoudou/raidtech-edge/releases/download/, size and SHA-256 checked). It starts the downloaded exe through Start-Process (outside the hub’s process tree, so it survives the installer’s taskkill /T), which stops the old hub, copies itself and starts the new version. When a widget gets a hello with a hubVersion different from the one it knew, it runs location.reload() to load the new hub’s interface.

Language

English by default, French as an option. The hub owns the choice (tray menu → Language, or ui/set-lang from the hub panel on the Edge), saves it in <dataDir>/settings.json, sends it in hello.lang and broadcasts ui/lang when it changes. Texts are written in place with tr("English", "Français") on both sides (apps/widget/src/i18n.ts, apps/hub/src/i18n.ts); messages the hub sends to the widget (Discord errors, system messages, update status) are translated by the hub. The widget keeps the last language in localStorage so the UI and the offline loader start in it.

Layout

apps/
  widget/            iCUE widget (Preact + esbuild)
    static/          the iCUE loader: index.html, manifest.json, translation.json, icon
    src/shell/       dock, navigation, toasts, "hub missing" screen, control panel (time, status, updates, settings)
    src/modules/     one view per module + registry.ts
    src/hub.ts       WebSocket client (auto reconnect, requests with timeout, events)
    src/i18n.ts      language (tr, locale)
    dev/preview.html preview at the Edge's sizes (dev only)
  hub/               PC companion (Node.js ≥ 24, TypeScript run natively)
    src/server.ts    HTTP + WebSocket, routing to modules, Origin check
    src/modules/     built-in modules (ui, update, launcher, system, discord)
    src/tray/        tray icon: tray.ps1 (WinForms) driven in JSON over stdin/stdout
    src/screen/      the window on the XENEON EDGE: screen.ps1 + EdgeScreen.cs (WebView2), webview2/ SDK files
    src/autostart.ts "Start with Windows" (HKCU\…\Run key)
    src/i18n.ts      language (tr, settings.json)
packages/
  protocol/          shared types and constants

Protocol

JSON frames over one WebSocket:

Direction Message Role
hub → widget { t: "hello", protocol, hubVersion, modules[], lang } on connect
widget → hub { t: "req", id, module, action, payload? } request
hub → widget { t: "res", id, ok: true, data } / { ..., ok: false, error } response
hub → widget { t: "evt", module, event, payload } pushed event

HTTP resources: GET /health, and GET /m/<module>/... routed to HubModule.http() (e.g. launcher icons).

iCUE constraints

Seen on the device

Still unknown