Skip to content

New Chat button clears current session instead of preserving it as a thread #701

Description

@shogun444

Describe the bug

Clicking "New Chat" button causes the current chat session to disappear entirely. The conversation is not saved as a previous thread and becomes inaccessible.

To Reproduce

  1. Fresh scaffold: npx @openuidev/cli@latest create
  2. Set up .env with Ollama local endpoint
  3. Send a few messages in the chat
  4. Click the "New Chat" button in the UI
  5. The previous session disappears — no thread in sidebar, no way to get back

Expected behavior

Previous session should be saved as a thread in the sidebar, allowing users to switch between multiple conversations like a standard chat app.

Screenshots

Before clicking New Chat : Normal chat with AI-generated UI components visible on left

Before

After clicking New Chat : Same session components on left panel disappeared after clicking New Chat

After

Desktop

  • OS: Windows 11
  • Browser: (tera browser)
  • Version: (browser version)

Additional context

Confirmed on both fresh CLI scaffold and upgraded project. Likely related to default in-memory storage in ChatProvider not persisting threads on session switch.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions