Description
ClimateBot currently stores chat history in localStorage and restores it when the page is refreshed. While this improves continuity, there is currently no option for users to clear saved conversations and no retention limit is applied to stored messages.
As a result, chat history can continue growing indefinitely over time, increasing localStorage usage and potentially affecting performance when restoring conversations.
Steps to Reproduce
- Open ClimateBot.
- Send several messages.
- Refresh the page.
- Observe that previous messages are restored.
- Continue chatting and refreshing.
- Notice that there is no option to clear chat history and stored messages continue accumulating.
Expected Behavior
- Users should have a Clear Chat option.
- Stored chat history should have a reasonable retention limit (for example, the most recent 50–100 messages).
- Local storage usage should remain bounded.
Actual Behavior
- Chat history persists after page refresh.
- There is no way to clear stored conversations.
- Message history can grow indefinitely.
Suggested Enhancement
- Add a "Clear Chat" button to remove stored conversations.
- Implement a retention limit before saving messages to localStorage.
- Optionally provide a confirmation prompt before clearing history.
Description
ClimateBot currently stores chat history in localStorage and restores it when the page is refreshed. While this improves continuity, there is currently no option for users to clear saved conversations and no retention limit is applied to stored messages.
As a result, chat history can continue growing indefinitely over time, increasing localStorage usage and potentially affecting performance when restoring conversations.
Steps to Reproduce
Expected Behavior
Actual Behavior
Suggested Enhancement