MingaEditor.GitStatus.Panel (Minga v0.1.0)

Copy Markdown View Source

Editor-owned shell state for the Git status panel.

The Git porcelain extension owns the commands and rendering, but core shell state still needs a stable shape for GUI emission, dirty tracking, and disabled-extension fallbacks.

Summary

Functions

Builds a panel from extension or core panel data.

Converts the stored panel to a plain map for wire encoders.

Types

repo_state()

@type repo_state() :: :normal | :not_a_repo | :loading

t()

@type t() :: %MingaEditor.GitStatus.Panel{
  ahead: non_neg_integer(),
  behind: non_neg_integer(),
  branch: String.t() | nil,
  entries: [Minga.Git.StatusEntry.t()],
  entry_base_path: String.t() | nil,
  last_commit_message: String.t() | nil,
  repo_state: repo_state(),
  stash_count: non_neg_integer() | nil
}

Functions

new(panel)

@spec new(t() | map()) :: t()

Builds a panel from extension or core panel data.

to_map(panel)

@spec to_map(t()) :: map()

Converts the stored panel to a plain map for wire encoders.