Complete long-lived state owned by MingaEditor.Renderer.Server.
Renderer caches, font registration, frontend acknowledgement state, resident
windows, buffer monitors, and coalesced frame credit live here. Public
transitions centralize lifecycle cleanup so window close, buffer replacement,
reset, and exact monitor :DOWN all discard the same state.
Summary
Functions
Accepts changed semantic work and blocks an identical terminally rejected intent.
Clears rejection visibility after reconnect or another external state change.
Consumes matching one-shot evidence and returns its concrete adapted intent.
Drops all state for the exact monitored buffer death.
Constructs renderer state with injected process dependencies.
Returns frame credit and queues the next semantic frame through the state owner.
Drops windows absent from the latest intent and monitors each live buffer once.
Records adapted-retry evidence only for the matching outstanding transaction.
Releases the outstanding acknowledgement lease without committing its output.
Resets frontend-retained state and re-hydrates every resident in a fresh epoch.
Returns the currently visible terminal frontend failure, if any.
Enters a visible terminal frontend failure while preserving acknowledged caches.
Types
@type ack_lease() :: %{ generation: non_neg_integer(), seq: non_neg_integer(), timer_ref: reference(), output: MingaEditor.RenderPipeline.Input.t(), intent: MingaEditor.RenderPipeline.Intent.t(), pushed_at: integer() }
@type frame_work() :: {MingaEditor.RenderPipeline.Intent.t(), non_neg_integer(), integer()}
@type pipeline() :: (MingaEditor.RenderPipeline.Input.t() -> MingaEditor.RenderPipeline.Input.t())
@type t() :: %MingaEditor.Renderer.State{ ack_timeout_ms: pos_integer(), awaiting_ack: ack_lease() | nil, buffer_monitors: %{optional(pid()) => reference()}, buffer_versions: %{optional(pid()) => non_neg_integer()}, caches: MingaEditor.Renderer.Caches.t(), editor_pid: editor_ref(), font_registry: MingaEditor.UI.FontRegistry.t(), in_flight: frame_work() | nil, message_store: MingaEditor.UI.Panel.MessageStore.t() | nil, pending: frame_work() | nil, pipeline: pipeline(), rejection_state: MingaEditor.Renderer.RejectionState.t(), render_token: reference() | nil, rendering?: boolean(), require_ack?: boolean(), resident_windows: %{ optional(MingaEditor.Window.id()) => MingaEditor.Renderer.ResidentWindowState.t() }, stale_retry_count: non_neg_integer() }
Functions
@spec accept_intent(t(), MingaEditor.RenderPipeline.Intent.t()) :: {:accepted, t()} | {:blocked, t()}
Accepts changed semantic work and blocks an identical terminally rejected intent.
Clears rejection visibility after reconnect or another external state change.
@spec consume_adaptation(t(), non_neg_integer(), non_neg_integer()) :: {:ok, t(), MingaEditor.RenderPipeline.Intent.t()} | :error
Consumes matching one-shot evidence and returns its concrete adapted intent.
Drops all state for the exact monitored buffer death.
Constructs renderer state with injected process dependencies.
@spec queue_frame(t(), frame_work()) :: t()
Returns frame credit and queues the next semantic frame through the state owner.
@spec reconcile_windows(t(), MingaEditor.RenderPipeline.Intent.t()) :: t()
Drops windows absent from the latest intent and monitors each live buffer once.
@spec record_adaptation( t(), non_neg_integer(), non_neg_integer(), MingaEditor.Frontend.ResourcePolicy.adaptation_descriptor(), MingaEditor.RenderPipeline.Intent.t() ) :: {:ok, t()} | {:error, t()}
Records adapted-retry evidence only for the matching outstanding transaction.
Releases the outstanding acknowledgement lease without committing its output.
@spec reset_frontend(t(), MingaEditor.Renderer.ResidentWindowState.hydration_reason()) :: t()
Resets frontend-retained state and re-hydrates every resident in a fresh epoch.
@spec terminal_failure(t()) :: MingaEditor.Renderer.RejectionState.terminal() | nil
Returns the currently visible terminal frontend failure, if any.
@spec terminal_failure(t(), non_neg_integer(), atom()) :: t()
Enters a visible terminal frontend failure while preserving acknowledged caches.