feat: refresh draft session welcome

Centered the new session composer
Added a project-aware welcome prompt
Removed the old empty-state logo from draft sessions
This commit is contained in:
Bohdan Triapitsyn
2026-05-27 17:35:58 +03:00
parent 9ed2e39b08
commit dadb968364
10 changed files with 33 additions and 12 deletions
@@ -768,18 +768,13 @@ export const ChatContainer: React.FC<ChatContainerProps> = ({ autoOpenDraft = tr
if (!currentSessionId && draftOpen) {
return (
<div className="relative flex flex-col h-full bg-background transform-gpu">
{!isDesktopExpandedInput ? (
<div className="flex-1 flex items-center justify-center">
<ChatEmptyState />
</div>
) : null}
<div
className={cn(
'relative z-10',
<div className="relative flex h-full flex-col bg-background transform-gpu">
<div
className={cn(
'relative z-10 flex min-h-0',
isDesktopExpandedInput
? 'flex-1 min-h-0 bg-background'
: 'bg-background'
? 'flex-1 bg-background'
: 'flex-1 items-center justify-center bg-background px-0 pb-[6vh]'
)}
>
{promptReadOnly ? <ReadOnlyPromptBanner /> : <ChatInput scrollToBottom={resumeToLatestInstant} />}
+11 -1
View File
@@ -3459,6 +3459,7 @@ const ChatInputComponent: React.FC<ChatInputProps> = ({ onOpenSettings, scrollTo
() => normalizePath(selectedDraftProject?.path ?? null),
[selectedDraftProject?.path],
);
const draftProjectLabel = selectedDraftProject ? getProjectDisplayLabel(selectedDraftProject) : null;
const selectedDraftProjectBranches = useGitBranches(selectedDraftProjectPath);
const selectedDraftProjectIsGitRepo = useIsGitRepo(selectedDraftProjectPath);
@@ -3780,12 +3781,21 @@ const ChatInputComponent: React.FC<ChatInputProps> = ({ onOpenSettings, scrollTo
<form
onSubmit={(e) => { e.preventDefault(); handlePrimaryAction(); }}
className={cn(
"relative pt-0 pb-4",
"relative w-full pt-0 pb-4",
isDesktopExpanded && 'flex h-full min-h-0 flex-col pt-4',
isMobile && 'bottom-safe-area'
)}
style={isMobile && inputBarOffset > 0 ? { marginBottom: `${inputBarOffset}px` } : undefined}
>
{newSessionDraftOpen && !isDesktopExpanded ? (
<div className="chat-input-column mb-7 text-center">
<h1 className="text-balance text-2xl font-medium tracking-tight text-foreground md:text-3xl">
{draftProjectLabel
? t('chat.emptyState.draftTitleWithProject', { project: draftProjectLabel })
: t('chat.emptyState.draftTitle')}
</h1>
</div>
) : null}
<div className={cn('chat-input-column relative overflow-visible', isDesktopExpanded && 'flex flex-1 min-h-0 flex-col')}>
<AttachedFilesList onShowPopup={handleShowAttachmentPreview} />
<QueuedMessageChips
+2
View File
@@ -1449,6 +1449,8 @@ export const dict = {
'chat.changedFiles.actions.openFileTitle': 'Open {path}',
'chat.emptyState.opencodeUnreachable': 'OpenCode is not reachable',
'chat.emptyState.startNewChat': 'Start a new chat',
'chat.emptyState.draftTitle': 'What are we working on?',
'chat.emptyState.draftTitleWithProject': 'What are we working on in {project}?',
'chat.scrollToBottom.aria': 'Scroll to bottom',
'chat.timeline.relative.justNow': 'just now',
'chat.timeline.relative.minutesAgo': '{count}m ago',
+2
View File
@@ -1415,6 +1415,8 @@ export const dict: Record<I18nKey, string> = {
"chat.changedFiles.actions.openFileTitle": "Abrir {path}",
"chat.emptyState.opencodeUnreachable": "OpenCode no es accesible",
"chat.emptyState.startNewChat": "Iniciar una nueva conversación",
"chat.emptyState.draftTitle": "What are we working on?",
"chat.emptyState.draftTitleWithProject": "What are we working on in {project}?",
"chat.scrollToBottom.aria": "Ir al final",
"chat.timeline.relative.justNow": "ahora mismo",
"chat.timeline.relative.minutesAgo": "hace {count}m",
+2
View File
@@ -1451,6 +1451,8 @@ export const dict: Record<I18nKey, string> = {
'chat.changedFiles.actions.openFileTitle': '{path} 열기',
'chat.emptyState.opencodeUnreachable': 'OpenCode에 연결할 수 없음',
'chat.emptyState.startNewChat': '새 채팅 시작',
'chat.emptyState.draftTitle': 'What are we working on?',
'chat.emptyState.draftTitleWithProject': 'What are we working on in {project}?',
'chat.scrollToBottom.aria': '맨 아래로 스크롤',
'chat.timeline.relative.justNow': '방금 전',
'chat.timeline.relative.minutesAgo': '{count}분 전',
+2
View File
@@ -443,6 +443,8 @@ export const dict: Record<I18nKey, string> = {
'chat.changedFiles.actions.openFileTitle': 'Otwórz {path}',
'chat.emptyState.opencodeUnreachable': 'OpenCode jest nieosiągalny',
'chat.emptyState.startNewChat': 'Rozpocznij nowy czat',
'chat.emptyState.draftTitle': 'What are we working on?',
'chat.emptyState.draftTitleWithProject': 'What are we working on in {project}?',
'chat.scrollToBottom.aria': 'Przewiń na dół',
'chat.timeline.relative.justNow': 'przed chwilą',
'chat.timeline.relative.minutesAgo': '{count}m temu',
@@ -1415,6 +1415,8 @@ export const dict: Record<I18nKey, string> = {
"chat.changedFiles.actions.openFileTitle": "Abrir {path}",
"chat.emptyState.opencodeUnreachable": "OpenCode não está acessível",
"chat.emptyState.startNewChat": "Iniciar uma nova conversa",
"chat.emptyState.draftTitle": "What are we working on?",
"chat.emptyState.draftTitleWithProject": "What are we working on in {project}?",
"chat.scrollToBottom.aria": "Ir ao final",
"chat.timeline.relative.justNow": "agora mesmo",
"chat.timeline.relative.minutesAgo": "há {count}m",
+2
View File
@@ -1415,6 +1415,8 @@ export const dict: Record<I18nKey, string> = {
"chat.changedFiles.actions.openFileTitle": "Відкрити {path}",
"chat.emptyState.opencodeUnreachable": "OpenCode недоступний",
"chat.emptyState.startNewChat": "Почніть новий чат",
"chat.emptyState.draftTitle": "Над чим працюємо?",
"chat.emptyState.draftTitleWithProject": "Над чим працюємо в {project}?",
"chat.scrollToBottom.aria": "Прокрутити вниз",
"chat.timeline.relative.justNow": "щойно",
"chat.timeline.relative.minutesAgo": "{count} хв тому",
@@ -1415,6 +1415,8 @@ export const dict: Record<I18nKey, string> = {
'chat.changedFiles.actions.openFileTitle': '打开 {path}',
'chat.emptyState.opencodeUnreachable': '无法连接 OpenCode',
'chat.emptyState.startNewChat': '开始新的聊天',
'chat.emptyState.draftTitle': 'What are we working on?',
'chat.emptyState.draftTitleWithProject': 'What are we working on in {project}?',
'chat.scrollToBottom.aria': '滚动到底部',
'chat.timeline.relative.justNow': '刚刚',
'chat.timeline.relative.minutesAgo': '{count} 分钟前',
@@ -1412,6 +1412,8 @@ export const dict: Record<I18nKey, string> = {
'chat.changedFiles.actions.openFileTitle': '開啟 {path}',
'chat.emptyState.opencodeUnreachable': '無法連線 OpenCode',
'chat.emptyState.startNewChat': '開始新的聊天',
'chat.emptyState.draftTitle': 'What are we working on?',
'chat.emptyState.draftTitleWithProject': 'What are we working on in {project}?',
'chat.scrollToBottom.aria': '捲動到底部',
'chat.timeline.relative.justNow': '剛剛',
'chat.timeline.relative.minutesAgo': '{count} 分鐘前',