[GH-ISSUE #1455] Deleting history UI bug #471

Closed
opened 2026-03-16 15:33:10 +03:00 by kerem · 1 comment
Owner

Originally created by @IshaGupta18 on GitHub (Jan 31, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1455

Describe the bug
History is deleted on clicking on clear all, but change appears only after refreshing the page ie doesn't happen asynchronously and the page has to be updated to see the cleared history.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://hoppscotch.io/
  2. Make a request
  3. Click on "Clear All" in the history tab
  4. Notification comes that "History Deleted", but the history tab is not cleared.

Expected behavior
A clear and concise description of what you expected to happen.
The history tab should be cleared as soon as "Clear All" is clicked (asynchronously).

Screenshots
image

Originally created by @IshaGupta18 on GitHub (Jan 31, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1455 **Describe the bug** History is deleted on clicking on clear all, but change appears only after refreshing the page ie doesn't happen asynchronously and the page has to be updated to see the cleared history. **To Reproduce** Steps to reproduce the behavior: 1. Go to https://hoppscotch.io/ 2. Make a request 3. Click on "Clear All" in the history tab 4. Notification comes that "History Deleted", but the history tab is not cleared. **Expected behavior** A clear and concise description of what you expected to happen. The history tab should be cleared as soon as "Clear All" is clicked (asynchronously). **Screenshots** ![image](https://user-images.githubusercontent.com/40794215/106376523-2757d080-63bc-11eb-94b6-61d12a6dfce8.png)
kerem 2026-03-16 15:33:10 +03:00
Author
Owner

@liyasthomas commented on GitHub (Jan 31, 2021):

Ahh, this looks like a minor UX delay. I mean, yes UI should be updated instantaneously.

As of now, what we're doing is - when you click "Clear All", we loop every entry in history and delete it. This is the recommended way on deleting all collection entries in Firestore. We can show an instantaneous response here by not waiting for Firebase micro-service to do it's job - but again it'll cause another serious issue. If any error happens with Firebase delete operations - user is left with an incorrect UI response.

<!-- gh-comment-id:770337385 --> @liyasthomas commented on GitHub (Jan 31, 2021): Ahh, this looks like a _minor_ UX delay. I mean, yes UI should be updated instantaneously. As of now, what we're doing is - when you click "Clear All", [we loop every entry in history and delete it](https://github.com/hoppscotch/hoppscotch/blob/2b2c968a97b816bc1eef03b698a53c479b9eac03/helpers/fb.js#L231-L238). This is the [recommended way on deleting all collection entries in Firestore](https://stackoverflow.com/questions/53089517/how-to-delete-all-documents-in-collection-in-firestore-with-flutter). We can show an instantaneous response here by not waiting for Firebase micro-service to do it's job - but again it'll cause another _serious_ issue. If any error happens with Firebase delete operations - user is left with an incorrect UI response.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#471
No description provided.