Skip to main content

Module ui

Module ui 

Source
Expand description

The tray UI: an egui window + system tray that is a client of the daemon (studio-worker run). See docs/runtime/daemon-and-tray.md.

The UI never runs a job: a poller mirrors the daemon’s state into a Replica the tabs render, and the operator’s actions go back over the local API. When no daemon runs, the poller starts one.

Gated behind the ui cargo feature so headless installs and the service path don’t pull in egui / eframe / the tray backends.

Modules§

actions
Carries the operator’s clicks to the daemon off the UI thread, and keeps the one-line result the status line shows.
app
The eframe App: a client of the daemon. It renders the Replica the poller keeps fresh and sends the operator’s actions through the ActionRunner; it never runs a job itself.
notifier
OS-native desktop notifications gated on per-event toggles.
tab
The tabs the UI exposes. Pure data + tiny enum impl so the contract is testable without egui in scope.
tabs
Per-tab modules. Each module exposes a pure-data view model (testable without egui) and a thin render function that draws the view model into an egui::Ui.
tray
Tray icon state + menu factory (pure data). The per-OS tray construction lives in super::tray_host (ksni on Linux, tray-icon on macOS / Windows); this module keeps the logic that decides what the tray looks like (icon variant, menu labels, ARGB byte order) free of any platform types so it stays unit-testable.
tray_host
Cross-platform system-tray host.

Constants§

DISPLAY_ATTEMPT_ENV
Carries the display-retry attempt across the restart in place.
DISPLAY_RETRY_BASE
First wait before retrying the display, doubled per attempt.
DISPLAY_RETRY_MAX
Longest wait between display attempts.

Functions§

display_attempt
The display attempt this process is, from DISPLAY_ATTEMPT_ENV.
display_retry_delay
How long to wait before display attempt attempt + 1.
log_display_wait
Log a failed display attempt and answer how long to wait.
run
Entry point for studio-worker ui.