Skip to main content
The Desktop Control Center is a Tauri-based application that serves as the primary process supervisor and companion interface for the Palyra platform on Windows and macOS apps/desktop/README.md#1-9. It manages the lifecycle of the core daemon (palyrad), the browser automation daemon (palyra-browserd), and the local node host, providing a unified “companion shell” for human-in-the-loop interactions apps/desktop/README.md#17-35.

Architecture Overview

The Control Center operates as a bridge between the local operating system and the Palyra control plane. It encapsulates the complexity of sidecar management while exposing a React-based UI for monitoring and interaction.

System Entity Mapping

The following diagram maps the high-level functional components to their respective implementation entities within the apps/desktop workspace. Diagram: Desktop Component Mapping Sources: apps/desktop/src-tauri/src/supervisor.rs#212-234, apps/desktop/src-tauri/src/desktop_state.rs#215-227, apps/desktop/src-tauri/src/commands.rs#67-76, apps/desktop/ui/src/App.tsx#60-61, apps/desktop/ui/src/lib/desktopApi.ts#1-2

Process Supervision

The core of the application is the ControlCenter struct, which implements a 500ms supervisor tick loop apps/desktop/src-tauri/src/lib.rs#1-1. This loop ensures that desired services are running and healthy. For details on restart strategies and log sanitization, see Supervisor and Sidecar Management.

Desktop State and Companion UI

The Control Center maintains a local DesktopStateFile to persist user preferences, onboarding progress, and offline drafts apps/desktop/src-tauri/src/desktop_state.rs#215-227.

Companion Shell Features

The React-based UI (located in apps/desktop/ui) provides several key surfaces: For details on state migration, rollout flags, and the onboarding flow, see Desktop State, Onboarding, and Companion UI.

Technical Summary

ComponentEntityResponsibility
Supervisor LoopSUPERVISOR_TICK_MS500ms interval for process health checks apps/desktop/src-tauri/src/lib.rs#1-1.
State VersioningDESKTOP_STATE_SCHEMA_VERSIONCurrently version 6; manages local JSON state migrations apps/desktop/src-tauri/src/lib.rs#9-9.
API Bridgetauri::commandExposes Rust ControlCenter methods to the React frontend apps/desktop/src-tauri/src/commands.rs#67-120.
IdentityCONSOLE_PRINCIPALIdentifies the desktop app as admin:desktop-control-center for internal API calls apps/desktop/src-tauri/src/lib.rs#7-7.

Communication Flow

The UI interacts with the supervisor through a set of asynchronous commands defined in commands.rs. Diagram: UI-to-Supervisor Command Flow Sources: apps/desktop/ui/src/lib/desktopApi.ts#1-2, apps/desktop/src-tauri/src/commands.rs#67-76, apps/desktop/src-tauri/src/snapshot.rs#37-40
Child Pages:

Child Pages