webinterface.pages.base_pages.utils.session_state module#

Helpers for inspecting Streamlit st.session_state on the debug page.

Provides two small UI builders used by pages/0_debug_session_state.py:

  • ui_overview_table() renders a table of every key currently in st.session_state with its type and an abbreviated value preview.

  • ui_key_inspector() renders a selectbox to pick a single key and shows its full value.

Both are deliberately defensive: a value that cannot be rendered must not crash the whole page, so failures are caught and shown inline.

webinterface.pages.base_pages.utils.session_state.ui_key_inspector(max_list_repr: int = 5) None[source]#

Render a per-key inspector for st.session_state.

A selectbox chooses one key; its full value is shown using a widget appropriate to the value’s type (DataFrame/Series as tables, collections as pretty-printed text, scalars as code).

Parameters:

max_list_repr (int, optional) – Maximum number of items shown in the selectbox help preview, by default 5.

webinterface.pages.base_pages.utils.session_state.ui_overview_table(max_list_repr: int = 5) None[source]#

Render an overview table of all current st.session_state keys.

Each row shows the key, the value’s type, and an abbreviated preview.

Parameters:

max_list_repr (int, optional) – Maximum number of items shown inline for sequences and dict keys, by default 5.