Skip to content

Commit 356a4cb

Browse files
authored
Merge pull request #8486 from gitbutlerapp/pr-creation-disable-while-loading
feat: add review creation state management
2 parents 05f9dcb + de23d7a commit 356a4cb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/desktop/src/components/ReviewCreation.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,13 @@
134134
});
135135
});
136136
137+
let isCreatingReview = $state<boolean>(false);
137138
const isExecuting = $derived(
138139
branchPublishing.current.isLoading ||
139140
PRNumberUpdate.current.isLoading ||
140141
stackPush.current.isLoading ||
141-
aiIsLoading
142+
aiIsLoading ||
143+
isCreatingReview
142144
);
143145
144146
const canPublishBR = $derived(!!($canPublish && branch?.name && !branch.reviewId));
@@ -191,6 +193,9 @@
191193
if (!branch) return;
192194
if (!$user) return;
193195
196+
isCreatingReview = true;
197+
await tick();
198+
194199
const upstreamBranchName = await pushIfNeeded();
195200
196201
let reviewId: string | undefined;
@@ -229,6 +234,7 @@
229234
prBody.reset();
230235
prTitle.reset();
231236
237+
isCreatingReview = false;
232238
onClose();
233239
}
234240

0 commit comments

Comments
 (0)