Skip to content
CAI
Software that uses CAICheck a score

elixir-desktop/desktop

62.2

Adequate · 23 September 2026

5.4k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Elixir library that provides a cross-platform abstraction layer for building desktop and mobile applications. It unifies window management, menus, and notifications across native desktop environments, mobile devices, and headless browsers through a pluggable backend architecture. The library handles platform-specific details such as locale detection, authentication, and build-time configuration to allow a single codebase to target multiple operating systems.

How it got here

2021 — multi-platform backend abstraction

11 changes.

The project introduced a comprehensive backend abstraction layer to support mobile (iOS/Android) and headless environments alongside native desktop, routing operations through Wx, JSON, or Browser backends. This shift involved removing legacy wxWidgets dependencies, adding configurable mobile targets, and implementing robust build-time stubs to ensure stability across diverse platforms.

2026 — Desktop platform abstraction and tooling

4 changes.

This period focused on establishing a unified platform backend abstraction to support cross-platform desktop applications across native, mobile, and browser environments. It also introduced Mix tasks to verify toolchains and scaffold minimal desktop glue code, accompanied by comprehensive test coverage for the new backend implementations and installation workflows.

Features

Added automatic system locale detection and macOS-specific language lookup

The Desktop module now includes functionality to automatically detect and set the application's default locale based on the operating system's language settings. This is achieved through the new \identify\_default\_locale/1\ function, which compares system language codes against available Gettext backend locales to find the best match, supporting primary, secondary, and tertiary language preferences. A specific improvement for macOS users ensures accurate language detection by bypassing the unreliable \wx\ environment variables and instead querying the system directly via the \defaults\ command, resolving previous issues where the detected language might default to English based on number formatting rather than the actual user language. The module also exposes \language\_code/0\ and \live\_view\_version/0\ for runtime introspection.

lib · high confidence

Introduces a unified Platform backend abstraction for cross-platform desktop apps

The library now supports multiple runtime backends—Wx (native desktop), Json (mobile bridge), and Browser (fallback)—through a new \Desktop.Platform\ module hierarchy. This change provides a consistent API for window management, content loading, notifications, and system information across different environments, allowing the same application code to run on desktop, mobile, or in a browser context without modification.

lib/desktop/platform · high confidence

Introduces multi-platform backend abstraction with mobile and headless support

The library now routes window, webview, menu, and notification operations through a new \Desktop.Platform\ layer to one of three backends: \Desktop.Backend.Wx\ for native desktop windows (default), \Desktop.Backend.Json\ for Android and iOS via a JSON/TCP bridge, and \Desktop.Backend.Browser\ for headless environments or systems without wxWidgets. This change embeds the mobile bridge transport, removes the separate \{:wx, hex: :bridge}\ dependency for mobile builds, and adds configuration options (\config :desktop, :backend\) to override the automatic backend selection. It also introduces \Desktop.Platform.System.os\_description/0\ and \Desktop.Platform.System.custom\_event/2\ as backend-safe replacements for legacy wx-specific calls, and normalizes environment subscriber payloads to UTF-8 binaries.

(repo-wide) · high confidence

New Mix tasks for desktop toolchain verification and project installation

Added two new Mix tasks to the desktop library: \mix desktop.check\_toolchain\ verifies that the currently running Erlang/OTP and Elixir versions match the project's \.tool-versions\ file, and \mix desktop.install\ uses Igniter to scaffold the minimal glue code (menu bar, menu, and window configuration) required to launch an Elixir Desktop main window in an existing project.

lib/mix · high confidence

New menu adapters for DBus, JSON, and Browser backends

The menu system now supports three new rendering backends via new adapter modules: DBus (using ExSni for system tray integration), JSON (wrapping wxWidgets via a protocol bridge), and Browser (a no-op stub). This expands the platform support for desktop menus beyond the existing wx adapter, allowing menus to be rendered via D-Bus on Linux or through a JSON-based bridge, while the browser adapter provides a placeholder for web-based contexts.

lib/desktop/menu/adapters · high confidence

Platform backend abstraction and mobile support

The library now supports non-desktop environments (iOS and Android) through a new \Desktop.Platform\ abstraction that delegates window, content, menu, and notification operations to specific backends (\Backend.Wx\, \Backend.Json\, \Backend.Browser\). This allows the application to run on mobile devices using a JSON bridge or a system browser, while retaining the native \wxWidgets\ experience on desktop. The \Desktop.OS\ module now recognizes \Android\ and \IOS\ types, and the \Desktop.Auth\ module disables local authentication on mobile targets to prevent connection issues.

lib/desktop · high confidence

Removals

Removal of legacy wxWidgets desktop fallback modules

The \desktop\_fallback\ and \desktop\_wx\ modules have been removed from the source code. These files previously provided version checks for wxWidgets notification events and a mapping of wx constants, respectively. Their deletion indicates that the application no longer relies on this specific legacy abstraction layer for desktop UI interactions, likely as part of the broader platform backend abstraction changes.

src · high confidence

Behavioural changes

Configurable mobile target for desktop builds

The application now supports a configurable mobile target (Android or iOS) for desktop builds. This is achieved by adding a new configuration key \:desktop, :mobile\_target\ in \config/config.exs\, which is set at compile time based on the \MIX\_TARGET\ environment variable. This allows the application to adapt its behavior or build artifacts specifically for mobile platforms when compiled as a desktop release.

config · high confidence

Improved menu XML parsing with HTML entity support and error diagnostics

The menu system now uses a custom HTML tokenizer and parser to handle menu definitions, introducing support for HTML character entities (such as <, >, &, ", &\#39;, and  ) in menu labels. This change ensures correct character encoding and display of special symbols in the desktop menu. Additionally, the parser now provides detailed error messages with file, line, and column information for malformed XML, and includes a trace flag (TRACE\_MENU) for debugging menu parsing issues.

lib/desktop/menu · high confidence

Robust Wx build-time stubs and cross-platform taskbar icon support

The Wx desktop backend now includes build-time stub generation (lib/desktop/wx/stub.ex, compile.ex, records.ex) that probes the system's erlc to verify wx.hrl availability, providing integer fallbacks for mobile targets (Android/iOS) or environments where the header is missing. Additionally, the new taskbar icon implementation (lib/desktop/wx/task\_bar\_icon.ex) adds cross-platform support, handling macOS-specific creation paths and falling back to alternative APIs on other platforms to ensure the icon appears reliably.

lib/desktop/wx · high confidence

Test coverage

Added comprehensive test coverage for desktop backend and platform subsystems; Added desktop test helpers and removed obsolete Phoenix channel/conn test cases; Added tests for authentication, URL preparation, and parser; Added tests for the desktop installer task.

Dependencies

Upgrade to Phoenix LiveView 1.x and Elixir 1.11+ with mobile build support

The project now requires Elixir 1.11+ and upgrades its core dependencies to Phoenix 1.7.10+ and Phoenix LiveView 1.0.0+, enabling compatibility with the latest LiveView features. Additionally, the build system has been extended to support mobile targets (iOS and Android) by conditionally compiling Erlang source files and guarding the \:wx\ application inclusion based on filesystem checks, ensuring stable releases even on hosts without wxWidgets.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 57 → 62 (+5.5)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 91 → 94 (+3.4)
  • Architecture 100 → 93 (-7.2)
  • Maturity 38 → 38 (+0.5)
  • Readiness 61 → 74 (+12.7)
  • Security 80 → 95 (+15.3)

Resolved (10)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • FileTooLong: desktop/window.ex (lib/desktop/window.ex)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Test reliability not included
  • The README mentions desktop-example-app but does not link directly to it; readers must visit https://github.com/elixir-desktop/desktop-example-app for the example. (README.md)

New (17)

  • Dependency hygiene PARTLY measured — Mix pinning read, dependency currency not (Hex registry unreachable)
  • Documentation: no architecture or design documentation (README.md)
  • Duplicated block (5 lines × 2) (lib/desktop/backend/json.ex)
  • Duplicated block (5 lines × 2) (lib/desktop/menu/adapters/json.ex)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No dependency advisory monitoring
  • No dependency lockfile committed (mix.exs)
  • TooManyFunctions: Window (lib/desktop/window.ex)
  • Unbounded dependency requirement: gettext
  • Unbounded dependency requirement: phoenix
  • Unbounded dependency requirement: phoenix_live_view
  • Unbounded dependency requirement: plug
  • Workflow token permissions not restricted

Changes since last survey

  • 8 commits — 8 feature/other, 0 fixes

By area

  • lib/desktop — 4 commits
  • (root) — 3 commits
  • test/desktop — 1 commit

Notable commits

  • change: Call prepare_shutdown before BEAM halt on quit.
  • change: Deliver native notification clicks via edw_notification. (#84)
  • change: Destroy the taskbar icon when a window crashes (#86)
  • change: Make :wx an optional host extra_application (#80)
  • change: Normalize Env subscriber path/URL payloads to UTF-8 binaries. (#85)
  • change: Probe erlc to decide if wx.hrl is actually usable (#81)
  • change: extra_applications(:host): guard wx_app_on_disk?/0 against nil (#83)
  • change: extra_applications(:host): probe fs for :wx instead of code:lib_dir/1 (#82)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

elixir-desktop/desktop was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit f736ff479e415f1da0cc36de7d1e26e8e3b5b976 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.