Skip to content

Add Chat Archiving Functionality #467

@RostyslavManko

Description

@RostyslavManko

Description

To improve chat management and organization, we need to add functionality for users to archive specific chats. This feature should allow users to archive a chat by hovering over the chat name on the sidebar, revealing three dots that represent options. When clicked, a dropdown menu should appear, including an archive icon and text "Archive," along with the existing options to rename and delete with their respective icons. When a user clicks on the archive option, the chat should disappear from the sidebar. To view archived chats, we need to add a button in the settings, under the general tab, with the text "Archived chats" and a button next to it labeled "Manage." When the user clicks on the button, a popup should display the archived chats, including the name of the chat, the date it was created, and two options to unarchive or delete the chat. To store archived chats, we will need to use Supabase and create a new table. When a user clicks on the unarchive option, the chat should reappear in the sidebar, showing up first among all chats by updating the date. Additionally, we should add text "Archive all chats" and a button next to it labeled "Archive all," which will archive all chats and remove them from the sidebar.

Objective

Our goal is to provide users with better chat management and organization by allowing them to archive specific chats or all chats at once, improving their overall experience.

Actions and Considerations (ACC)

  1. Create New Table in Supabase:

    • Create a new table in Supabase to store archived chats.
  2. Implement Chat Archiving Option:

    • Add an archive option in the chat options dropdown menu, accessible by hovering over the chat name on the sidebar.
    • Implement the functionality to archive the chat when the user clicks on the archive option.
  3. Add Archived Chats Management Button in Settings:

    • Add a button in the settings, under the general tab, with the text "Archived chats" and a button next to it labeled "Manage."
    • Implement the functionality to display a popup with archived chats when the user clicks on the "Manage" button.
  4. Implement Unarchive and Delete Options for Archived Chats:

    • Add unarchive and delete options for each archived chat in the popup.
    • Implement the functionality to unarchive or delete a chat when the user clicks on the respective option.
  5. Add "Archive All Chats" Option:

    • Add text "Archive all chats" and a button next to it labeled "Archive all" in the settings or sidebar.
    • Implement the functionality to archive all chats and remove them from the sidebar when the user clicks on the "Archive all" button.
  6. Testing and Quality Assurance:

    • Conduct thorough testing to ensure that the chat archiving functionality works as expected, including archiving, unarchiving, and deleting chats.
    • Test the feature in different scenarios and environments to guarantee robustness and reliability.
    • Verify that the changes work correctly both locally and on Vercel preview.

Expected Outcomes

  • Improved chat management and organization, as users can now archive specific chats or all chats at once.
  • Enhanced user experience, as users can better manage their chats by archiving and unarchiving them as needed.
  • Adherence to best practices for chat management, user interface design, and data management using Supabase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions