Checklist
Summary
In Streamlit 1.51, the user-selected theme (Light or Dark) from the Settings menu does not persist.
Any rerun or page refresh resets the app to the default theme.
This happens in multiple browsers (Chrome, Edge).
Reproducible Code Example
Steps To Reproduce
- Define custom themes in config.toml using:
[theme.light]
[theme.dark]
- Run a minimal app:
import streamlit as st
st.write(st.context.theme.type)
st.button("Rerun")
-
In Settings → Theme, switch to Light or Dark.
-
Trigger a rerun or refresh the page.
Expected Behavior
The chosen theme should persist across reruns and page reloads.
Current Behavior
The theme always resets to the default theme after each rerun or refresh.
Is this a regression?
Debug info
- Streamlit version: 1.51.0, 1.52.1
- Python version: 3.11
- Operating System: Windows 11
- Browser: Chrome, Edge
Additional Information
Checklist
Summary
In Streamlit 1.51, the user-selected theme (Light or Dark) from the Settings menu does not persist.
Any rerun orpage refresh resets the app to the default theme.This happens in multiple browsers (Chrome, Edge).
Reproducible Code Example
Steps To Reproduce
In Settings → Theme, switch to Light or Dark.
Trigger a rerun or refresh the page.
Expected Behavior
The chosen theme should persist across reruns and page reloads.
Current Behavior
The theme always resets to the default theme after each rerun or refresh.
Is this a regression?
Debug info
Additional Information
This regression did not occur in Streamlit 1.50.
Affects both default and custom light/dark themes.