openairclim.gui.tabs.config_text

Config (Expert) tab: view and hand-edit the config as raw TOML text.

Deliberately does not stay in sync with other tabs while the user is typing. The text box is only rebuilt when state.config_generation changes (a fresh config was loaded/created, or loaded from this tab’s own “Apply to Config” button), matching how the Config tab’s form is rebuilt. Plain field edits made elsewhere only trigger edited_config, which this tab ignores, so nothing changes underneath the user while they’re mid-edit here.

  • “Reload from Config” discards any text edits, replacing the box with the current state.edited_config re-serialized to TOML.

  • “Apply to Config” parses and validates the typed text exactly like the sidebar’s “Load” button validates a file and, if structurally valid, makes it the new working state.edited_config. The sidebar’s own load/validate status panes are used for reporting.

openairclim.gui.tabs.config_text.panel(state, status_panes)[source]

Return the Config (Expert) tab content.

Parameters:
  • state (AppState) – Shared application state.

  • status_panes (dict) – “load”/”validate” Markdown panes shared with the sidebar (see sidebar.build_status_panes).

Returns:

Tab layout.

Return type:

pn.Column