Skip to content

Commit a13b330

Browse files
docs: document dashboard --serve browser mode
Add a 'Browser mode (--serve)' section to the dashboard reference (per-OS invocation, the token-URL behavior, port/host options, and the security model), and a troubleshooting entry for the Linux/WSL2 blank-window (EGL) case that points users at --serve as the fix. Built clean on Astro 7; the cross-page anchor resolves. Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>
1 parent 08c6a8e commit a13b330

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

packages/docs/src/content/docs/help/troubleshooting.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,24 @@ If you need to downgrade intentionally, run `doctor --force` afterward — it wi
9696

9797
---
9898

99+
## Desktop app: blank window on Linux / WSL2
100+
101+
**Symptom:** The Magic Context Desktop app opens to a blank window (only the top menu, no content), often with `Could not create default EGL display: EGL_BAD_PARAMETER` in the terminal. Most common on non-Ubuntu Linux distributions and under WSL2.
102+
103+
**Why it happens:** The app's embedded WebView (WebKitGTK) cannot create a graphics surface against your host's driver stack. The bundled WebKitGTK is built for one environment and does not always match another distribution's Mesa/driver versions. Environment-variable workarounds (`WEBKIT_DISABLE_DMABUF_RENDERER=1`, etc.) usually do not help for this class.
104+
105+
**Fix:** Run the dashboard in **browser mode** instead of as a desktop window. The same binary, started with `--serve`, runs a local web server you open in your normal browser, so no embedded WebView is created:
106+
107+
```sh
108+
magic-context-dashboard --serve
109+
```
110+
111+
It prints a URL with a one-time token; open it in your browser (under WSL2, open it in your Windows browser via `localhost`). See [Browser mode (`--serve`)](/reference/dashboard/#browser-mode---serve) for per-OS invocations and options.
112+
113+
A native package using your system's own WebKitGTK (the `.deb` or `.rpm` rather than the `.AppImage`) can also resolve it on some distributions.
114+
115+
---
116+
99117
## Filing a bug report
100118

101119
Run:

packages/docs/src/content/docs/reference/dashboard.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,43 @@ Grab the file for your platform from the newest `dashboard-vX.Y.Z` release. The
1717

1818
You can also build from source: see the dashboard `README` in the [magic-context](https://github.com/cortexkit/magic-context) repo (`packages/dashboard`).
1919

20+
## Browser mode (`--serve`)
21+
22+
The dashboard normally runs as a desktop window (an embedded WebView). On some Linux distributions and under WSL2 that embedded WebView fails to start (a blank window, often with `Could not create default EGL display` in the terminal) because the bundled WebKitGTK does not match the host's graphics stack. For those cases the same binary can run as a **local web server** instead, which you then open in your normal browser. No WebView is created, so the graphics issue is bypassed entirely.
23+
24+
Run the installed binary with `--serve`:
25+
26+
```sh
27+
# Linux (.deb / .rpm install puts it on PATH)
28+
magic-context-dashboard --serve
29+
30+
# Linux AppImage
31+
./Magic_Context_Dashboard.AppImage --serve
32+
33+
# macOS
34+
"/Applications/Magic Context Dashboard.app/Contents/MacOS/magic-context-dashboard" --serve
35+
36+
# Windows
37+
"%LOCALAPPDATA%\Programs\Magic Context Dashboard\Magic Context Dashboard.exe" --serve
38+
```
39+
40+
It prints a URL with a one-time access token in the fragment and opens it in your default browser automatically when a desktop display is present:
41+
42+
```
43+
Magic Context Dashboard serve mode listening on 127.0.0.1:9077
44+
Open this URL: http://127.0.0.1:9077/#token=<token>
45+
```
46+
47+
On a headless or WSL2 host (no display) it just prints the URL; open it in a browser yourself. Under WSL2, `localhost` is forwarded to the Windows host, so the URL works in your **Windows** browser.
48+
49+
**Options:**
50+
51+
- `--serve`: serve on `127.0.0.1:9077` (default).
52+
- `--serve <port>`: use a different port, e.g. `--serve 8080`.
53+
- `--host 0.0.0.0 --allow-remote`: bind all interfaces so another machine can reach it. This is **off by default and requires the explicit `--allow-remote` flag**, because the dashboard can read every session transcript, edit your config, and run model-discovery subprocesses, all over plain bearer-token HTTP. Prefer an SSH tunnel over binding to an open network.
54+
55+
**Security:** access is gated by a per-process random token delivered in the URL fragment (never sent to the server or logged) and sent as an `Authorization: Bearer` header on each request. By default the server only binds loopback (`127.0.0.1`) and only accepts requests whose `Host` is loopback, which blocks DNS-rebinding. The token is required for every data request; the page shell itself carries no data.
56+
2057
## Updates
2158

2259
Production builds use Tauri’s updater against the project release manifest (`latest.json` on the project GitHub Pages site). When an update is available, the app shows an **Update available** toast with **Install & Restart**. You can also use the tray **Check for Updates** action for an interactive download-and-install flow.

0 commit comments

Comments
 (0)