Skip to content

Commit 4b9916a

Browse files
authored
Merge branch 'master' into edward/war-7378-use-forkpoint-commit
2 parents a906f14 + 7e189ea commit 4b9916a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

app/src/code_review/git_dialog/commit.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use crate::{
2626
user_facing_git_error, GitDialog, GitDialogAction, GitDialogEvent, GitDialogMode,
2727
},
2828
editor::{
29-
EditorOptions, EditorView, Event as EditorEvent, PropagateAndNoOpNavigationKeys,
30-
TextOptions,
29+
EditorOptions, EditorView, Event as EditorEvent, InteractionState,
30+
PropagateAndNoOpNavigationKeys, TextOptions,
3131
},
3232
server::server_api::ServerApiProvider,
3333
ui_components::icons::Icon,
@@ -366,12 +366,18 @@ pub(super) fn start_confirm(me: &mut GitDialog, ctx: &mut ViewContext<GitDialog>
366366
let intent = state.intent;
367367
let include_unstaged = state.include_unstaged;
368368
let ai_autogen_enabled = should_send_git_ops_ai_request(ctx);
369+
let message_editor = state.message_editor.clone();
369370
let repo_path = me.repo_path().clone();
370371
let branch_name = me.branch_name().to_string();
371372
let parent_branch = me.parent_branch_name.clone();
372373

373374
me.set_loading(LOADING_LABEL, ctx);
374375

376+
// Lock the commit message editor while the async op is in flight.
377+
message_editor.update(ctx, |editor, ctx| {
378+
editor.set_interaction_state(InteractionState::Disabled, ctx);
379+
});
380+
375381
let code_review_ai = if ai_autogen_enabled {
376382
Some(ServerApiProvider::handle(ctx).read(ctx, |p, _| p.get_ai_client()))
377383
} else {

0 commit comments

Comments
 (0)