# `MingaEditor.Session.ChromeState`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/session/chrome_state.ex#L1)

Shared workspace chrome projection for GUI and TUI renderers.

This module derives workspace-facing chrome state from the current editor state. It is a presentation projection, not storage. Frontends should consume this projection instead of inferring workspace membership from tab order, labels, paths, or agent status side effects.

# `mode`

```elixir
@type mode() :: :editor | :agent | :file_tree | :other
```

# `t`

```elixir
@type t() :: %MingaEditor.Session.ChromeState{
  active_tab_id: MingaEditor.State.Tab.id() | nil,
  active_workspace_id: non_neg_integer(),
  attention_count: non_neg_integer(),
  background_count: non_neg_integer(),
  conflict_count: non_neg_integer(),
  draft_count: non_neg_integer(),
  mode: mode(),
  visible_tabs: [MingaEditor.Session.ChromeState.TabSummary.t()],
  workspaces: [MingaEditor.Session.ChromeState.WorkspaceSummary.t()]
}
```

# `from_editor_state`

```elixir
@spec from_editor_state(map()) :: t()
```

Builds the workspace chrome projection from current editor state.

# `manual_workspace_id`

```elixir
@spec manual_workspace_id() :: non_neg_integer()
```

Returns the manual workspace id.

# `visible_tabs`

```elixir
@spec visible_tabs(t()) :: [MingaEditor.Session.ChromeState.TabSummary.t()]
```

Returns the visible tabs for the active workspace.

---

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