Dwindi Ramadhana 23a34b3035 fix: session history not loading + new session showing stale messages
Bug 1 - Session opens with empty messages:
- loadChatHistory effect was re-running on every currentSessionId change,
  racing with openSessionById and overwriting loaded messages
- Removed currentSessionId from effect dependencies (only runs on mount/postId)
- Added recovery: if session has 0 messages but has post_id, try fetching
  from the post-based conversation endpoint as fallback

Bug 2 - Start New Session shows old messages:
- startNewConversation now sets isHydratingSessionRef=true before changing
  session state, preventing the persistence effect from saving stale data
- Fully resets: messages, plan, agentMode, keyword suggestions, providerInfo
- loadPostSessions called AFTER state reset to avoid stale renders

Also fixed:
- Legacy fallback now only fires when no session was resolved at all
  (prevents loading old post_meta data over session data)
2026-06-06 05:14:34 +07:00
2026-06-06 00:29:10 +07:00
2026-01-28 00:26:00 +07:00
2026-01-28 00:26:00 +07:00
2026-01-28 00:26:00 +07:00
Description
No description provided
45 MiB
Languages
PHP 60.5%
JavaScript 25.9%
CSS 13.1%
Shell 0.5%