# `MingaEditor.Extension.Sidebar.Snapshot`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/extension/sidebar/snapshot.ex#L1)

Cached semantic sidebar content published by an extension.

Extensions update snapshots when their own state changes. Layout, TUI rendering, and GUI emit code read these values directly from the sidebar registry, so frame rendering never calls arbitrary extension callbacks.

# `row`

```elixir
@type row() :: %{
  optional(:id) =&gt; String.t(),
  optional(:text) =&gt; String.t(),
  optional(:icon) =&gt; String.t() | nil,
  optional(:indent) =&gt; non_neg_integer(),
  optional(:selected?) =&gt; boolean(),
  optional(:active?) =&gt; boolean(),
  optional(:badge) =&gt; String.t() | nil,
  optional(:git_status) =&gt; atom() | String.t() | nil,
  optional(:diagnostic_count) =&gt; non_neg_integer()
}
```

Semantic row rendered by generic sidebar surfaces.

# `status`

```elixir
@type status() :: :ready | :loading | :error | :empty
```

Sidebar loading/error state.

# `t`

```elixir
@type t() :: %MingaEditor.Extension.Sidebar.Snapshot{
  active_id: String.t() | nil,
  message: String.t() | nil,
  rows: [row()],
  selected_id: String.t() | nil,
  selection_fingerprint: non_neg_integer(),
  status: status(),
  structural_fingerprint: non_neg_integer()
}
```

Cached snapshot state.

# `new`

```elixir
@spec new(keyword() | map()) :: t()
```

Builds a snapshot and derives fingerprints when they are not provided.

# `selection_only_change?`

```elixir
@spec selection_only_change?(t(), t()) :: boolean()
```

Returns true when two snapshots differ only by selection/focus state.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
