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