mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 09:08:46 +02:00
700e1edbb4bbed643645ed3bf62186c82bc09f35
Root cause of the "chunks" clear bug: conversation history is server-owned, but MAF seeds a thread from whatever the client sends when no snapshot exists. Any stale tab (open across a clear or from an older session) still holds the old conversation in memory, and its next question re-persisted the whole thing — clears appeared to peel off one layer at a time. The agent middleware now drops client-sent history for threads with no stored snapshot, keeping only the last user turn (fresh conversations and empty-messages hydration requests pass through untouched). Verified live: simulated a cleared-thread stale tab, asked from it, and only the new turn was persisted. Also: clearThread surfaces DELETE failures as a toast instead of silently reloading, and conftest sets a dummy OPENAI_API_KEY so tests can import app.main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
WealthySmart
A financial management application
Description
Languages
TypeScript
65.2%
Python
33.3%
CSS
0.6%
Shell
0.4%
Dockerfile
0.2%
Other
0.1%