Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 7, 2026

Summary

  • Fix bug where clicking Home button in Addie chat sidebar cleared the dashboard content
  • Add clearChatMessages() helper to selectively remove chat messages without destroying static elements
  • Ensure home dashboard hides properly when starting a chat

Root Cause

The code was using messagesContainer.innerHTML = '' which destroyed the addieHomeContainer element (a child of messagesContainer). When trying to show home content, the elements no longer existed.

Test plan

  • Click "Ask Addie" → dashboard shows
  • Click "Home" in sidebar → dashboard remains visible
  • Send a message → dashboard hides, chat shows
  • Click "Home" after chatting → dashboard returns
  • Click "New Chat" → dashboard returns
  • All unit tests pass

🤖 Generated with Claude Code

The Home button in the Addie chat sidebar was clearing the entire
messagesContainer innerHTML, which destroyed the addieHomeContainer
element that lives inside it. After clearing, trying to show the home
content failed silently because the elements no longer existed.

Changes:
- Add clearChatMessages() helper that selectively removes only .message
  elements instead of wiping the entire container
- Update switchToHome, switchToConversation, and startNewChat to use
  the new helper
- Add proper visibility toggling for addieHomeContainer in addMessage()
  and createStreamingMessage() to ensure home content hides when
  chatting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bokelley bokelley merged commit 8bc3e59 into main Jan 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants