Pure lifecycle owner for the Traditional shell's BEAM Observatory.
Refresh timers are correlated by semantic tokens. Expiring a scheduled refresh moves it to an in-flight state, and only the matching result can install data and arm the next refresh. Closing clears every surface value, so delayed ticks and results cannot restore a hidden observatory.
Summary
Functions
Closes the surface and invalidates scheduled or in-flight refreshes.
Returns whether a collection token is currently in flight.
Completes a matching collection and schedules the next refresh.
Returns the latest collected Observatory data.
Expires a matching scheduled refresh and marks its collection in flight.
Shows or dismisses the process inspection float.
Returns the active process inspection, when present.
Opens the surface and installs its first scheduled refresh.
Installs data without changing refresh correlation.
Returns the timer handle that an effectful workflow should cancel.
Returns whether the Observatory surface is visible.
Types
@type phase() :: :idle | :scheduled | :collecting
@type t() :: %MingaEditor.Shell.Traditional.Observatory{ data: MingaEditor.Observatory.Data.t() | nil, inspection: MingaEditor.Observatory.Inspection.t() | nil, phase: phase(), timer: reference() | nil, token: reference() | nil, visible: boolean() }
Functions
Closes the surface and invalidates scheduled or in-flight refreshes.
Returns whether a collection token is currently in flight.
@spec complete(t(), reference(), MingaEditor.Observatory.Data.t(), timer()) :: {:accepted | :stale, t()}
Completes a matching collection and schedules the next refresh.
@spec data(t()) :: MingaEditor.Observatory.Data.t() | nil
Returns the latest collected Observatory data.
Expires a matching scheduled refresh and marks its collection in flight.
@spec inspect(t(), MingaEditor.Observatory.Inspection.t() | nil) :: t()
Shows or dismisses the process inspection float.
@spec inspection(t()) :: MingaEditor.Observatory.Inspection.t() | nil
Returns the active process inspection, when present.
Opens the surface and installs its first scheduled refresh.
@spec replace_data(t(), MingaEditor.Observatory.Data.t() | nil) :: t()
Installs data without changing refresh correlation.
Returns the timer handle that an effectful workflow should cancel.
Returns whether the Observatory surface is visible.