From 7b7119e71c91a986a695235606e23b96eb860259 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Thu, 16 Jul 2026 13:08:49 -0400 Subject: [PATCH 1/5] feat: draft hero landing on the index route Signed-off-by: Yordis Prieto --- apps/web/src/components/ChatView.tsx | 122 ++++++++++++------ .../src/components/chat/DraftHeroHeadline.tsx | 88 +++++++++++++ .../src/components/chat/MessagesTimeline.tsx | 5 + apps/web/src/hooks/useHandleNewThread.ts | 3 + apps/web/src/routes/_chat.index.tsx | 67 ++++++++++ 5 files changed, 242 insertions(+), 43 deletions(-) create mode 100644 apps/web/src/components/chat/DraftHeroHeadline.tsx diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index f5ea5bb1eba..dbd00743f45 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -201,6 +201,7 @@ import { } from "../state/entities"; import { environmentShell } from "../state/shell"; import { ChatComposer, type ChatComposerHandle } from "./chat/ChatComposer"; +import { DraftHeroHeadline } from "./chat/DraftHeroHeadline"; import { ExpandedImageDialog } from "./chat/ExpandedImageDialog"; import { PullRequestThreadDialog } from "./PullRequestThreadDialog"; import { MessagesTimeline } from "./chat/MessagesTimeline"; @@ -2063,6 +2064,7 @@ function ChatViewContent(props: ChatViewProps) { deriveTimelineEntries(timelineMessages, activeThread?.proposedPlans ?? [], workLogEntries), [activeThread?.proposedPlans, timelineMessages, workLogEntries], ); + const isDraftHeroState = isLocalDraftThread && timelineEntries.length === 0 && !isWorking; const { turnDiffSummaries, inferredCheckpointTurnCountByTurnId } = useTurnDiffSummaries(activeThread); const turnDiffSummaryByAssistantMessageId = useMemo(() => { @@ -5101,6 +5103,7 @@ function ChatViewContent(props: ChatViewProps) { contentInsetEndAdjustment={composerOverlayHeight} onIsAtEndChange={onIsAtEndChange} onManualNavigation={cancelTimelineLiveFollowForUserNavigation} + hideEmptyPlaceholder={isDraftHeroState} /> {/* scroll to end pill — shown when user has scrolled away from the live edge */} @@ -5123,23 +5126,45 @@ function ChatViewContent(props: ChatViewProps) { )} - {/* Input bar */} + {/* Input bar — centered hero while a draft has no messages, docked at the bottom otherwise */}
-