Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleting vs. closing chats #62

Closed
pmeier opened this issue Oct 5, 2023 · 3 comments · Fixed by #67
Closed

deleting vs. closing chats #62

pmeier opened this issue Oct 5, 2023 · 3 comments · Fixed by #67
Assignees

Comments

@pmeier
Copy link
Member

pmeier commented Oct 5, 2023

We had a longer discussion about this in our latest sync. Here is what we currently have:

  • On the backend it is currently impossible to delete a chat without accessing the database manually. The only option is to close it

    ragna/ragna/core/_rag.py

    Lines 245 to 249 in 03721c7

    async def close(self):
    self._state.close_chat(id=self.id, user=self._user)
    self._closed = True
    return self

    ragna/ragna/_api.py

    Lines 234 to 237 in 03721c7

    @app.post("/chat/{id}/close")
    @process_ragna_exception
    async def close_chat(chat: ChatDependency) -> ChatModel:
    return ChatModel.from_chat(await chat.close())

    This was implemented with a production use case in mind.

  • On the UI we want to give users the ability to delete chats and thus to unclutter their view.

This brings us to the dilemma: should we tell the user that a chat is deleted and subsequently remove it from their view when we actually never do so?

Couple of options:

  1. 😄 Deleting for the user, but keeping it in the database, i.e. the current implementation, is fine.
  2. 🎉 We could have two buttons on the UI for deleting and archiving. The former would actually delete the chat, while the latter would remove it from the user view, but keep the data in the database.
  3. ❤️ We could have a popup for the user when clicking the delete button telling them that the data is not really deleted and may be accessed by an admin anyway.
  4. 🚀 Delete means delete and thus if a user clicks that, we should remove the data from the database.
  5. 👀 Something else. Please comment.

Let's do a quick emoji poll. Multiple votes per person. Option with the most votes wins.

@pavithraes pavithraes added the type: RFD ⚖️ Decision making label Oct 5, 2023
@pavithraes
Copy link
Member

🎉 We could have two buttons on the UI for deleting and archiving. The former would actually delete the chat, while the latter would remove it from the user view, but keep the data in the database.

If we have this option, as a user, I may also expect a way to "View+Delete archived chats" -- which will involve more design/development. That's why I'm not voting for this option.

@dharhas
Copy link
Member

dharhas commented Oct 6, 2023

I'm aligned with Pavitra's reasoning for now. "Delete means delete" and doing anything else will require more UI work. But I'd like to make sure we capture the other use case somewhere. i.e. I do see Philip's point that some enterprise users may want to persist the data in the backend for other reasons and it may be something worth implementing in the future.

Maybe the presence of this issue is sufficient OR we could add something to an FAQ.

@pmeier
Copy link
Member Author

pmeier commented Oct 6, 2023

Closing the vote with 4. being the clear favorite:

image

@pmeier pmeier self-assigned this Oct 6, 2023
@pmeier pmeier removed the type: RFD ⚖️ Decision making label Oct 6, 2023
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 a pull request may close this issue.

3 participants