aboutsummaryrefslogtreecommitdiff
path: root/components/persistence.py
AgeCommit message (Collapse)Author
2026-05-17Fix persistence write-before-read and click swallow bugsTyler
Two root causes: 1. The JS wrote empty session defaults to localStorage before reading stored values back, destroying saved data on every fresh page load. Fixed by gating on data-loaded: JS reads+restores only when loaded=0, writes+saves only when loaded=1. 2. st.rerun() inside render_persistence_bridge() aborted the render before qt_click_receiver/wl_click_receiver were registered. Streamlit clears unrendered widget state, so pending click values (_qt_click, _wl_click) were wiped before quotetable/watchlist could process them. Fixed by removing st.rerun() — the bridge runs at the top of the render cycle so restored session state propagates to components below in the same pass; no extra rerun needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17Add session persistence and watchlist exit buttonTyler
Persists watchlist and active ticker across browser refreshes via a localStorage bridge (components/persistence.py), and adds a sidebar "← Watchlist" button to clear the active ticker and return to the QuoteTable landing page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>