From 486b91894c5b5c53f94b7fe9889fccdb7ae5a715 Mon Sep 17 00:00:00 2001 From: sanish chirayath Date: Wed, 26 Nov 2025 19:51:34 +0530 Subject: [PATCH] fix: fetching reflection adds draft state in gRPC (#6218) --- .../components/RequestPane/GrpcQueryUrl/index.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.js b/packages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.js index fb1911e3b..8f2eaa4a4 100644 --- a/packages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.js +++ b/packages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.js @@ -129,11 +129,15 @@ const GrpcQueryUrl = ({ item, collection, handleRun }) => { setProtoFilePath(''); setIsReflectionMode(true); - dispatch(updateRequestProtoPath({ - protoPath: '', - itemUid: item.uid, - collectionUid: collection.uid - })); + // Only update protoPath if it was previously set (to avoid creating unnecessary draft state) + const currentProtoPath = getPropertyFromDraftOrRequest(item, 'request.protoPath', ''); + if (currentProtoPath) { + dispatch(updateRequestProtoPath({ + protoPath: '', + itemUid: item.uid, + collectionUid: collection.uid + })); + } if (methods && methods.length > 0) { toast.success(`Loaded ${methods.length} gRPC methods from reflection`);