Skip to content

Commit b61c3ba

Browse files
AXON-1938 RovoDev: Fixed MCP permission race condition - users can now type their prompts while MCP permission dialogs are displayed. The send button is disabled during MCP acceptance, but the input remains editable to prevent loss of user input. (#1654)
* - **RovoDev**: Fixed MCP permission race condition - users can now type their prompts while MCP permission dialogs are displayed. The send button is disabled during MCP acceptance, but the input remains editable to prevent loss of user input. * PR Comments * PR comments * changelog typo --------- Co-authored-by: teg-atlassian <tzewdie@atlassian.com>
1 parent 949367e commit b61c3ba

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
## What's new in 4.0.21
1111

12-
### Bug fixes
12+
### Bug Fixes
1313

14+
- **RovoDev**: Fixed MCP permission race condition - users can now type their prompts while MCP permission dialogs are displayed. The send button is disabled during MCP acceptance, but the input remains editable to prevent loss of user input.
1415
- Fixed issue description losing line breaks and formatting in edit mode after save (HTML-to-ADF conversion now preserves line breaks as hardBreak nodes)
1516

1617
## What's new in 4.0.20
@@ -31,13 +32,7 @@
3132
- Jira Data Center: fixed errors when adding or updating comments (comment body is now sent as string for DC, ADF for Cloud)
3233
- Jira DC: fixed updating issue description (description is sent as WikiMarkup string for DC, ADF for Cloud)
3334
- Jira DC: user mentions in comments and description now show the correct username instead of @unknown
34-
35-
### Bug Fixes
36-
3735
- Fixed Rovo Dev UI crashes when markdown content fails to parse
38-
39-
### Bug Fixes
40-
4136
- Improved error messages when git user.name or user.email is not configured, providing helpful setup instructions
4237

4338
## What's new in 4.0.19

src/rovo-dev/ui/prompt-box/prompt-input/PromptInput.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import {
3333
type NonDisabledState = Exclude<State, DisabledState>;
3434

3535
interface PromptInputBoxProps {
36-
disabled?: boolean;
36+
disableSendButton?: boolean;
37+
readOnly?: boolean;
3738
hideButtons?: boolean;
3839
currentState: NonDisabledState;
3940
isDeepPlanEnabled: boolean;
@@ -116,7 +117,8 @@ function createEditor(setIsEmpty: (isEmpty: boolean) => void) {
116117
}
117118

118119
export const PromptInputBox: React.FC<PromptInputBoxProps> = ({
119-
disabled,
120+
disableSendButton,
121+
readOnly,
120122
currentState,
121123
isDeepPlanEnabled,
122124
isYoloModeEnabled,
@@ -226,10 +228,10 @@ export const PromptInputBox: React.FC<PromptInputBoxProps> = ({
226228
(currentState.state === 'Initializing' && currentState.isPromptPending);
227229

228230
editor.updateOptions({
229-
readOnly: disabled,
231+
readOnly: readOnly,
230232
placeholder: getTextAreaPlaceholder(isGeneratingResponse, currentState),
231233
});
232-
}, [currentState, editor, disabled]);
234+
}, [currentState, editor, readOnly]);
233235

234236
// Focus the editor when it becomes visible in the viewport - helps with opening Rovo Dev panel already focused
235237
React.useEffect(() => {
@@ -404,7 +406,7 @@ export const PromptInputBox: React.FC<PromptInputBoxProps> = ({
404406
id="bordered-button"
405407
aria-label="stop"
406408
onClick={() => onCancel()}
407-
disabled={disabled || currentState.state === 'CancellingResponse'}
409+
disabled={disableSendButton || currentState.state === 'CancellingResponse'}
408410
>
409411
<VideoStopOverlayIcon color={token('color.icon.danger')} label="Stop" />
410412
</button>
@@ -414,7 +416,7 @@ export const PromptInputBox: React.FC<PromptInputBoxProps> = ({
414416
className="prompt-button-primary"
415417
aria-label="send"
416418
onClick={() => handleSend()}
417-
disabled={disabled || !isWaitingForPrompt || isEmpty}
419+
disabled={disableSendButton || !isWaitingForPrompt || isEmpty}
418420
>
419421
<SendIcon label="Send prompt" />
420422
</button>

src/rovo-dev/ui/rovoDevView.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,10 @@ const RovoDevView: React.FC = () => {
10371037
});
10381038
}, [postMessage, isFullContextModeToggled]);
10391039

1040-
const hidePromptBox =
1041-
currentState.state === 'Disabled' ||
1040+
const hidePromptBox = currentState.state === 'Disabled';
1041+
1042+
const disableSendButton =
1043+
currentState.state === 'ProcessTerminated' ||
10421044
(currentState.state === 'Initializing' && currentState.subState === 'MCPAcceptance');
10431045

10441046
return (
@@ -1173,7 +1175,8 @@ const RovoDevView: React.FC = () => {
11731175
openJira={openJira}
11741176
/>
11751177
<PromptInputBox
1176-
disabled={currentState.state === 'ProcessTerminated'}
1178+
disableSendButton={disableSendButton}
1179+
readOnly={currentState.state === 'ProcessTerminated'}
11771180
currentState={currentState}
11781181
isDeepPlanEnabled={isDeepPlanToggled}
11791182
isYoloModeEnabled={isYoloModeToggled}

0 commit comments

Comments
 (0)