fix(web): collapse the resting composer #7855
Mergedchrisdeeming(GitHub profile, opens in a new tab)merged 57 commits into
main fromrefs/pull/7855/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/web/src/components/chat/ChatComposer.tsx lines 3358 to 3359OutdatedResolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -3298,3 +3355,5 @@32983355 pendingUserInputs.length > 0 && "pt-2",32993356 isComposerFooterCompact ? "gap-1.5" : "gap-2 sm:gap-0",33003357 showMobilePendingAnswerActions && "hidden sm:flex",3358+ isComposerResting &&3359+ "absolute inset-y-px right-px z-10 w-auto gap-0 px-2 py-0 sm:gap-0 sm:px-2 sm:py-0",
- apps/web/src/components/chat/ChatComposer.tsx lines 5315 to 5323Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -3228,4 +3282,12 @@32283282 : []32293283 }32303284 skills={selectedProviderStatus?.skills ?? []}3231- {...(showMobilePendingAnswerActions ? { className: "max-sm:pb-11" } : {})}3285+ className={cn(3286+ showMobilePendingAnswerActions && "max-sm:pb-11",3287+ isComposerResting &&3288+ "max-h-8 min-h-8 overflow-hidden whitespace-nowrap pr-12 leading-8",3289+ )}3290+ placeholderClassName={cn(3291+ isComposerResting &&3292+ "flex items-center overflow-hidden whitespace-nowrap pr-12 leading-8",3293+ )}
- apps/web/src/components/chat/ChatComposer.tsx line 247Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -131,3 +132,12 @@131132 width: number;132133 };133134135+const COMPOSER_SCROLL_COLLAPSE_THRESHOLD_PX = 24;136+const COMPOSER_SCROLL_GESTURE_RESET_MS = 120;137+const COMPOSER_RESTING_TRANSITION_DURATION_MS = 180;138+const COMPOSER_RESTING_TRANSITION_EASING = "cubic-bezier(0.4, 0, 0.2, 1)";139+140+function useComposerRestingTransition(isResting: boolean) {141+ const elementRef = useRef<HTMLDivElement>(null);142+ const previousRestingRef = useRef(isResting);143+ const previousHeightRef = useRef<number | null>(null);
- apps/web/src/components/chat/ChatComposer.tsx line 191OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -133,0 +171,21 @@171+ [{ height: `${previousHeight}px` }, { height: `${nextHeight}px` }],172+ {173+ duration: COMPOSER_RESTING_TRANSITION_DURATION_MS,174+ easing: COMPOSER_RESTING_TRANSITION_EASING,175+ },176+ );177+ animation.id = "t3-composer-resting-transition";178+ animationRef.current = animation;179+ void animation.finished180+ .catch(() => undefined)181+ .then(() => {182+ if (animationRef.current !== animation) return;183+ animationRef.current = null;184+ element.style.removeProperty("overflow");185+ surface.style.removeProperty("height");186+ });187+ }188+189+ previousRestingRef.current = isResting;190+ previousHeightRef.current = nextHeight;191+ }, [isResting]);
- apps/web/src/components/chat/ChatComposer.tsx lines 2515 to 2517OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -2385,0 +2497,21 @@2497+ activeThreadId !== null &&2498+ !isMobileViewport &&2499+ !composerHasAttachments &&2500+ !composerHasExpandedChrome &&2501+ !showInlineTasksBadge &&2502+ !showInlineStashBadge;2503+2504+ useEffect(() => {2505+ if (!canScrollCollapseComposer) return;2506+2507+ const resetAccumulatedScroll = () => {2508+ if (composerScrollCollapseTimeoutRef.current !== null) {2509+ window.clearTimeout(composerScrollCollapseTimeoutRef.current);2510+ }2511+ composerScrollCollapseTimeoutRef.current = null;2512+ composerScrollCollapseDeltaRef.current = 0;2513+ };2514+ const handleTimelineWheel = (event: WheelEvent) => {2515+ if (!isComposerFocused || event.ctrlKey || !(event.target instanceof Element)) {2516+ return;2517+ }apps/web/src/components/chat/ChatComposer.tsx lines 188 to 190OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -133,0 +170,21 @@170+ const animation = element.animate(171+ [{ height: `${previousHeight}px` }, { height: `${nextHeight}px` }],172+ {173+ duration: COMPOSER_RESTING_TRANSITION_DURATION_MS,174+ easing: COMPOSER_RESTING_TRANSITION_EASING,175+ },176+ );177+ animation.id = "t3-composer-resting-transition";178+ animationRef.current = animation;179+ void animation.finished180+ .catch(() => undefined)181+ .then(() => {182+ if (animationRef.current !== animation) return;183+ animationRef.current = null;184+ element.style.removeProperty("overflow");185+ surface.style.removeProperty("height");186+ });187+ }188+189+ previousRestingRef.current = isResting;190+ previousHeightRef.current = nextHeight;
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
- apps/web/src/components/chat/ChatComposer.tsx line 3635Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -2383,3 +2586,17 @@23832586 steps={visibleTaskSteps}23842587 />23852588 ) : null;2589+ const composerHasExpandedChrome =2590+ showComposerTopDrawer ||2591+ isTasksDrawerOpen ||2592+ composerMenuOpen ||2593+ isStashMenuOpen ||2594+ isComposerModelPickerOpen ||2595+ isDragOverComposer ||2596+ isPreparingWorktree ||2597+ noProviderAvailable ||2598+ projectSelectionRequired ||2599+ environmentUnavailable !== null ||2600+ composerSubmissionError !== null ||2601+ providerInputSubmissionError !== null;2602+ const isComposerResting = shouldUseRestingComposerLayout({
- apps/web/src/components/chat/ChatComposer.tsx line 4707Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2848,3 +3364,18 @@28483364 className={cn("mx-auto w-full min-w-0 max-w-3xl", hasShoulderTab && "pt-7")}28493365 data-chat-composer-form="true"28503366 >3367+ {isComposerResting && restingControlsHost3368+ ? createPortal(3369+ <div3370+ ref={restingComposerControlsRef}3371+ data-chat-composer-resting-controls="true"3372+ className={cn(3373+ "relative flex items-center gap-1 font-normal text-muted-foreground/70",3374+ restingHiddenBlockCount > 0 ? "w-full min-w-0" : "w-max min-w-max",3375+ )}3376+ >3377+ {composerControls}3378+ </div>,3379+ restingControlsHost,3380+ )3381+ : null}apps/web/src/components/chat/ChatComposer.tsx line 3814Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2385,0 +2656,21 @@2656+ window.clearTimeout(composerScrollCollapseTimeoutRef.current);2657+ }2658+ composerScrollCollapseTimeoutRef.current = window.setTimeout(2659+ resetAccumulatedScroll,2660+ COMPOSER_SCROLL_GESTURE_RESET_MS,2661+ );2662+ if (composerScrollCollapseDeltaRef.current < COMPOSER_SCROLL_COLLAPSE_THRESHOLD_PX) {2663+ return;2664+ }2665+2666+ resetAccumulatedScroll();2667+ setIsComposerScrollCollapsed(true);2668+ };2669+2670+ document.addEventListener("wheel", handleTimelineWheel, { capture: true, passive: true });2671+ return () => {2672+ document.removeEventListener("wheel", handleTimelineWheel, true);2673+ resetAccumulatedScroll();2674+ };2675+ }, [canScrollCollapseComposer]);2676+
- apps/web/src/components/BranchToolbar.tsx line 539OutdatedResolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -518,3 +531,9 @@518531 </div>519532 )}520533534+ {composerControlsHostRef ? (535+ <div536+ ref={composerControlsHostRef}537+ data-composer-context-control538+ data-chat-resting-composer-controls-host="true"539+ className="hidden min-w-0 flex-1 items-center justify-start overflow-hidden empty:hidden md:flex"apps/web/src/components/chat/ChatComposer.tsx line 5406Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -3356,17 +3847,4 @@3356- <Separator3357- orientation="vertical"3358- className="mx-0.5 hidden h-4 sm:block"3359- />3360- {providerTraitsPicker}3361- </>3362- ) : null}3363- <ComposerFooterModeControls3364- showInteractionModeToggle={3365- composerProviderControls.showInteractionModeToggle3366- }3367- interactionMode={interactionMode}3368- runtimeMode={runtimeMode}3369- onToggleInteractionMode={toggleInteractionMode}3370- onRuntimeModeChange={handleRuntimeModeChange}3371- />3372- </>3847+ <div3848+ className={cn(3849+ "-m-1 -ms-3.5 flex min-w-0 flex-1 items-center gap-1 overflow-x-auto p-1 ps-3.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",3850+ isComposerResting && "hidden",apps/web/src/components/chat/ComposerControl.tsx line 9OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -6,4 +6,4 @@66 import { SelectTrigger } from "../ui/select";7788 const composerControlClassName =9- "h-7 min-h-7 gap-1.5 rounded-[var(--control-radius)] px-2.5 text-secondary-label transition-none hover:text-foreground [&_svg[data-composer-control-icon]]:mx-0 [&_svg[data-composer-control-chevron]]:-mx-0.5";9+ "rounded-[var(--control-radius)] text-secondary-label transition-none hover:text-foreground [&_svg[data-composer-control-icon]]:mx-0 [&_svg[data-composer-control-chevron]]:-mx-0.5";
- apps/web/src/components/BranchToolbar.tsx line 539OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -518,3 +531,9 @@518531 </div>519532 )}520533534+ {composerControlsHostRef ? (535+ <div536+ ref={composerControlsHostRef}537+ data-composer-context-control538+ data-chat-resting-composer-controls-host="true"539+ className="hidden min-w-0 flex-1 items-center justify-start overflow-hidden empty:hidden md:flex"apps/web/src/components/chat/ChatComposer.tsx line 2913OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -2501,0 +2893,21 @@2893+ {!isComposerResting && composerControlsCompact ? (2894+ <CompactComposerControlsMenu2895+ interactionMode={interactionMode}2896+ runtimeMode={runtimeMode}2897+ showInteractionModeToggle={composerProviderControls.showInteractionModeToggle}2898+ traitsMenuContent={providerTraitsMenuContent}2899+ onToggleInteractionMode={toggleInteractionMode}2900+ onRuntimeModeChange={handleRuntimeModeChange}2901+ />2902+ ) : (2903+ <>2904+ {restingBlockDefs.map((def, index) => {2905+ const hidden = index >= restingBlockDefs.length - restingHiddenBlockCount;2906+ return (2907+ <div2908+ key={`${def.id}:${hidden ? "hidden" : "visible"}`}2909+ data-resting-block={def.id}2910+ aria-hidden={hidden || undefined}2911+ inert={hidden || undefined}2912+ className={cn(2913+ "flex min-w-0 items-center",
- apps/web/src/components/chat/ChatComposer.tsx line 3640Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2501,0 +2707,21 @@2707+ showComposerTopDrawer ||2708+ isTasksDrawerOpen ||2709+ composerMenuOpen ||2710+ isStashMenuOpen ||2711+ isDragOverComposer ||2712+ isPreparingWorktree ||2713+ noProviderAvailable ||2714+ projectSelectionRequired ||2715+ environmentUnavailable !== null ||2716+ composerSubmissionError !== null ||2717+ providerInputSubmissionError !== null;2718+ const hasAvailableRestingControlsHost =2719+ restingControlsHost !== null && !isNarrowRestingComposerViewport;2720+ const isComposerResting = shouldUseRestingComposerLayout({2721+ hasControlsHost: hasAvailableRestingControlsHost,2722+ isMobileViewport,2723+ isFocused: isComposerFocused && !isComposerScrollCollapsed,2724+ hasAttachments: composerHasAttachments,2725+ hasExpandedChrome: composerHasExpandedChrome,2726+ hasInlineAccessories: showInlineTasksBadge || showInlineStashBadge,2727+ });
- apps/web/src/components/chat/ChatComposer.tsx line 3622Resolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -2499,3 +2703,4 @@24992703 steps={visibleTaskSteps}25002704 />25012705 ) : null;2706+ const composerHasExpandedChrome =
- apps/web/src/components/chat/ComposerControl.tsx lines 11 to 12OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -6,4 +6,7 @@66 import { SelectTrigger } from "../ui/select";7788 const composerControlClassName =9- "h-7 min-h-7 gap-1.5 rounded-[var(--control-radius)] px-2.5 text-secondary-label transition-none hover:text-foreground [&_svg[data-composer-control-icon]]:mx-0 [&_svg[data-composer-control-chevron]]:-mx-0.5";9+ "rounded-[var(--control-radius)] text-secondary-label transition-none hover:text-foreground [&_svg[data-composer-control-icon]]:mx-0";10+const expandedComposerControlClassName = "h-7 min-h-7 gap-1.5 px-2.5";11+const restingComposerControlClassName =12+ "font-normal text-muted-foreground/70 hover:text-foreground/80";apps/web/src/components/chat/ChatComposer.tsx lines 537 to 543OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -378,6 +532,12 @@378532 }379533 >380534 {props.interactionMode === "plan" ? (381- <ComposerControlIcon icon={PencilRulerIcon} className="text-current opacity-100" />535+ <ComposerControlIcon536+ icon={PencilRulerIcon}537+ className={cn("text-current opacity-100", size === "xs" && "size-3!")}538+ />382539 ) : (383- <ComposerControlIcon icon={BotIcon} opticalSize="large" />540+ <ComposerControlIcon541+ icon={BotIcon}542+ opticalSize={size === "xs" ? "default" : "large"}543+ className={size === "xs" ? "size-3!" : undefined}
- apps/web/src/components/chat/ChatComposer.tsx lines 2914 to 2916OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -2501,0 +2896,21 @@2896+ <>2897+ {restingBlockDefs.map((def, index) => {2898+ const hidden = index >= restingBlockDefs.length - restingHiddenBlockCount;2899+ return (2900+ <div2901+ key={`${def.id}:${hidden ? "hidden" : "visible"}`}2902+ data-resting-block={def.id}2903+ aria-hidden={hidden || undefined}2904+ inert={hidden || undefined}2905+ className={cn(2906+ "flex min-w-0 items-center gap-1",2907+ hidden && "pointer-events-none invisible absolute w-max min-w-max",2908+ )}2909+ >2910+ {def.content}2911+ </div>2912+ );2913+ })}2914+ {isComposerResting && hiddenRestingBlockIds.length > 0 ? (2915+ <div data-resting-controls-overflow className="min-w-0">2916+ <CompactComposerControlsMenu
- apps/web/src/components/chat/ProviderModelPicker.tsx line 187OutdatedResolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -164,9 +172,16 @@164172 displayName={activeEntry.displayName}165173 accentColor={activeEntry.accentColor}166174 showBadge={showInstanceBadge}167- className="size-4"168- iconClassName={cn("size-4", props.activeProviderIconClassName)}169- indicatorBackground="var(--contrast-input)"175+ className={props.size === "xs" ? "size-3" : "size-4"}176+ iconClassName={cn(177+ props.size === "xs" ? "size-3" : "size-4",178+ props.activeProviderIconClassName,179+ )}180+ {...(props.size === "xs" ? { badgeContent: "none" as const } : {})}181+ indicatorBackground={182+ props.size === "xs" ? "var(--background)" : "var(--contrast-input)"183+ }170184 badgeClassName={cn(171- "right-[-0.125rem] bottom-[-0.125rem] h-3 min-w-3",172- "px-0.5 text-[7px]",185+ props.size === "xs"186+ ? "-right-px -bottom-px h-1.5 min-w-1.5 px-0 shadow-none"187+ : "right-[-0.125rem] bottom-[-0.125rem] h-3 min-w-3 px-0.5 text-[7px]",
- apps/web/src/components/chat/ProviderInstanceIcon.tsx lines 42 to 43OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -40,3 +40,4 @@4040 props.className,4141 )}4242 style={accentStyle}43+ data-provider-instance-icon="true"apps/web/src/components/chat/ComposerControl.tsx lines 38 to 43OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -28,7 +35,9 @@2835 icon: Icon,2936 className,3037 opticalSize = "default",38+ size = "sm",3139 }: {3240 icon: LucideIcon;3341 className?: string | undefined;3442 opticalSize?: "default" | "large";43+ size?: ComponentProps<typeof Button>["size"];
- apps/web/src/components/chat/ProviderModelPicker.tsx lines 175 to 187OutdatedResolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -164,10 +172,16 @@164172 displayName={activeEntry.displayName}165173 accentColor={activeEntry.accentColor}166174 showBadge={showInstanceBadge}167- className="size-4"168- iconClassName={cn("size-4", props.activeProviderIconClassName)}169- indicatorBackground="var(--contrast-input)"175+ className={props.size === "xs" ? "size-3" : "size-4"}176+ iconClassName={cn(177+ props.size === "xs" ? "size-3" : "size-4",178+ props.activeProviderIconClassName,179+ )}180+ indicatorBackground={181+ props.size === "xs" ? "var(--background)" : "var(--contrast-input)"182+ }170183 badgeClassName={cn(171- "right-[-0.125rem] bottom-[-0.125rem] h-3 min-w-3",172- "px-0.5 text-[7px]",184+ props.size === "xs"185+ ? "-right-px -bottom-px h-2.5 min-w-2.5 px-px text-[6px] shadow-none"186+ : "right-[-0.125rem] bottom-[-0.125rem] h-3 min-w-3 px-0.5 text-[7px]",173187 )}
- apps/web/src/components/chat/ChatComposer.tsx line 4643Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2947,3 +3453,12 @@29473453 <form29483454 ref={composerFormRef}29493455 onSubmit={submitComposer}3456+ onKeyDownCapture={() => setIsComposerScrollCollapsed(false)}3457+ onPointerDownCapture={(event) => {3458+ const target = event.target;3459+ if (3460+ !(target instanceof Element) ||3461+ !target.closest('button, a, input, select, [role="button"], [role="menuitem"]')3462+ ) {3463+ setIsComposerScrollCollapsed(false);3464+ }
- apps/web/src/components/BranchToolbar.tsx lines 269 to 270OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -265,3 +267,4 @@265267 let groups = 0;266268 for (const child of current.children) {267269 if (!(child instanceof HTMLElement) || child.offsetWidth <= 1) continue;270+ if (child.matches('[data-chat-resting-composer-controls-host="true"]')) continue;
- apps/web/src/components/chat/ChatComposer.tsx line 912Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -346,0 +437,21 @@437+ );438+}439+440+function useRestingComposerControlsLayout(host: HTMLDivElement | null) {441+ const controlsRef = useRef<HTMLDivElement>(null);442+ const hostRef = useRef(host);443+ hostRef.current = host;444+ const [hasLayoutSpace, setHasLayoutSpace] = useState(false);445+ const [hiddenCount, setHiddenCount] = useState(0);446+447+ const measure = useCallback(() => {448+ const currentHost = hostRef.current;449+ const controls = controlsRef.current;450+ const nextHasLayoutSpace = currentHost !== null && currentHost.clientWidth > 0;451+ setHasLayoutSpace((current) => (current === nextHasLayoutSpace ? current : nextHasLayoutSpace));452+ if (!nextHasLayoutSpace || !controls) return;453+454+ const blocks = Array.from(controls.querySelectorAll<HTMLElement>("[data-resting-block]"));455+ if (blocks.length === 0) return;456+457+ const gap = Number.parseFloat(getComputedStyle(controls).columnGap) || 0;
- apps/web/src/components/BranchToolbar.tsx lines 497 to 503OutdatedResolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -469,4 +473,7 @@469473 <div470474 ref={setStripElement}471475 data-compact={labelsOverflow ? "" : undefined}472- className="chat-composer-context-strip group/composer-context -mt-4 mx-auto flex w-[calc(100%-2.75rem)] max-w-[calc(48rem-2.75rem)] items-center gap-2 overflow-x-clip overflow-y-visible ps-1 pe-2 pt-5 pb-1"476+ className={cn(477+ "chat-composer-context-strip group/composer-context -mt-4 mx-auto flex w-[calc(100%-2.75rem)] max-w-[calc(48rem-2.75rem)] items-center gap-1 overflow-x-clip overflow-y-visible ps-1 pe-2 pt-5 pb-1 text-xs font-normal text-muted-foreground/70",478+ "[&_[data-composer-context-control]]:font-normal",479+ )}apps/web/src/components/BranchToolbar.tsx line 131OutdatedResolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -126,4 +128,4 @@126128127129 if (isLocked) {128130 return (129- <span className="inline-flex h-7 min-w-0 max-w-[48%] flex-1 items-center justify-start gap-1 rounded-md border border-transparent px-[calc(--spacing(2)-1px)] text-sm font-medium text-muted-foreground/70 sm:h-6 md:hidden">131+ <span className="inline-flex h-7 min-w-0 max-w-[48%] flex-1 items-center justify-start gap-1 rounded-md border border-transparent px-[calc(--spacing(2)-1px)] text-sm font-normal text-muted-foreground/70 sm:h-6 md:hidden">apps/web/src/components/chat/ChatComposer.tsx line 2834OutdatedResolvedby chrisdeeming(GitHub profile, opens in a new tab)@@ -2501,0 +2814,21 @@2814+ document.addEventListener("wheel", handleTimelineWheel, { capture: true, passive: true });2815+ return () => {2816+ document.removeEventListener("wheel", handleTimelineWheel, true);2817+ resetAccumulatedScroll();2818+ };2819+ }, [canScrollCollapseComposer]);2820+2821+ const restingHiddenBlockCount = isComposerResting ? restingControlsHiddenBlockCount : 0;2822+ const composerControlsCompact = isComposerResting2823+ ? restingHiddenBlockCount > 02824+ : isComposerFooterCompact;2825+ const restingBlockDefs = [2826+ ...(providerTraitsPicker2827+ ? [2828+ {2829+ id: "traits",2830+ content: (2831+ <>2832+ <Separator2833+ orientation="vertical"2834+ className={cn("mx-0.5 hidden sm:block", isComposerResting ? "h-3.5!" : "h-4")}
Sign in to join this conversation.


📝 Walkthrough
Walkthrough#
The chat composer now supports a desktop resting state for existing threads. Timeline scrolling collapses the composer, while editing, focus, and control interaction expand it. Compact controls can render in the branch toolbar, with updated selection tracking, event handling, sizing, tests, and documentation.
Changes#
Chat composer resting flow
apps/web/src/components/composerFooterLayout.ts,apps/web/src/components/chat/ComposerControl.tsx,apps/web/src/components/chat/composerEventScope.tsapps/web/src/components/chat/CompactComposerControlsMenu.tsx,apps/web/src/components/chat/ProviderModelPicker.tsx,apps/web/src/components/chat/TraitsPicker.tsx,apps/web/src/components/chat/composerProviderState.tsxapps/web/src/components/ComposerPromptEditor.tsx,apps/web/src/components/composerSelection.ts,apps/web/src/components/chat/composerScrollGesture.tsapps/web/src/components/chat/ChatComposer.tsx,apps/web/src/components/chat/*test.tsapps/web/src/components/BranchToolbar*.tsx,apps/web/src/components/ChatView.tsx,docs/user/composer.mdEstimated code review effort: 4 (Complex) | ~60 minutes
Merge Risk: 🔵 Low · up to
4c9d5The PR introduces a compact resting state for existing-thread desktop composers, but the documentation currently describes resting behavior as possible while attachments remain present. This could mislead users about the composer layout; the change is otherwise mergeable with explicit follow-up to correct the documentation and tighten the test helper.
Sequence Diagram(s)#
Suggested reviewers:
juliusmarminge,t3dotgg🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 22 files. (1 skipped: 1 unsupported.)
Full details: Description check
Explanation
The description includes the required What Changed, Why, UI Changes, and Checklist sections. It provides detailed behavior, rationale, before-and-after screenshots, an interaction video, and completed checklist items.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.