From 3d5ac54645efeb5e20d0881b361ec780b94ccd08 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sun, 10 May 2026 20:14:24 +0000 Subject: [PATCH 1/2] fix(sessions): disable message send when offline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the connectivity store reports offline, the session view's PromptInput now disables submit. Previously, pressing Enter offline cleared the editor without actually sending the message — losing the user's text. The task-creation composer already gated submit on `isOnline`; this brings the follow-up-message composer in line. Refs #758 Generated-By: PostHog Code Task-Id: a29b652e-dc35-43cb-b560-f91d52f56732 --- .../renderer/features/sessions/components/SessionView.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/code/src/renderer/features/sessions/components/SessionView.tsx b/apps/code/src/renderer/features/sessions/components/SessionView.tsx index c542a1fcc..888e2db44 100644 --- a/apps/code/src/renderer/features/sessions/components/SessionView.tsx +++ b/apps/code/src/renderer/features/sessions/components/SessionView.tsx @@ -18,6 +18,7 @@ import type { Plan } from "@features/sessions/types"; import { useSettingsStore } from "@features/settings/stores/settingsStore"; import { useIsWorkspaceCloudRun } from "@features/workspace/hooks/useWorkspace"; import { useAutoFocusOnTyping } from "@hooks/useAutoFocusOnTyping"; +import { useConnectivity } from "@hooks/useConnectivity"; import { Pause, Spinner, Warning } from "@phosphor-icons/react"; import { Box, Button, ContextMenu, Flex, Text } from "@radix-ui/themes"; import { toast } from "@renderer/utils/toast"; @@ -131,6 +132,7 @@ export function SessionView({ const thoughtOption = useThoughtLevelConfigOptionForTask(taskId); const adapter = useAdapterForTask(taskId); const { allowBypassPermissions } = useSettingsStore(); + const { isOnline } = useConnectivity(); const currentModeId = modeOption?.currentValue; const handoffInProgress = useSessionForTask(taskId)?.handoffInProgress ?? false; @@ -618,7 +620,9 @@ export function SessionView({ sessionId={sessionId} placeholder="Type a message... @ to mention files, ! for bash mode, / for skills" disabled={!isRunning && !handoffInProgress} - submitDisabledExternal={handoffInProgress} + submitDisabledExternal={ + handoffInProgress || !isOnline + } isLoading={!!isPromptPending} isActiveSession={isActiveSession} taskId={taskId} From df1aa48b433e8f7c72836207313bdedad4b9c2d5 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sun, 10 May 2026 20:35:06 +0000 Subject: [PATCH 2/2] fix(sessions): tooltip explains why send is disabled when offline Without `submitTooltipOverride`, the disabled send button tooltip falls back to "Enter a message" even when text is present, hiding the real reason. Override it to "No internet connection" while offline so the disabled state is self-explanatory. Generated-By: PostHog Code Task-Id: a29b652e-dc35-43cb-b560-f91d52f56732 --- .../src/renderer/features/sessions/components/SessionView.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/code/src/renderer/features/sessions/components/SessionView.tsx b/apps/code/src/renderer/features/sessions/components/SessionView.tsx index 888e2db44..b64c73d5b 100644 --- a/apps/code/src/renderer/features/sessions/components/SessionView.tsx +++ b/apps/code/src/renderer/features/sessions/components/SessionView.tsx @@ -623,6 +623,9 @@ export function SessionView({ submitDisabledExternal={ handoffInProgress || !isOnline } + submitTooltipOverride={ + !isOnline ? "No internet connection" : undefined + } isLoading={!!isPromptPending} isActiveSession={isActiveSession} taskId={taskId}