State for the bottom panel container.
The bottom panel is a resizable, tabbed container below the editor surface (above the status bar) in GUI frontends. It hosts Messages, Diagnostics, Terminal, and future panel tabs. The BEAM sends declarative state each frame; frontends render it with their native toolkit.
Tab types
:messages- editor log messages (always present):diagnostics- LSP diagnostics (future):terminal- integrated terminal (future)
Visibility state machine
The panel has three independent visibility controls:
visible- whether the panel is currently showndismissed- set when user explicitly dismisses a warning auto-popup; prevents auto-open until the user explicitly opens the panelfilter- optional filter preset (:warningsfor auto-open on warning)
Summary
Functions
Clears panel focus without changing visibility.
Dismiss the panel (prevents auto-open until explicit open).
Filter preset byte for protocol encoding.
Focuses the visible panel. Hidden panels stay unfocused.
Returns true when the panel is visible and focused.
Hide the panel.
Cycle to the next tab.
Cycle to the previous tab.
Update panel height (clamped to 10-60%).
Show the panel on a specific tab with an optional filter preset.
Switch to a tab by index.
Tab display name for protocol encoding.
Tab type byte for protocol encoding.
Toggle panel visibility. Clears dismissed state on explicit open.
Types
@type filter_preset() :: :warnings | nil
@type t() :: %MingaEditor.BottomPanel{ active_tab: tab(), dismissed: boolean(), filter: filter_preset(), focused: boolean(), height_percent: non_neg_integer(), tabs: [tab()], visible: boolean() }
@type tab() :: :messages | :diagnostics | :terminal
Functions
Clears panel focus without changing visibility.
Dismiss the panel (prevents auto-open until explicit open).
@spec filter_byte(filter_preset()) :: non_neg_integer()
Filter preset byte for protocol encoding.
Focuses the visible panel. Hidden panels stay unfocused.
Returns true when the panel is visible and focused.
Hide the panel.
Cycle to the next tab.
Cycle to the previous tab.
@spec resize(t(), non_neg_integer()) :: t()
Update panel height (clamped to 10-60%).
@spec show(t(), tab(), filter_preset()) :: t()
Show the panel on a specific tab with an optional filter preset.
@spec switch_tab(t(), non_neg_integer()) :: t()
Switch to a tab by index.
Tab display name for protocol encoding.
@spec tab_type_byte(tab()) :: non_neg_integer()
Tab type byte for protocol encoding.
Toggle panel visibility. Clears dismissed state on explicit open.