mirror of
https://github.com/Kong/insomnia.git
synced 2026-09-17 08:59:33 -04:00
fix: use unique id for remote files in command search to avoid the list jammed (#10461)
## Background - Cloud Sync workspace uses local workspace id as its id, which may duplicate with the workspace id in the local db. (Clone a github repo -> convert to cloud sync -> clone it again) ## Changes - Use team project id + project id as the unique id
This commit is contained in:
1 parent
0c2559df36
commit
d285404f50
1 file changed
+3
-1
@@ -49,7 +49,9 @@ export async function clientLoader(_args: Route.ClientLoaderArgs) {
|
||||
const files = remoteFiles.map(file => {
|
||||
const parentProject = projects.find(project => project.remoteId === file.teamProjectId);
|
||||
return {
|
||||
id: file.id,
|
||||
// Use a composite ID to ensure uniqueness. Otherwise, some dirty remote files might collide with each other or with local db.
|
||||
id: `${file.teamProjectId}:${file.id}`,
|
||||
workspaceId: file.id,
|
||||
url: href('/organization/:organizationId', {
|
||||
organizationId: file.organizationId,
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user