fix(release): desktop Rust E0277 + jupyter wheel jlpm-in-pnpm

Two build bugs (16 other v1.9.31 assets shipped fine; these were the last two):
- desktop: register_hotkey returned tauri::Result, but global_shortcut register()
  yields global_shortcut::Error with no From into tauri::Error (E0277). Return
  Box<dyn Error> — both ? sites convert, and setup() already expects it.
- jupyter: hatch-jupyter-builder ran 'jlpm install' (yarn) at the pnpm monorepo
  root → rejected. Build the prod labextension via pnpm first (creates the
  skip-if-exists target), so the wheel build never invokes jlpm.
This commit is contained in:
Hanzo Dev
2026-07-04 01:28:16 -07:00
parent 66f12b08f1
commit 1a967f8bb2
2 changed files with 15 additions and 5 deletions
+11 -4
View File
@@ -579,17 +579,24 @@ jobs:
continue-on-error: true
run: python -m pip install --upgrade jupyterlab build
- name: Build labextension
# Build the PROD labextension via pnpm (NOT jlpm). jlpm is yarn, which refuses to
# `install` inside this pnpm monorepo ("not part of the project"). Running the
# scripts through pnpm uses the already-installed node_modules and produces
# hanzo_jupyter/labextension/static/style.js — the hook's skip-if-exists target,
# so the wheel build below skips jlpm entirely.
- name: Build labextension (prod, via pnpm)
continue-on-error: true
run: pnpm --filter @hanzo/jupyter build
run: |
pnpm --filter @hanzo/jupyter run build:lib:prod
pnpm --filter @hanzo/jupyter run build:labextension
- name: Build wheel
continue-on-error: true
working-directory: packages/jupyter
run: |
VERSION=${GITHUB_REF_NAME#v}
# hatch-jupyter-builder runs `jlpm build:prod` during the wheel build; the
# pre-built labextension above satisfies its skip-if-exists check.
# skip-if-exists (hanzo_jupyter/labextension/static/style.js) is satisfied by
# the prod labextension above, so hatch-jupyter-builder does NOT invoke jlpm.
python -m build --wheel
mkdir -p /tmp/jupyter
WHL=$(ls dist/hanzo_jupyter-*.whl dist/hanzo_ai_jupyter-*.whl 2>/dev/null | head -1)
+4 -1
View File
@@ -157,8 +157,11 @@ fn build_tray(app: &tauri::App) -> tauri::Result<()> {
// register_hotkey wires the global Cmd/Ctrl+Shift+Space to toggle_window. The
// plugin's handler fires on every registered shortcut; we match ours and act only
// on Pressed (not Released) so one keypress is one toggle.
// Returns Box<dyn Error> (not tauri::Result) because the global-shortcut plugin's
// register() yields a tauri_plugin_global_shortcut::Error that has no From impl into
// tauri::Error — both convert to Box<dyn Error>, which is what setup() expects anyway.
#[cfg(desktop)]
fn register_hotkey(app: &tauri::App) -> tauri::Result<()> {
fn register_hotkey(app: &tauri::App) -> Result<(), Box<dyn std::error::Error>> {
use tauri_plugin_global_shortcut::{Code, GlobalShortcutExt, Modifiers, Shortcut, ShortcutState};
// Cmd+Shift+Space on macOS, Ctrl+Shift+Space elsewhere — the modifier the