Module state

Module state 

Source

Structs§

AppState
Shared application state for the CEF host.
BackendEndpoints
Backend (agentmux-srv) connection endpoints.
BrowserHandle
Wrapped CEF Browser handle stored in HostState.browsers. Replaces the raw Mutex<HashMap<String, Browser>> at state.rs::AppState.browsers at PR #2 step e.
BrowserPaneEntry
Per-pane reducer-managed entry. Replaces pane::lifecycle::BrowserPaneEntry (lifecycle.rs:42) at PR #2 step e.
CompletedCreation
Archived completion record for the runner’s history ring buffer. Bounded at TOP_LEVEL_CREATION_HISTORY_CAP (50); oldest evicted FIFO.
DragPayload
DragSession
InFlightCreation
The single in-flight top-level creation. Singleton invariant enforced by the reducer (at most one Some across all action sequences).
PendingWindowCreation
Phase B.5 (window_meta step d) — pre-create handoff. Caller (drag.rs::tear_off, commands/window.rs::open_new_window, window_pool.rs::spawn_pool_window, pane/creation.rs) pushes one entry per window CEF is about to create; client.rs::on_after_created pops the head entry and uses kind for the Subwindow taskbar-hide branch + as the payload for ReportWindowOpened.
PoolState
Pre-warmed window pool state. Replaces three separate fields on AppState: window_pool: Mutex<VecDeque<String>>, unpromoted_pool_labels: Mutex<HashSet<String>>, and window_pool_respawn_in_flight: AtomicBool. PR #3 migrates each caller through the a→e ratchet.
TopLevelCreationRequest
A request to create a top-level window. Pushed to HostState.top_level_creation.queue via EnqueueTopLevelWindow. Carries the full spec the effect handler needs to call ui_tasks::post_create_window.
TopLevelCreationState
Reducer-managed runner state. Owns the queue, in-flight slot, history, and id allocator.
WindowMeta
Per-window metadata held alongside the CEF Browser. See WindowKind for the semantics of kind and parent_instance_id.

Enums§

BrowserKind
Distinguishes top-level CEF Browsers (full-instance windows + pool windows) from pane CEF Browsers (children of a top-level). Determines taskbar treatment, lifecycle ownership, etc.
BrowserPaneLifecycle
Lifecycle state of a browser pane (the defwidget@browser widget). Held inside HostState.browser_panes keyed by block_id. Mirrors the existing PaneStateMachine::BrowserPaneLifecycle (pane/lifecycle.rs:28); the existing type stays during PR #2’s a→e migration. PR #2 step e deletes the pane/lifecycle.rs version and migrates all readers to this one.
CreationPhase
Phase progression of an in-flight top-level creation. Monotonic; AdvanceCreationPhase (if added later) refuses regression.
DragType
EffectKind
Side-effect descriptor emitted by reducer arms. Carried inside HostEvent::Effect(EffectKind). The effects executor in AppState::host_dispatch_with_effects dispatches each kind to the appropriate imperative handler (e.g., posting a CEF UI task).
QuitReason
QuitState
Host process quit lifecycle. Replaces is_quitting: AtomicBool at state.rs::AppState. Three states; transitions are monotonic (Running → Draining → Quit, no regression).
TopLevelCreationOutcome
Why a top-level creation completed. Completed is happy-path; the other variants are observable failure modes.
TopLevelSource
Distinguishes user-facing creation requests (which fail-fast on contention) from background ones (pool refill — may queue indefinitely).
WindowKind
Window role in the AgentMux multi-window model.

Functions§

log_host_event 🔒
Phase F.1 — observability hook for host-reducer events.