Skip to content

[ENHANCEMENT]Chat History Not Persisting After Page Reload #1617

@Aarya-Chaudhari

Description

@Aarya-Chaudhari

⚙️ Current Behavior

User sends messages in the chat
Conversation appears normally during the session
After refreshing or reopening the page, the chat history is cleared

🚀 Proposed Improvement

Store chat messages in localStorage, sessionStorage, or a backend session and reload them on page initialization. Implement a message state management system that saves each user query and AI response, then dynamically re-renders the conversation when the page loads to ensure continuity.

🧩 Possible Implementation

Use localStorage to store chat messages and reload them on page load.
Save each user and bot message to localStorage when sent
On page load, fetch stored messages and render them in the chat UI
Optionally add a “Clear Chat” button to reset history

✅ Checklist

  • I’ve reviewed existing issues to ensure this isn’t a duplicate.
  • I’ve explained how this improves performance or readability.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions