From e4771c7e99d3f8f787d6de9e919e0e2273469e8b Mon Sep 17 00:00:00 2001 From: Adam Higgins Date: Wed, 21 Oct 2026 17:06:03 +0100 Subject: [PATCH] fix(web): restore the composer's start-from menu button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upstream sync in #415 dropped the ⋯ button at the composer's top right on the new-thread splash. ChatView still passed onStartFrom, but the composer no longer declared or rendered it. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/chat/ChatComposer.tsx | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index a31f239807f16..ea11e6d373b91 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -1006,7 +1006,9 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children: ); } import { toastManager } from "../ui/toast"; -import { CircleAlertIcon, PlayIcon, ShieldIcon } from "lucide-react"; +import { Button } from "../ui/button"; +import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; +import { CircleAlertIcon, EllipsisIcon, PlayIcon, ShieldIcon } from "lucide-react"; import { proposedPlanTitle } from "@t3tools/shared/proposedPlanText"; import { hasProviderSetup } from "./ProviderStatusBanner"; import { @@ -1265,7 +1267,8 @@ export interface ChatComposerProps { isLocalDraftThread: boolean; forceExpandedOnMobile: boolean; projectSelectionRequired: boolean; - + /** Present on the new-thread splash: opens the "start from PR, branch, or issue" picker. */ + onStartFrom?: () => void; phase: SessionPhase; canInterrupt: boolean; isConnecting: boolean; @@ -1702,6 +1705,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) isLocalDraftThread: _isLocalDraftThread, forceExpandedOnMobile, projectSelectionRequired, + onStartFrom, phase, canInterrupt, isConnecting, @@ -4785,6 +4789,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) composerSubmissionError !== null || providerInputSubmissionError !== null || hasImageAttachmentAttention; + const startFromShortcutLabel = onStartFrom + ? shortcutLabelForCommand(keybindings, "chat.startFrom", { + context: { terminalFocus: false, terminalOpen, modelPickerOpen: false }, + }) + : null; const isComposerResting = shouldUseRestingComposerLayout({ isExistingThread: routeKind === "server" && activeThreadId !== null, isMobileViewport, @@ -6886,6 +6895,28 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) isComposerResting && "py-2 sm:py-2", )} > + {onStartFrom && !isComposerResting ? ( + + + } + > + + + + Start from a PR, branch, issue, or automation + {startFromShortcutLabel ? ` (${startFromShortcutLabel})` : null} + + + ) : null} {isStashMenuOpen && !composerMenuOpen && (