fix: prevent session creation loop without backend #42
Reference in New Issue
Block a user
Delete Branch "fix/session-creation-loop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
getOrCreateSessionidempotent: return existing active session when called with no ID instead of always creating a new oneuntrack()in the$effectto sever SvelteMap dependency — effect now only re-runs on$pagechanges, not on every map mutationhovertotap, skip retries when already disconnectedTest plan
npm run devwithout backend → only ONE "New Chat" session appears/chat→ still only one sessionnpm run check,npm run lint,npm run buildall pass🤖 Generated with Claude Code