mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[PR #5626] [MERGED] fix: remove ref_id field before collection exports and address race conditions #5290
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5626
Author: @nivedin
Created: 11/28/2025
Status: ✅ Merged
Merged: 12/3/2025
Merged by: @jamesgeorge007
Base:
patch← Head:fix/export-doc-coll-bug📝 Commits (10+)
ededb77chore: remove _ref_id when exporting collections473ec19fix: race condition when fetching user docs bug3b9dce4chore: update helper commentf35404efix: race condition bug while fetching published docsf338addchore: fix test1a755fdchore: remove console logebb7e68chore: remove id while importing collectiond500c6cfix: add description in platform importa79525dchore: cleanupa58a078chore: cleanup📊 Changes
12 files changed (+167 additions, -35 deletions)
View changed files
📝
packages/hoppscotch-common/src/components/collections/ImportExport.vue(+17 -2)📝
packages/hoppscotch-common/src/components/collections/index.vue(+7 -2)📝
packages/hoppscotch-common/src/helpers/backend/helpers.ts(+2 -1)📝
packages/hoppscotch-common/src/helpers/backend/queries/PublishedDocs.ts(+1 -1)📝
packages/hoppscotch-common/src/helpers/collection/collection.ts(+14 -10)📝
packages/hoppscotch-common/src/helpers/import-export/export/gqlCollections.ts(+2 -1)📝
packages/hoppscotch-common/src/helpers/import-export/export/index.ts(+7 -0)📝
packages/hoppscotch-common/src/helpers/import-export/export/myCollections.ts(+2 -1)📝
packages/hoppscotch-common/src/helpers/import-export/import/index.ts(+27 -0)📝
packages/hoppscotch-common/src/services/__tests__/workspace.service.spec.ts(+52 -1)📝
packages/hoppscotch-common/src/services/workspace.service.ts(+33 -15)📝
packages/hoppscotch-selfhost-web/src/platform/collections/web/import.ts(+3 -1)📄 Description
Closes FE-1074 FE-1075
This PR fixes two issues:
This issue occurs only in the cloud instance, where the initial page load causes the UserPublishedDocsList call to fail because the authorization is passed as null.
While exporting a collection, the _ref_id, which should be unique, was not being stripped. It is now removed before exporting.
While importing a collection the id is removed and a new _ref_id is added.
What's changed
Notes to reviewers
Summary by cubic
Removes _ref_id from exported collections and fixes a race condition that caused UserPublishedDocsList to fail on first load when auth was null. Addresses FE-1074 and FE-1075.
_ref_idin personal and team exports; sanitize personal imports by dropping legacyid/_ref_idand converting to the new format.currentUseralong with workspace, wait for login to confirm, and only fetch user/team published docs when authenticated.Written for commit
cad9e6620d. Summary will update automatically on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.