<feed xmlns='http://www.w3.org/2005/Atom'>
<title>prism.git/components/persistence.py, branch master</title>
<subtitle>Webapp for stock analysis</subtitle>
<id>https://git.tylerhoang.xyz/prism.git/atom?h=master</id>
<link rel='self' href='https://git.tylerhoang.xyz/prism.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tylerhoang.xyz/prism.git/'/>
<updated>2026-05-17T07:58:25Z</updated>
<entry>
<title>Fix persistence write-before-read and click swallow bugs</title>
<updated>2026-05-17T07:58:25Z</updated>
<author>
<name>Tyler</name>
<email>tyler@tylerhoang.xyz</email>
</author>
<published>2026-05-17T07:58:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tylerhoang.xyz/prism.git/commit/?id=48f3bc1960d71785aad44292205845612a4f1cb8'/>
<id>urn:sha1:48f3bc1960d71785aad44292205845612a4f1cb8</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add session persistence and watchlist exit button</title>
<updated>2026-05-17T07:48:26Z</updated>
<author>
<name>Tyler</name>
<email>tyler@tylerhoang.xyz</email>
</author>
<published>2026-05-17T07:48:26Z</published>
<link rel='alternate' type='text/html' href='https://git.tylerhoang.xyz/prism.git/commit/?id=e885be599095037f93209d42ba55c77c2fb6b6ee'/>
<id>urn:sha1:e885be599095037f93209d42ba55c77c2fb6b6ee</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
