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.
- Which screen: the monitor whose EDID id starts with
CRXED(else the first 2560×720 screen). The window follows display changes and hides while no XENEON EDGE is connected. - Touch: the Edge’s touchscreen is a standard Windows HID touchscreen (
VID_27C0&PID_0859), so no driver or iCUE is needed. Its other USB device (VID_1B1C&PID_1D0D, vendor usage pageFF1B) only talks to iCUE. - Focus: the window never activates (
WS_EX_NOACTIVATE,MA_NOACTIVATE,PA_NOACTIVATE), so touching the Edge does not take the focus from a game. When a text field gets the focus, the page postskeyboard:onthroughwindow.chrome.webview(apps/widget/src/screen.ts); the window then activates to receive the keyboard, and onkeyboard:offgives the focus back to the window that had it. - WebView2: the runtime ships with Windows 10/11. The SDK files the helper needs
(
Microsoft.Web.WebView2.Core.dll,Microsoft.Web.WebView2.WinForms.dll,WebView2Loader.dll, from theMicrosoft.Web.WebView2NuGet package, BSD license inwebview2/LICENSE.txt) are inapps/hub/src/screen/webview2/and embedded in the exe. The WebView2 profile lives in%APPDATA%\RaidtechEdge\webview2. - The tray item Show on the XENEON EDGE turns it on or off (
"edgeScreen"insettings.json). Until it is used, the window is on without iCUE and off when iCUE is installed (Program Files\Corsair\<…iCUE…>\iCUE.exe), so iCUE widget users are not covered by it after updating. The hub restarts the helper when it crashes (up to 5 times per minute).
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:
- A single widget that holds every view (internal navigation).
- A PC companion (the hub) that exposes modules on
ws://localhost:47821. Marketplace Discord widgets use the same model (a local “bridge”).
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
index.html: the<head>is parsed as strict XML (self-closed empty tags<meta ... />).<title>is required.- Scripts are loaded as classic scripts: IIFE bundle, Chromium 130 target.
- No inline
<style>in the<head>(the CLI flags it): loader CSS lives instatic/styles/loader.css. - Every network host must be declared in
manifest.permissions; for localhost the port is required → fixed port 47821. icuewidget validatechecks all of that;pnpm --filter @raidtech/widget validate.
Seen on the device
- iCUE connects to the hub with the
Origin: nullheader (accepted byisAllowedOrigin). - iCUE may open two instances of the widget at once (preview in the iCUE app + the Edge screen): the hub must support several clients.
- On import, iCUE shows the
localhost:47821permission to the user, who can turn it off.
Still unknown
- Exact pixel size of each of the Edge’s 8 layouts (the dev preview uses approximations; the CSS is fully adaptive through container queries).