authorgravatar for zied.essaber@gmail.comInaya Yousfi <zied.essaber@gmail.com> 2026-08-19 01:32:23+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-18 19:32:23-04:00
logbcfd485869a5eb9e97c6d281ac839c1cd7c1bd99
tree7e907745d91c361dcc64b53dcb43769c65df286c
parent3a02c9cf1d6767cad60e5056cb5b722931f6cc5d
signature Signed by PGP key B5690EEEBB952194

fix(web): improve disconnected composer placeholder (#7122)

Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>

3 files changed, 6 insertions(+), 2 deletions(-)

apps/web/src/components/chat/ChatComposer.tsx+2-1
...@@ -42,6 +42,7 @@ import {...@@ -42,6 +42,7 @@ import {
42 replaceTextRange,42 replaceTextRange,
43 shouldSubmitComposerOnEnter,43 shouldSubmitComposerOnEnter,
44} from "../../composer-logic";44} from "../../composer-logic";
45import { DISCONNECTED_COMPOSER_PLACEHOLDER } from "../../composerPlaceholder";
45import { deriveComposerSendState, readFileAsDataUrl } from "../ChatView.logic";46import { deriveComposerSendState, readFileAsDataUrl } from "../ChatView.logic";
46import {47import {
47 dataTransferHasComposerMention,48 dataTransferHasComposerMention,
...@@ -3075,7 +3076,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)...@@ -3075,7 +3076,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
3075 : noProviderAvailable3076 : noProviderAvailable
3076 ? "Enable a provider in Settings to send a message"3077 ? "Enable a provider in Settings to send a message"
3077 : phase === "disconnected"3078 : phase === "disconnected"
3078 ? "Ask for follow-up changes or attach images"3079 ? DISCONNECTED_COMPOSER_PLACEHOLDER
3079 : "Ask anything, @tag files/folders, $use skills, or / for commands"3080 : "Ask anything, @tag files/folders, $use skills, or / for commands"
3080 }3081 }
3081 disabled={isConnecting || isComposerApprovalState || projectSelectionRequired}3082 disabled={isConnecting || isComposerApprovalState || projectSelectionRequired}
apps/web/src/components/settings/SettingsFontPreviews.tsx+2-1
...@@ -3,6 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react";...@@ -3,6 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
3import { ComposerPromptEditor, type ComposerPromptEditorHandle } from "../ComposerPromptEditor";3import { ComposerPromptEditor, type ComposerPromptEditorHandle } from "../ComposerPromptEditor";
4import { terminalThemeFromApp } from "../ThreadTerminalDrawer";4import { terminalThemeFromApp } from "../ThreadTerminalDrawer";
5import { useTheme } from "../../hooks/useTheme";5import { useTheme } from "../../hooks/useTheme";
6import { DISCONNECTED_COMPOSER_PLACEHOLDER } from "../../composerPlaceholder";
6import { resolveDiffThemeName, type DiffThemeName } from "../../lib/diffRendering";7import { resolveDiffThemeName, type DiffThemeName } from "../../lib/diffRendering";
7import { GhosttyTerminalSurface } from "~/terminal/ghostty/surface";8import { GhosttyTerminalSurface } from "~/terminal/ghostty/surface";
89
...@@ -43,7 +44,7 @@ export function PromptFontPreview() {...@@ -43,7 +44,7 @@ export function PromptFontPreview() {
43 terminalContexts={EMPTY_TERMINAL_CONTEXTS}44 terminalContexts={EMPTY_TERMINAL_CONTEXTS}
44 skills={EMPTY_SKILLS}45 skills={EMPTY_SKILLS}
45 disabled={false}46 disabled={false}
46 placeholder="Ask for follow-up changes or attach images"47 placeholder={DISCONNECTED_COMPOSER_PLACEHOLDER}
47 className="max-h-40 min-h-12"48 className="max-h-40 min-h-12"
48 onRemoveTerminalContext={noop}49 onRemoveTerminalContext={noop}
49 onChange={onChange}50 onChange={onChange}
apps/web/src/composerPlaceholder.ts created+2
...@@ -0,0 +1,2 @@
1export const DISCONNECTED_COMPOSER_PLACEHOLDER =
2 "Ask for changes, send follow-ups, or attach images";