Skip to content

Feature/accidental conversation deletion - #1762

Merged
mdmohsin7 merged 6 commits into
BasedHardware:mainfrom
cscoderr:feature/accidental-conversation-deletion
Mar 4, 2025
Merged

mdmohsin7 merged 6 commits into
BasedHardware:mainfrom
cscoderr:feature/accidental-conversation-deletion

Conversation

@cscoderr

@cscoderr cscoderr commented Feb 7, 2025 •

Copy link
Copy Markdown
Contributor

This PR resolve #1714

Key Features:

  1. Confirmation Dialog – Users now see a confirmation dialog when swiping to delete a conversation.
  2. Undo Deletion – A success Snackbar with an Undo button allows users to restore deleted conversations within 3 seconds.

Video Demo:

Screen.Recording.2025-02-07.at.4.28.35.AM.mp4

@mdmohsin7
mdmohsin7 self-requested a review February 9, 2025 12:23

@mdmohsin7 mdmohsin7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Can we have the confirmation dialog with a do not ask me again checkbox or something similar? There's a confirmation dialog widget already which you can use

@cscoderr

cscoderr commented Feb 10, 2025 •

Copy link
Copy Markdown
Contributor Author

Okay. Thank you i will add it

@cscoderr

cscoderr commented Feb 10, 2025 •

Copy link
Copy Markdown
Contributor Author

This is the updated video:

Screen.Recording.2025-02-10.at.2.45.03.AM.mp4

@beastoin

Copy link
Copy Markdown
Collaborator

1/ why do we need both, a confirmation and an undo toast ?
2/ a piece of feedback i received from our the user is that, in the previous version, the undo toast is too annoying when they deleted their memories, e.g. 10-20 memories at a time. how did you solve that problem?

@cscoderr

@cscoderr

Copy link
Copy Markdown
Contributor Author
  1. I implemented both the undo and confirmation features as requested in the issue
  2. The undo toast can be removed, leaving only the confirmation dialog. Another possible solution is detecting batch deletions - if a toast is already displayed and the user performs another delete action within its duration (plus an additional two seconds), no new undo toast will be shown

@beastoin

@mdmohsin7
mdmohsin7 self-requested a review February 11, 2025 12:17

@mdmohsin7 mdmohsin7 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The confirmation does not look consistent. And I think the dialog should be shown if the user clicks on don't show again and also cancels the operation

ScreenRecording_02-11-2025.17-46-12_1.1.mp4

@cscoderr

cscoderr commented Feb 11, 2025 •

Copy link
Copy Markdown
Contributor Author

Okay i will look into it

@cscoderr

Copy link
Copy Markdown
Contributor Author

@mdmohsin7 Can you test again now

@beastoin

beastoin commented Feb 12, 2025 •

Copy link
Copy Markdown
Collaborator
  1. ✅ (yo, i got the answer why, not mean i agreed with the solution)
  2. what is your best solution to solve the feedback: a piece of feedback i received from our the user is that, in the previous version, the undo toast is too annoying when they deleted their memories, e.g. 10-20 memories at a time. how did you solve that problem?.

no rush, good thing take time.

but please be noticed that i will clean the PR weekly, ofc, you can reopen it anytime.

@beastoin

Copy link
Copy Markdown
Collaborator

@cscoderr ^

@cscoderr

Copy link
Copy Markdown
Contributor Author

I'd addressed the issue by introducing a settings option where users can enable or disable the undo snackbar. Additionally, I'd also proposed a 'Recently Deleted' section/page, where deleted conversations can be restored within 7-14 days
@beastoin

@beastoin

Copy link
Copy Markdown
Collaborator

@mdmohsin7 this is a simple task and i trust your ability. feel free to merge when you feel that meets our standard.

@mdmohsin7

Copy link
Copy Markdown
Member

Hi @cscoderr, any update on the feedback @beastoin mentioned? When memories are deleted one by one continuously, the snackbar becomes too annoying

Perhaps the easiest way is to just not show the snackbar repeatedly if a user is deleting multiple memories? Because they already have a confirmation dialog before

@cscoderr

Copy link
Copy Markdown
Contributor Author

Hello @mdmohsin7, @beastoin asked for the best way to solve the problem, and I provided some suggestions, but I haven't received a response from him yet. The issue is that batch deletion (deleting multiple conversations at once, like 10) isn't available for conversations, which would have made things easier. However, an alternative approach is to detect deletions within a specified timeframe. If another conversation is deleted within that timeframe, the timer is extended, preventing the snackbar from appearing unless a deletion occurs outside the specified period.

@mdmohsin7

Copy link
Copy Markdown
Member

Can you pls implement the best possible solution you think is without resulting in any UX issues @cscoderr? And share a video of it

@nikhilagarwal204

Copy link
Copy Markdown

I am a daily user of Omi, and have been facing this accidental delete issue everyday, please merge and release this feature soon @beastoin !
Also from user point of view, once I click 'don't show again' the repetitions of snackbar showing undo will be resolved since it won't be asked anymore, btw this solution looks really good: #1762 (comment), Great work @cscoderr , let me know if you need any help too, lessgoo.

@cscoderr

cscoderr commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

@mdmohsin7 I have completely removed the undo snackbar. I think it would be better if there were a settings page where the user could toggle its visibility along with other visibility settings.

@mdmohsin7

Copy link
Copy Markdown
Member

lgtm @cscoderr, be prepared to fix issues (if any arises) in future related to this functionality

@mdmohsin7
mdmohsin7 merged commit cec6de3 into BasedHardware:main Mar 4, 2025
@mdmohsin7

Copy link
Copy Markdown
Member

Also pls make sure to set line length to 120 in your editor settings for future PRs

@cscoderr

cscoderr commented Mar 4, 2025

Copy link
Copy Markdown
Contributor Author

Okay thank you

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
This PR resolve BasedHardware#1714 

# Key Features:
1. Confirmation Dialog – Users now see a confirmation dialog when
swiping to delete a conversation.
2. Undo Deletion – A success Snackbar with an Undo button allows users
to restore deleted conversations within 3 seconds.

Video Demo: 


https://github.com/user-attachments/assets/a7ec7e22-4015-4ce8-9298-4cc472a219ce
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.

Accidental Deletion of Conversations Due to Swipe Gesture

4 participants