Skip to content

fix(app): make linux CEF deb package runnable#897

Closed
VectorJet wants to merge 31 commits intotinyhumansai:mainfrom
VectorJet:fix/linux-cef-deb-runtime
Closed

fix(app): make linux CEF deb package runnable#897
VectorJet wants to merge 31 commits intotinyhumansai:mainfrom
VectorJet:fix/linux-cef-deb-runtime

Conversation

@VectorJet
Copy link
Copy Markdown
Contributor

@VectorJet VectorJet commented Apr 24, 2026

Summary

  • update Debian package dependencies for trixie so the generated .deb installs without hand-editing DEBIAN/control
  • teach the packaged app to find openhuman-core from Linux install locations like /usr/bin/openhuman-core
  • skip tray setup on linux + cef builds to avoid the packaged GTK panic during tray/menu creation
  • add grep-friendly core binary resolution logs to make packaged startup failures easier to diagnose

Problem

  • the Linux CEF .deb was not runnable after install on Debian 13 / trixie
  • the package depended on obsolete Debian package names (libwebkit2gtk-4.0-37, libgdk-pixbuf2.0-0)
  • the GUI runtime looked for openhuman-core next to the app binary/resources, but the .deb installs it in /usr/bin
  • packaged startup also panicked when tray setup hit GTK too early on Linux CEF

Solution

  • update tauri.conf.json Linux deb dependencies to trixie package names
  • extend default_core_bin() to probe packaged Linux locations before falling back to sibling/resource lookup
  • split setup_tray() by cfg and short-circuit tray creation on linux + cef with an explicit warning log
  • keep the existing RunEvent::Ready tray deferral for other targets/runtime combinations

Submission Checklist

  • Unit tests — Vitest (app/) and/or cargo test (core) for logic you add or change
  • E2E / integration — Where behavior is user-visible or crosses UI → Tauri → sidecar → JSON-RPC; use existing harnesses (app/test/e2e, mock backend, tests/json_rpc_e2e.rs as appropriate)
  • N/A — Not practical here: this change fixes Linux packaging/runtime integration and was validated with cargo check --manifest-path src-tauri/Cargo.toml --target aarch64-unknown-linux-gnu plus a local packaged install repro
  • Doc comments — Existing comments were kept and expanded only where the runtime behavior was non-obvious
  • Inline comments — Existing tray/core resolution comments remain in place; added logging for the non-obvious packaged lookup path

Impact

  • impacts packaged Linux desktop builds using the CEF runtime
  • improves Debian 13 / trixie compatibility for generated .deb artifacts
  • avoids a Linux startup panic by disabling tray creation for the currently broken linux + cef path; tray behavior on other targets is unchanged
  • no core JSON-RPC contract or frontend API changes

Related

  • Closes:
  • Follow-up PR(s)/TODOs:
    • investigate restoring Linux CEF tray support once GTK/tray initialization is safe in packaged runs
    • optionally teach the installer/package to preserve chrome-sandbox permissions automatically

Summary by CodeRabbit

  • New Features

    • Added ARM Linux (aarch64) build support with complete setup and runtime instructions.
  • Bug Fixes

    • Fixed GTK initialization issue affecting tray setup on Linux.
    • Enhanced core binary discovery with improved diagnostics and logging.
  • Documentation

    • Updated build documentation with new package manager instructions and ARM Linux build guide.
  • Chores

    • Migrated build tooling from Yarn to pnpm across all workflows and scripts.

VectorJet and others added 30 commits April 24, 2026 07:43
- Document aarch64 build process in BUILDING.md
- Add gtk::init() in tauri-runtime-cef before tray creation
- This fixes 'GTK has not been initialized' panic on ARM Linux
…e externalBin

- Migrate package.json scripts from yarn to pnpm
- Add linux deb bundle config with empty depends in tauri.conf.json
- Remove duplicate externalBin key in tauri.conf.json
- Add pnpm workspace and lockfiles

Amp-Thread-ID: https://ampcode.com/threads/T-019dbb86-6270-709c-ba2e-0dc4ed254adc
Co-authored-by: Amp <amp@ampcode.com>
…i#710) (tinyhumansai#839)

- Add JSON-RPC handlers for source, global, and topic-based memory retrieval.
- Integrate Ollama embeddings for semantic reranking of chunks and summaries.
- Implement 15 unit tests for RPC handlers covering parameter parsing and PII redaction.
- Redact PII from logs by removing raw source, entity, and node identifiers.
- Fix BFS traversal for drill-down and deduplicate results in topic queries.
- Add configuration for embedding endpoints, models, and strictness modes.

Co-authored-by: sanil-23 <sanil@vezures.xyz>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
- Update all workflows to use pnpm instead of yarn
- Change cache: yarn to cache: pnpm
- Change yarn install to pnpm install
- Change yarn workspace to pnpm --filter
- Guard setup_tray with warn log level for headless CI environments
Also fix E2E spec pattern resolution from app/ directory
tauri-driver v2.0.5 proxies to WebKitWebDriver (webkit2gtk), but this app
uses CEF (tauri-runtime-cef) which has no WebDriver automation. Sessions
hang and timeout. Same as the commented-out e2e_linux job in test.yml.

Keep workflow_dispatch for manual runs when CEF automation support lands.
…ws, docs

- Replace yarn with pnpm in macos:dev script (app/package.json)
- Populate linux.deb.depends with GTK/WebKit/X11 runtime packages
  (tauri.conf.json + control.in)
- Replace "Install pnpm" (npm install -g pnpm) with pnpm/action-setup@v4
  in all 5 workflows that had pnpm before setup-node, enabling
  actions/setup-node cache: pnpm to work correctly
- Remove duplicate Install pnpm step from test.yml
- Remove references to non-existent pnpm-cache step in typecheck.yml
- Update docs/BUILDING.md prerequisites and all command examples to
  use pnpm consistently
- Fix hardcoded CEF_DIR hash and .deb filename with glob patterns
- Remove redundant workspaces array from root package.json
actions/setup-node cache: pnpm requires pnpm in PATH when setup-node
runs, but pnpm/action-setup installs pnpm after setup-node in the execution
order. Fix by using pnpm/action-setup's own cache: true to cache the pnpm
store, and remove cache: pnpm from setup-node steps across all 6 workflows.
Add comprehensive unit tests for PR #3 changes:

- default_core_bin() tests:
  * Env override takes precedence when file exists
  * Graceful handling when env override points to nonexistent file
  * Symlink resolution for same_executable_path
  * Nonexistent file handling
  * Core process handle creation and RPC URL formatting

- setup_tray() tests:
  * Conditional compilation validation
  * Dictation shortcut expansion (CmdOrCtrl handling)
  * Platform-specific behavior (macOS vs non-macOS)

- Additional helper tests:
  * is_daemon_mode detection
  * core_rpc_url() with env var and fallback
  * overlay_parent_rpc_url() edge cases (empty, whitespace)

These tests verify the grep-friendly logging patterns and
packaged Linux binary path probing introduced in the PR.
@VectorJet VectorJet requested a review from a team April 24, 2026 18:41
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR migrates the project from Yarn to pnpm across CI/CD workflows, npm scripts, and configuration files. It updates Tauri build settings, enhances core process binary resolution logging, refactors tray initialization to execute after app ready state, adds ARM Linux build documentation, removes redirect_links controller registration, and refactors E2E test infrastructure.

Changes

Cohort / File(s) Summary
Package Manager Migration (Workflows)
.github/workflows/build-windows.yml, build.yml, e2e-agent-review.yml, release.yml, test.yml, typecheck.yml
Consistent migration from Yarn to pnpm: added pnpm setup steps (v10.10.0 with caching), removed Yarn-specific cache configuration, switched installation commands to pnpm install --no-frozen-lockfile, updated workspace invocations from yarn workspace to pnpm --filter. Added NODE_OPTIONS env vars for increased heap size in some builds.
Package Manager Migration (Root & App Config)
package.json, app/package.json, .husky/pre-push, app/src-tauri/tauri.conf.json
Switched all npm scripts from yarn to pnpm invocations across workspace commands, test runners, formatters, and linters. Added packageManager: "pnpm@10.10.0" pinning to root package.json. Updated Tauri build commands from npm to pnpm. Added pnpm-workspace.yaml configuration.
Core Rust Process & Initialization
app/src-tauri/src/core_process.rs, app/src-tauri/src/lib.rs
Enhanced default_core_bin with structured diagnostics (info/warn logs on binary discovery, precedence, and resolution failures). Refactored tray initialization: moved from .setup() closure to RunEvent::Ready with platform-specific conditionals (no-op on Linux with CEF feature to avoid GTK panics). Added comprehensive test coverage for binary resolution, precedence, and tray behavior.
Build & Dependency Configuration
packages/deb/control.in, app/src-tauri/tauri.conf.json, pnpm-workspace.yaml
Added runtime library dependencies to Debian package control (GTK 3, WebKit2GTK, X11, GDK-Pixbuf, GLib). Updated Tauri beforeDevCommand and beforeBuildCommand from npm to pnpm. Created pnpm workspace configuration.
E2E & Test Infrastructure
app/test/wdio.conf.ts, tests/webview_apis_bridge.rs, app/test/e2e/helpers/artifacts.ts, app/test/e2e/specs/agent-review.spec.ts, app/scripts/e2e-build.sh, app/scripts/e2e-run-spec.sh
Migrated E2E execution from npx to pnpm exec (wdio, tauri). Refactored WebSocket mock server to spawn on dedicated Tokio runtime thread with port communication via mpsc channel. Updated WDIO config to use absolute projectRoot-based spec paths. Removed eslint-disable suppressions around console statements.
Frontend Components
app/src/AppRoutes.tsx, app/src/pages/Conversations.tsx, app/src/components/settings/panels/AIPanel.tsx
Removed redundant /notifications route in AppRoutes. Changed message ID generation from Date.now() + Math.random() to crypto.randomUUID() in Conversations. Updated AIPanel useEffect dependencies from empty array to [loadAIPreview, loadLocalAiStatus] for reactive behavior.
Controller Registry & Scripting
src/core/all.rs, src/openhuman/webhooks/bus.rs, scripts/review/README.md, scripts/review/cli.sh
Removed redirect_links controller and schema from central registry and test assertions. Removed unused _skill variable computation in agent-webhook handling. Updated review tool documentation and help text from yarn to pnpm references.
Documentation
docs/BUILDING.md
Switched all build/dev commands from yarn to pnpm. Added comprehensive ARM Linux (aarch64) build guide including headless dependency setup, Tauri aarch64 target build, GTK/CEF library path configuration, .deb installation, and GTK initialization fix for tray startup errors.

Sequence Diagram(s)

sequenceDiagram
    participant App as Tauri App
    participant Event as RunEvent Handler
    participant GTK as GTK (Linux)
    participant Tray as Tray Setup

    App->>Event: Application starts
    Event->>Event: Execute .setup() closure<br/>(without tray init)
    Note over App: Platform-specific init...<br/>GTK initialization, etc.
    
    Event->>Event: RunEvent::Ready triggered
    rect rgba(100, 200, 100, 0.5)
        Event->>GTK: Check if Linux + CEF feature?
        alt Linux + CEF
            Event->>Tray: Log warning (no-op)
        else Other platforms
            Event->>Tray: setup_tray(app_handle)
            Tray->>Tray: Create tray menu
            Tray->>Tray: Register event handlers
        end
    end
    Tray-->>App: Tray ready
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested reviewers

  • senamakel

🐰 Hops with glee through pnpm's speed
No more yarn tangles, we plant new seed
Workflows now swifter, tray blooms at dawn
ARM Linux runs, the old redirect's gone
Tests bundled tight on their own thread spun—
A brighter codebase for everyone! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(app): make linux CEF deb package runnable' directly addresses the main objective: making the Linux CEF Debian package functional by fixing core binary discovery, GTK tray initialization, and Debian package dependencies.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch fix/linux-cef-deb-runtime

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@senamakel
Copy link
Copy Markdown
Member

jfyi some files are outdated since we merged pnpm changes. just pull from main, merge and push into ur PR

@VectorJet
Copy link
Copy Markdown
Contributor Author

Got it closing this as it contains unnecessary commits. Creating a new one

@VectorJet VectorJet closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants