From d285404f50ee18aecae9aa5c4fa2c2c35f9cfdcb Mon Sep 17 00:00:00 2001 From: Bingbing Date: Tue, 1 Sep 2026 15:24:20 +0800 Subject: [PATCH] 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 --- packages/insomnia/src/routes/remote-files.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/insomnia/src/routes/remote-files.tsx b/packages/insomnia/src/routes/remote-files.tsx index 2b2acda035..c593bc7796 100644 --- a/packages/insomnia/src/routes/remote-files.tsx +++ b/packages/insomnia/src/routes/remote-files.tsx @@ -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, }),