[PR #2971] [MERGED] fix: reset save context issue on delete collection or folder of team #4166

Closed
opened 2026-03-17 01:43:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2971
Author: @anwarulislam
Created: 4/6/2023
Status: Merged
Merged: 4/6/2023
Merged by: @AndrewBastin

Base: stagingHead: fix/request-context-on-delete


📝 Commits (1)

  • 0b6ec8f fix: reset save context issue on delete collection or folder of team

📊 Changes

3 files changed (+3473 additions, -3183 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/collections/index.vue (+9 -4)
📝 packages/hoppscotch-common/src/helpers/collection/collection.ts (+30 -0)
📝 pnpm-lock.yaml (+3434 -3179)

📄 Description

🤖 Generated by Copilot at fc6c081

Summary

🗑️🔄🚀

Fixed a bug where deleting requests or folders from team collections would not update the save status of open tabs. Added a resetTeamRequestsContext function and used it in index.vue and collection.ts.

When the team collections fall
We resetTeamRequestsContext for all
No more isDirty flags to haunt our dreams
We delete with async and .then schemes

Walkthrough

  • Import and define resetTeamRequestsContext function to clear save context of deleted team requests (link, link)
  • Make removeTeamCollectionOrFolder function async and use pipe and TE.match to handle deletion result (link)
  • Call resetTeamRequestsContext function after deleting a team collection or folder in index.vue (link, link)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/2971 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 4/6/2023 **Status:** ✅ Merged **Merged:** 4/6/2023 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `staging` ← **Head:** `fix/request-context-on-delete` --- ### 📝 Commits (1) - [`0b6ec8f`](https://github.com/hoppscotch/hoppscotch/commit/0b6ec8fef904219ba26c03b814dbf0a9770e3a4b) fix: reset save context issue on delete collection or folder of team ### 📊 Changes **3 files changed** (+3473 additions, -3183 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/collections/index.vue` (+9 -4) 📝 `packages/hoppscotch-common/src/helpers/collection/collection.ts` (+30 -0) 📝 `pnpm-lock.yaml` (+3434 -3179) </details> ### 📄 Description <!-- copilot:all --> ### <samp>🤖 Generated by Copilot at fc6c081</samp> ### Summary 🗑️🔄🚀 <!-- 1. 🗑️ - This emoji represents deleting something, which is the main action performed by the modified functions. It can also imply clearing or removing unwanted data, which is what the `resetTeamRequestsContext` function does. 2. 🔄 - This emoji represents resetting or refreshing something, which is the effect of the `resetTeamRequestsContext` function on the tabs' save context. It can also imply updating or changing the state of something, which is what the isDirty flag does. 3. 🚀 - This emoji represents making something faster or more efficient, which is the potential benefit of using async functions and `.then` method to handle asynchronous operations. It can also imply launching or deploying something, which is what the team collections feature does. --> Fixed a bug where deleting requests or folders from team collections would not update the save status of open tabs. Added a `resetTeamRequestsContext` function and used it in `index.vue` and `collection.ts`. > _When the team collections fall_ > _We `resetTeamRequestsContext` for all_ > _No more `isDirty` flags to haunt our dreams_ > _We delete with async and `.then` schemes_ ### Walkthrough * Import and define `resetTeamRequestsContext` function to clear save context of deleted team requests ([link](https://github.com/hoppscotch/hoppscotch/pull/2971/files?diff=unified&w=0#diff-edf8dce0a00e918e2b72877b47e3d34778b74bce75da68844adf513ba534e838R4-R6), [link](https://github.com/hoppscotch/hoppscotch/pull/2971/files?diff=unified&w=0#diff-edf8dce0a00e918e2b72877b47e3d34778b74bce75da68844adf513ba534e838R121-R147)) * Make `removeTeamCollectionOrFolder` function async and use `pipe` and `TE.match` to handle deletion result ([link](https://github.com/hoppscotch/hoppscotch/pull/2971/files?diff=unified&w=0#diff-bea4d3e00e3d1167aa2228f3ce3d9a582dc3a006e0753c3806c6e8f1ec0d4080L993-R997)) * Call `resetTeamRequestsContext` function after deleting a team collection or folder in `index.vue` ([link](https://github.com/hoppscotch/hoppscotch/pull/2971/files?diff=unified&w=0#diff-bea4d3e00e3d1167aa2228f3ce3d9a582dc3a006e0753c3806c6e8f1ec0d4080L1050-R1053), [link](https://github.com/hoppscotch/hoppscotch/pull/2971/files?diff=unified&w=0#diff-bea4d3e00e3d1167aa2228f3ce3d9a582dc3a006e0753c3806c6e8f1ec0d4080L1102-R1107)) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:43:44 +03:00
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#4166
No description provided.