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.
Summary
Functions
Builds the workspace chrome projection from current editor state.
Returns the manual workspace id.
Returns the visible tabs for the active workspace.
Types
@type mode() :: :editor | :agent | :file_tree | :other
@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()] }
Functions
Builds the workspace chrome projection from current editor state.
@spec manual_workspace_id() :: non_neg_integer()
Returns the manual workspace id.
@spec visible_tabs(t()) :: [MingaEditor.Session.ChromeState.TabSummary.t()]
Returns the visible tabs for the active workspace.