qwen-code/packages/desktop-shell
易良 17990c330d
fix(desktop): realign the release test with the new signing step (#11522)
The desktop release test pins the shape of the macOS signing step, and it
still described the allowlist that step used to be: the ripgrep and Node
section markers, the `find -exec … {} +` form, and `"$node_bin"` as the
signed path. Signing now discovers the Mach-O files under the staged
runtime instead of naming them, so every one of those assertions was
false and the step failed on all four platforms of release
0.3.0-preview.0 — after the runtime had been built.

Rewrite the assertions against what the step does now, keeping the
properties the old list guaranteed by construction: discovery spans the
whole runtime, only the Node.js branch passes entitlements, and the step
verifies what it signed. The empty-runtime guard replaces the ripgrep
warning it retired.

The reason this landed red is the second change. The job that runs this
test only fires when packages/desktop-shell, the update-manifest script,
or ci.yml change — but the file it asserts on is desktop-release.yml,
which is not in that list. A workflow-only edit therefore passes a green
Desktop Shell job in seconds without running the test that guards it.
Add the workflow to the filter.
2026-09-10 05:25:34 +00:00
..
.agents/skills/desktop-brand-builder feat(desktop-shell): restore the brand builder skill for the Tauri shell (#10164) 2026-08-27 12:47:50 +00:00
bootstrap feat: consolidate Local Control into one daemon-owned implementation (#9106) 2026-08-17 16:44:48 +00:00
runtime/qwen-code feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
scripts fix(desktop): realign the release test with the new signing step (#11522) 2026-09-10 05:25:34 +00:00
src-tauri feat: consolidate Local Control into one daemon-owned implementation (#9106) 2026-08-17 16:44:48 +00:00
.gitignore feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
.npmrc feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
NOTICE feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
package-lock.json feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
package.json feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
README.md feat: consolidate Local Control into one daemon-owned implementation (#9106) 2026-08-17 16:44:48 +00:00

Qwen Code desktop shell

This package is an isolated Tauri 2 shell around the existing Web Shell. It does not contain a second UI.

Runtime layout

npm run build:runtime prepares runtime/qwen-code/ with:

  • the current platform's Node.js runtime,
  • the bundled qwen CLI,
  • the built Web Shell under lib/web-shell/.

The Tauri app starts qwen serve on an ephemeral loopback port with a per-launch bearer token, waits for /health, and then opens that same daemon-served Web Shell in the native window.

Use Settings → Daemon → Local Control to temporarily share the live daemon with a phone on the same Wi-Fi. The Web Shell displays a QR code, keeps the computer awake while sharing is enabled, and closes the LAN listener when the user turns it off.

Local development

From this directory:

npm install --workspaces=false
npm run build:runtime --workspaces=false
npm run dev --workspaces=false

The first two steps are one-time setup. After that, npm run dev is all you need.

build:runtime bundles the current platform's Node.js, the qwen CLI, and the built Web Shell into runtime/qwen-code/. Re-run it only when you change the CLI or Web Shell source.

Use QWEN_DESKTOP_WORKSPACE=/absolute/path to override the initial workspace. The app otherwise restores its saved primary workspace or creates ~/Documents/Qwen on first launch. QWEN_DEFAULT_WORKSPACE_DIR=/absolute/path relocates that first-launch default, matching the Electron shell. Add and switch project workspaces from the Web Shell after startup.

Debugging

Runtime log

The daemon log is written to ~/Library/Logs/com.alibaba.qwen-code/desktop-runtime.log on macOS. Tail it to see qwen serve output:

tail -f ~/Library/Logs/com.alibaba.qwen-code/desktop-runtime.log

The desktop state (saved workspace, window position) is stored in ~/Library/Application Support/com.alibaba.qwen-code/desktop-state.json.

WebView DevTools

Open the Web Shell's DevTools from the running window with Cmd+Option+I (macOS) or Ctrl+Shift+I (Windows/Linux). This lets you inspect network requests, console output, and the React component tree.

Environment variables

Variable Purpose
QWEN_DESKTOP_WORKSPACE Override the initial workspace path
QWEN_DEFAULT_WORKSPACE_DIR Relocate the first-launch default workspace directory
QWEN_DESKTOP_SKIP_BUILD Set to 1 to skip the CLI/Web Shell rebuild during build:runtime
QWEN_CODE_ROOT Point to a local qwen-code checkout for the runtime bundle

Rust tests

cargo test --manifest-path src-tauri/Cargo.toml

Releases

The Desktop Release workflow builds signed updater artifacts when dry_run is disabled. Published releases require the Tauri updater private key. macOS releases also require Apple signing and notarization credentials.

The first stable Tauri release may set electron_bridge=true to publish the macOS ZIPs and DMGs, Windows NSIS installer, Linux AppImage, and their Electron 0.0.5 manifests. Leave the input disabled for later releases; the fixed desktop-latest release retains the bridge assets while desktop-latest.json advances independently.

The macOS workflow accepts either the Tauri-era APPLE_* certificate and notarization secrets or the existing MAC_CSC_* and APPLE_NOTARY_* secrets. TAURI_SIGNING_PRIVATE_KEY must match the public key in src-tauri/tauri.conf.json.