MingaEditor.Supervisor (Minga v0.1.0)

Copy Markdown View Source

Supervises the editor runtime: tree-sitter parser, renderer, and Editor GenServer.

Uses rest_for_one to enforce the dependency chain:

MingaEditor.Supervisor (rest_for_one)
 Minga.Parser.Manager     Tree-sitter parser Port
 MingaEditor.Frontend.Manager       Zig renderer Port
 MingaEditor             Editor orchestration GenServer

If Parser.Manager crashes, Port.Manager and Editor restart (Editor has stale highlight state). If Port.Manager crashes, Editor restarts (Editor can't render without the Port). An Editor crash restarts only the Editor.

This supervisor is conditionally started: it only appears in the supervision tree when the editor UI is active (not in test mode or headless operation).

Summary

Types

Options for starting the editor supervisor.

Functions

Returns a specification to start this module under a supervisor.

Types

start_opt()

@type start_opt() ::
  {:name, GenServer.name()} | {:backend, MingaEditor.Frontend.Manager.backend()}

Options for starting the editor supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])

@spec start_link([start_opt()]) :: Supervisor.on_start()