← Back to docs

Platform · launcher

Portal Launcher — Universal Action Entry Point

Application launcher with action registry, fuzzy/acronym search engine, execution pipeline, plugin system, and voice bridge. Provides the central interface for launching apps and executing system actions.

portal-launcherv0.2.0launcher
19.7K
Lines of Code
902
Tests
149
Files

Architecture

10 modules: action_registry (RegistryHandle — central action registry), search_engine (fuzzy + acronym search with context boosts), execution (ExecutionPipeline + GracePeriodManager — confirm/deny pipeline), providers (ActionProvider trait — pluggable action sources), index (PersistentIndex — disk-backed search index), plugin_system (dynamic plugin loading), ui (launcher UI rendering), voice_bridge (DefaultVoiceBridge — voice command integration), config (LauncherConfig — TOML config), telemetry (LauncherTelemetry — usage metrics). The Launcher struct is the top-level facade wiring all components.

Overview

portal-launcher is the universal action entry point for Portal OS. It maintains a registry of discoverable actions (apps, system commands, shortcuts), provides a search engine with fuzzy matching and acronym support (type 'ff' to find Firefox), executes selected actions through a pipeline with confirmation grace periods, supports pluggable action providers, and bridges to the voice subsystem for voice-triggered launches. The launcher maintains a persistent index for fast lookups and emits telemetry about action usage.

Key Types

LauncherTop-level launcher facade — owns registry, search engine, execution pipeline, voice bridge, telemetry, config, index, providers, grace manager.
RegistryHandleHandle to the action registry — thread-safe registration and lookup of discoverable actions.
ActionProviderTrait for pluggable action sources — apps provider, system command provider, custom plugins.
LauncherConfigConfiguration loaded from TOML — search settings, provider configuration, grace period timing.
GracePeriodManagerManages confirmation grace periods for destructive actions — brief window to cancel before execution.

Modules

action_registry

Central registry of discoverable actions — thread-safe registration, lookup, and enumeration.

search_engine

Search engine — fuzzy matching, acronym expansion ('ff' → Firefox), context-aware result boosting.

execution

Execution pipeline — validates, confirms (grace period), and dispatches actions. Includes GracePeriodManager.

providers

Action provider trait and built-in providers — app provider (.desktop files), system command provider.

index

Persistent index — disk-backed search index for fast cold-start lookups.

plugin_system

Plugin system — dynamic loading of action provider plugins.

voice_bridge

Voice bridge — connects to portal-voiced for voice-triggered actions ('launch Firefox').

ui

Launcher UI — renders search results, handles selection.

Data Flow

User types/voice → search_engine queries index + providers → ranked results → user selects → execution pipeline (validate → grace period → dispatch) → action executed

Dependencies

Internal (1)

External (19)

tokio workspaceasync-trait workspacerusqlite workspaceserde workspaceserde_json workspacetoml workspacestrsim workspaceregex 1.10chrono workspacethiserror workspacetracing workspacefreedesktop-desktop-entry workspaceshlex workspaceurl workspaceurlencoding 2.1xdg workspaceparking_lot workspacezbus workspacesha2 workspace

Connects to portal-voiced via voice_bridge. External: tokio (async), serde (config), fuzzy-matcher (search).