Skip to content

Conversation

@Omm2005
Copy link
Contributor

@Omm2005 Omm2005 commented Nov 4, 2025

This pull request introduces significant improvements to how new conversations (chats) and drafts are managed in the chat application. The changes streamline the process of starting, creating, and updating conversations, especially around draft handling, and ensure consistent state management across components. The most important changes are grouped below by theme.

Conversation and Draft Management Enhancements:

  • Refactored the logic for starting a new conversation into a dedicated startNewConversation callback, which handles draft cleanup, initializes conversation state, and updates local storage and navigation. This replaces previous scattered logic and ensures only one draft conversation exists at a time. [1] [2] [3] [4]
  • Added new callbacks and state (draftConversationId, removeDraftConversation, handleCreateConversation, handleUpdateRecipients) to robustly manage draft conversations, recipient updates, and creation of new chats from both the main app and child components. [1] [2] [3] [4] [5] [6] [7]
  • Ensured that when a message is sent, the conversation is marked as not a draft and the draft conversation state is cleared. [1] [2]

Component Interface and Prop Updates:

  • Updated ChatArea and related components to accept new props for starting new conversations, creating conversations, and updating recipients, enabling better coordination between parent and child components regarding conversation state. [1] [2] [3] [4] [5]

UI Consistency and Navigation:

  • Updated navigation and "New Chat" actions throughout the app to use the new startNewConversation logic, ensuring consistent behavior whether starting a chat from the sidebar, chat area, or chat header. [1] [2] [3] [4]
  • In ChatHeader, replaced the "New Chat" link with a button that uses the new conversation creation logic, clearing the UI state and navigating to the new chat. [1] [2]

Code Quality and Minor Improvements:

  • Improved reaction handling logic for messages by clarifying and formatting conditions for updating reactions. [1] [2]
  • Introduced a resolvedConversationId variable to simplify prop passing and draft handling in the main app component. [1] [2]

These changes collectively make the conversation experience more robust, intuitive, and maintainable.
[Image]
Screenshot 2025-11-04 at 11 37 36 AM

@vercel
Copy link

vercel bot commented Nov 4, 2025

@Omm2005 is attempting to deploy a commit to the supermemory Team on Vercel.

A member of the Team first needs to authorize it.

@Dhravya Dhravya merged commit 7394f2b into supermemoryai:main Nov 7, 2025
0 of 2 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