Skip to content

Commit 0fa7607

Browse files
t3dotggclaude
andcommitted
fix(web): block send paths while environment is disconnected
Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent e338f76 commit 0fa7607

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
11591159
isSendBusy ||
11601160
isConnecting ||
11611161
projectSelectionRequired ||
1162+
environmentUnavailable !== null ||
11621163
!composerSendState.hasSendableContent;
11631164
const collapsedComposerPrimaryActionLabel = "Send message";
11641165
const showMobilePendingAnswerActions =
@@ -1697,7 +1698,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
16971698

16981699
const shouldBlurMobileComposerOnSubmit = useCallback(() => {
16991700
if (!isMobileViewport) return false;
1700-
if (isSendBusy || isConnecting || phase === "running") return false;
1701+
if (isSendBusy || isConnecting || environmentUnavailable !== null || phase === "running") {
1702+
return false;
1703+
}
17011704
if (activePendingProgress) {
17021705
return activePendingProgress.isLastQuestion && Boolean(activePendingResolvedAnswers);
17031706
}
@@ -1706,6 +1709,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
17061709
activePendingProgress,
17071710
activePendingResolvedAnswers,
17081711
composerSendState.hasSendableContent,
1712+
environmentUnavailable,
17091713
isConnecting,
17101714
isMobileViewport,
17111715
isSendBusy,

0 commit comments

Comments
 (0)