MingaEditor.Shell.Traditional.State (Minga v0.1.0)

Copy Markdown View Source

Presentation state for the traditional tab-based editor shell.

These fields are presentation concerns: they control how the editor looks and behaves visually, but have no effect on the core editing model. Each field was migrated from MingaEditor.State as part of Phase F of the Core/Shell separation.

All set_X/get_X methods that operate on shell fields live here. MingaEditor.State retains thin wrappers that delegate through update_shell_state/2 for backward compatibility.

Summary

Types

Git toast shown after a remote operation completes.

t()

Functions

Returns the agent session lifecycle state.

Returns the bottom panel state.

Cancels the nav flash animation.

Cancels the yank flash animation.

Clears the git toast.

Clears the git toast only when its dismissal reference matches.

Clears the transient status message.

Clears the git status panel.

Closes the BEAM Observatory sidebar.

Dismisses the hover popup.

Returns the git status panel data, or nil.

Returns the TUI-only git status view state, or nil.

Returns the git toast, or nil.

Returns the hover popup state, or nil when not showing.

Returns the inline ask store.

Returns the inline edit store.

Returns the active modal overlay value (:none when no modal is open).

Returns the nav flash state, or nil when inactive.

Returns true when the BEAM Observatory sidebar is visible.

Opens the BEAM Observatory sidebar.

Refreshes existing TUI-only git status view state after shared entries change.

Replaces the agent session lifecycle state.

Replaces the bottom panel state.

Sets the git status panel data.

Sets the TUI-only git status view state.

Sets the git toast shown after a remote operation.

Sets the hover popup state.

Replaces the inline ask store.

Replaces the inline edit store.

Replaces the modal overlay value.

Sets the nav flash state.

Stores the latest BEAM Observatory tree data.

Stores process inspection data for the native float popup.

Stores the timer reference for the next BEAM Observatory refresh.

Sets the active native sidebar id.

Sets whether a CUA space leader sequence is pending.

Sets the CUA space leader timer reference.

Sets the transient status message shown in the modeline.

Replaces the tab bar state.

Replaces the which-key popup state.

Sets the yank flash state.

Returns the active native sidebar id, or nil when the renderer should derive one.

Returns true if the given tool should NOT be prompted for installation.

Returns the transient status message, or nil.

Returns the tab bar state, or nil.

Returns the which-key popup state.

Returns the yank flash state, or nil when inactive.

Types

git_status_panel()

@type git_status_panel() :: MingaEditor.GitStatus.Panel.t()

git_status_tui_state()

@type git_status_tui_state() :: struct()

git_toast()

@type git_toast() :: MingaEditor.Frontend.Protocol.GUI.git_toast() | nil

Git toast shown after a remote operation completes.

t()

@type t() :: %MingaEditor.Shell.Traditional.State{
  agent: MingaEditor.State.Agent.t(),
  bottom_panel: MingaEditor.BottomPanel.t(),
  git_status_panel: git_status_panel() | nil,
  git_status_tui_state: git_status_tui_state() | nil,
  git_toast: git_toast(),
  hover_popup: MingaEditor.HoverPopup.t() | nil,
  inline_asks: MingaEditor.State.InlineAsk.store(),
  inline_edits: MingaEditor.State.InlineEdit.store(),
  modal: MingaEditor.State.ModalOverlay.t(),
  modeline_click_regions: [
    MingaEditor.Shell.Traditional.Modeline.click_region()
  ],
  nav_flash: MingaEditor.NavFlash.t() | nil,
  observatory_data: MingaEditor.Observatory.Data.t() | nil,
  observatory_inspection: MingaEditor.Observatory.Inspection.t() | nil,
  observatory_timer: {reference(), reference()} | nil,
  observatory_visible: boolean(),
  sidebar_active_id: String.t() | nil,
  signature_help: MingaEditor.SignatureHelp.t() | nil,
  space_leader_pending: boolean(),
  space_leader_timer: reference() | nil,
  status_msg: String.t() | nil,
  suppress_tool_prompts: boolean(),
  tab_bar: MingaEditor.State.TabBar.t() | nil,
  tab_bar_click_regions: [
    MingaEditor.Shell.Traditional.TabBarRenderer.click_region()
  ],
  tool_declined: MapSet.t(),
  tool_prompt_queue: [atom()],
  warning_popup_timer: reference() | nil,
  whichkey: MingaEditor.State.WhichKey.t(),
  yank_flash: MingaEditor.YankFlash.t() | nil
}

Functions

agent(map)

@spec agent(t()) :: MingaEditor.State.Agent.t()

Returns the agent session lifecycle state.

bottom_panel(map)

@spec bottom_panel(t()) :: MingaEditor.BottomPanel.t()

Returns the bottom panel state.

cancel_nav_flash(ss)

@spec cancel_nav_flash(t()) :: t()

Cancels the nav flash animation.

cancel_yank_flash(ss)

@spec cancel_yank_flash(t()) :: t()

Cancels the yank flash animation.

clear_git_toast(ss)

@spec clear_git_toast(t()) :: t()

Clears the git toast.

clear_git_toast(ss, dismiss_ref)

@spec clear_git_toast(t(), reference()) :: t()

Clears the git toast only when its dismissal reference matches.

clear_status(ss)

@spec clear_status(t()) :: t()

Clears the transient status message.

close_git_status_panel(ss)

@spec close_git_status_panel(t()) :: t()

Clears the git status panel.

close_observatory(ss)

@spec close_observatory(t()) :: t()

Closes the BEAM Observatory sidebar.

dismiss_hover_popup(ss)

@spec dismiss_hover_popup(t()) :: t()

Dismisses the hover popup.

git_status_panel(map)

@spec git_status_panel(t()) :: git_status_panel() | nil

Returns the git status panel data, or nil.

git_status_tui_state(map)

@spec git_status_tui_state(t()) :: git_status_tui_state() | nil

Returns the TUI-only git status view state, or nil.

git_toast(map)

@spec git_toast(t()) :: git_toast()

Returns the git toast, or nil.

hover_popup(map)

@spec hover_popup(t()) :: MingaEditor.HoverPopup.t() | nil

Returns the hover popup state, or nil when not showing.

inline_asks(arg1)

@spec inline_asks(t() | map()) :: MingaEditor.State.InlineAsk.store()

Returns the inline ask store.

inline_edits(arg1)

@spec inline_edits(t() | map()) :: MingaEditor.State.InlineEdit.store()

Returns the inline edit store.

modal(map)

@spec modal(t()) :: MingaEditor.State.ModalOverlay.t()

Returns the active modal overlay value (:none when no modal is open).

observatory_visible?(map)

@spec observatory_visible?(t()) :: boolean()

Returns true when the BEAM Observatory sidebar is visible.

open_observatory(ss, timer)

@spec open_observatory(t(), {reference(), reference()} | nil) :: t()

Opens the BEAM Observatory sidebar.

refresh_git_status_tui_state(ss, entries)

@spec refresh_git_status_tui_state(t(), [Minga.Git.StatusEntry.t()]) :: t()

Refreshes existing TUI-only git status view state after shared entries change.

set_agent(ss, agent)

@spec set_agent(t(), MingaEditor.State.Agent.t()) :: t()

Replaces the agent session lifecycle state.

set_bottom_panel(ss, panel)

@spec set_bottom_panel(t(), MingaEditor.BottomPanel.t()) :: t()

Replaces the bottom panel state.

set_git_status_panel(ss, data)

@spec set_git_status_panel(t(), git_status_panel() | nil) :: t()

Sets the git status panel data.

set_git_status_tui_state(ss, tui)

@spec set_git_status_tui_state(t(), git_status_tui_state() | nil) :: t()

Sets the TUI-only git status view state.

set_git_toast(ss, toast)

@spec set_git_toast(t(), git_toast()) :: t()

Sets the git toast shown after a remote operation.

set_hover_popup(ss, popup)

@spec set_hover_popup(t(), MingaEditor.HoverPopup.t()) :: t()

Sets the hover popup state.

set_inline_asks(ss, asks)

@spec set_inline_asks(t() | map(), MingaEditor.State.InlineAsk.store()) :: t() | map()

Replaces the inline ask store.

set_inline_edits(ss, edits)

@spec set_inline_edits(t() | map(), MingaEditor.State.InlineEdit.store()) ::
  t() | map()

Replaces the inline edit store.

set_modal(ss, modal)

@spec set_modal(t(), MingaEditor.State.ModalOverlay.t()) :: t()

Replaces the modal overlay value.

This is a low-level setter for MingaEditor.State.ModalOverlay. Normal callers should use ModalOverlay.open/3, transition/3, close/1, or dismiss/1 rather than calling this directly.

set_nav_flash(ss, flash)

@spec set_nav_flash(t(), MingaEditor.NavFlash.t()) :: t()

Sets the nav flash state.

set_observatory_data(ss, data)

@spec set_observatory_data(t(), MingaEditor.Observatory.Data.t() | nil) :: t()

Stores the latest BEAM Observatory tree data.

set_observatory_inspection(ss, inspection)

@spec set_observatory_inspection(t(), MingaEditor.Observatory.Inspection.t() | nil) ::
  t()

Stores process inspection data for the native float popup.

set_observatory_timer(ss, timer)

@spec set_observatory_timer(t(), {reference(), reference()} | nil) :: t()

Stores the timer reference for the next BEAM Observatory refresh.

set_sidebar_active_id(ss, id)

@spec set_sidebar_active_id(t(), String.t() | nil) :: t()

Sets the active native sidebar id.

set_space_leader_pending(ss, value)

@spec set_space_leader_pending(t(), boolean()) :: t()

Sets whether a CUA space leader sequence is pending.

set_space_leader_timer(ss, timer)

@spec set_space_leader_timer(t(), reference() | nil) :: t()

Sets the CUA space leader timer reference.

set_status(ss, msg)

@spec set_status(t(), String.t()) :: t()

Sets the transient status message shown in the modeline.

set_tab_bar(ss, tb)

@spec set_tab_bar(t(), MingaEditor.State.TabBar.t() | nil) :: t()

Replaces the tab bar state.

set_whichkey(ss, wk)

@spec set_whichkey(t(), MingaEditor.State.WhichKey.t()) :: t()

Replaces the which-key popup state.

set_yank_flash(ss, flash)

@spec set_yank_flash(t(), MingaEditor.YankFlash.t()) :: t()

Sets the yank flash state.

skip_tool_prompt?(ss, tool_name)

@spec skip_tool_prompt?(t(), atom()) :: boolean()

Returns true if the given tool should NOT be prompted for installation.

A tool is skipped when it's already declined this session, already installed, currently being installed, or already in the prompt queue.

status_msg(map)

@spec status_msg(t()) :: String.t() | nil

Returns the transient status message, or nil.

tab_bar(map)

@spec tab_bar(t()) :: MingaEditor.State.TabBar.t() | nil

Returns the tab bar state, or nil.

whichkey(map)

@spec whichkey(t()) :: MingaEditor.State.WhichKey.t()

Returns the which-key popup state.

yank_flash(map)

@spec yank_flash(t()) :: MingaEditor.YankFlash.t() | nil

Returns the yank flash state, or nil when inactive.