The best way to control Claude Code, Codex and more from any computer or phone
fix(web): reconnecting notice no longer shifts the new thread composer (#26958)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 29, 2026 at 06:07 UTC
88ab83e8bcf0f34bed9ecad5498689be3c99ced2
4 files changed
+50
-19
apps/web/src/components/ChatView.tsx
+8
-2
@@ -306,7 +306,7 @@ import { useThreadLinkedPullRequest } from "./pullRequest/useThreadLinkedPullReq
306
import { useProactivePanels } from "../hooks/useProactivePanels";
307
import { useIncrementalTimelineEntries } from "../hooks/useIncrementalTimelineEntries";
308
import { useRightPanelSurfaceClose } from "../hooks/useRightPanelSurfaceClose";
309
-import type { ComposerBannerStackItem } from "./chat/ComposerBannerStack";
309
+import { ComposerBannerStack, type ComposerBannerStackItem } from "./chat/ComposerBannerStack";
310
import { modelFallbackBannerItem } from "./chat/ComposerUsageLimits";
311
import { ComposerSurface } from "./chat/ComposerSurface";
312
import { resolveThreadSyncPhase } from "../threadSync";
@@ -3516,7 +3516,7 @@ export default function ChatView(props: ChatViewProps) {
3516
: projectCloneSendBlockReason
3517
}
3518
isPreparingWorktree={isPreparingWorktree && !sendQueuesBehindSetup}
3519
- bannerItems={composerBannerItems}
3519
+ bannerItems={isDraftHeroState ? [] : composerBannerItems}
3520
resumeCompactionTokens={resumeCompactionTokens}
3521
keepFullHistory={keepFullHistory}
3522
onToggleKeepFullHistory={toggleKeepFullHistoryStable}
@@ -3682,6 +3682,12 @@ export default function ChatView(props: ChatViewProps) {
3682
)}
3683
</div>
3684
</div>
3685
+ {isDraftHeroState && composerBannerItems.length > 0 ? (
3686
+ // Out of flow, like the headline, so a notice never moves the centered composer.
3687
+ <div className="absolute inset-x-0 top-full flex flex-col gap-1 pt-4">
3688
+ <ComposerBannerStack items={composerBannerItems} detached />
3689
+ </div>
3690
+ ) : null}
3691
</ComposerSurface.Shell>
3692
<div
3693
aria-hidden
apps/web/src/components/chat/ComposerBanner.tsx
+14
-6
@@ -33,27 +33,36 @@ const variantColors: Record<ComposerBannerVariant, string> = {
33
"[--chat-composer-attached-outline:color-mix(in_srgb,var(--warning)_28%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--warning)_8%,transparent)]",
34
};
35
36
+/**
37
+ * An attached surface tucks its bottom under the card below it. A detached one is a whole card
38
+ * of its own, for a notice that sits apart from the composer.
39
+ */
40
function Surface({
41
variant = "default",
42
+ detached = false,
43
className,
44
...props
45
}: ComponentProps<"div"> & {
46
variant?: ComposerBannerVariant;
47
+ detached?: boolean;
48
}) {
49
return (
50
<div
45
- data-composer-banner-surface="attached"
51
+ data-composer-banner-surface={detached ? "detached" : "attached"}
52
data-variant={variant}
53
className={cn(
54
surfaceColors,
55
"relative isolate border-0 bg-transparent shadow-none [--chat-composer-attached-tint:transparent]",
56
variantColors[variant],
51
- // Bleed the mask 1px past the seam to cover Chromium's fractional-pixel backdrop loss.
52
- "[--chat-composer-attachment-overlap:calc(1rem+1px)] before:rounded-t-2xl before:mask-t-from-transparent before:mask-t-from-4 before:mask-t-to-black before:mask-t-to-4",
57
+ detached
58
+ ? "[--chat-composer-attachment-overlap:0px] before:rounded-2xl"
59
+ : // Bleed the mask 1px past the seam to cover Chromium's fractional-pixel backdrop loss.
60
+ "[--chat-composer-attachment-overlap:calc(1rem+1px)] before:rounded-t-2xl before:mask-t-from-transparent before:mask-t-from-4 before:mask-t-to-black before:mask-t-to-4",
61
"before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:border before:border-(--chat-composer-attached-outline)",
62
"before:bg-(--chat-composer-attached-surface)/(--glass-opacity) before:bg-linear-to-b before:from-(--chat-composer-attached-tint) before:to-(--chat-composer-attached-tint) before:backdrop-blur-(--glass-blur) before:backdrop-saturate-(--glass-saturation)",
63
"before:shadow-composer dark:before:shadow-composer-dark",
56
- "dark:supports-[(backdrop-filter:blur(1px))_or_(-webkit-backdrop-filter:blur(1px))]:before:bg-composer-seam-above",
64
+ !detached &&
65
+ "dark:supports-[(backdrop-filter:blur(1px))_or_(-webkit-backdrop-filter:blur(1px))]:before:bg-composer-seam-above",
66
"not-supports-[((backdrop-filter:blur(1px))_or_(-webkit-backdrop-filter:blur(1px)))]:before:bg-(--chat-composer-attached-surface)",
67
className,
68
)}
@@ -108,9 +117,8 @@ function Root({
117
variant = "default",
118
width = "fill",
119
...props
111
-}: ComponentProps<"div"> & {
120
+}: ComponentProps<typeof Surface> & {
121
density?: "default" | "comfortable" | "spacious";
113
- variant?: ComposerBannerVariant;
122
width?: "fill" | "content";
123
}) {
124
return (
apps/web/src/components/chat/ComposerBannerStack.tsx
+27
-10
@@ -7,7 +7,7 @@ import { ComposerBanner, type ComposerBannerVariant } from "./ComposerBanner";
7
import { observeResize } from "~/lib/observeResize";
8
9
/**
10
- * Where a notice sits above the composer. The machine comes first, then what needs you; the
10
+ * Where a notice sits in the stack. The machine comes first, then what needs you; the
11
* order is fixed so rows never trade places as notices come and go.
12
*/
13
export type ComposerBannerGroup = "environment" | "attention";
@@ -27,23 +27,33 @@ export interface ComposerBannerStackItem {
27
28
const GROUPS = ["environment", "attention"] as const;
29
30
+const FADE_IN =
31
+ "transition-opacity duration-150 ease-out starting:opacity-0 motion-reduce:transition-none";
32
+
33
/**
34
* Notices about sending from this composer, each its own attached card. Consecutive cards join
32
- * edge to edge, and the last joins the composer or the drawer below it.
35
+ * edge to edge, and the last joins the composer or the drawer below it. Detached cards stand
36
+ * apart instead, for layouts where the composer must not move when a notice appears.
37
*/
38
export function ComposerBannerStack({
39
items,
40
+ detached = false,
41
}: {
42
readonly items: ReadonlyArray<ComposerBannerStackItem>;
43
+ readonly detached?: boolean;
44
}) {
39
- return GROUPS.flatMap((group) =>
45
+ const ordered = GROUPS.flatMap((group) =>
46
items.filter((item) => (item.group ?? "attention") === group),
41
- ).map((item) => (
42
- <ComposerBanner.Attachment
43
- key={item.id}
44
- data-composer-banner-stack="true"
45
- className="transition-opacity duration-150 ease-out starting:opacity-0 motion-reduce:transition-none"
46
- >
47
+ );
48
+ if (detached) {
49
+ return ordered.map((item) => (
50
+ <div key={item.id} data-composer-banner-stack="true" className={FADE_IN}>
51
+ <NoticeCard item={item} detached />
52
+ </div>
53
+ ));
54
+ }
55
+ return ordered.map((item) => (
56
+ <ComposerBanner.Attachment key={item.id} data-composer-banner-stack="true" className={FADE_IN}>
57
<NoticeCard item={item} />
58
</ComposerBanner.Attachment>
59
));
@@ -125,11 +135,18 @@ export function NoticeText({
135
);
136
}
137
128
-function NoticeCard({ item }: { readonly item: ComposerBannerStackItem }) {
138
+function NoticeCard({
139
+ item,
140
+ detached = false,
141
+}: {
142
+ readonly item: ComposerBannerStackItem;
143
+ readonly detached?: boolean;
144
+}) {
145
return (
146
<ComposerBanner.Root
147
role={item.variant === "error" || item.variant === "warning" ? "alert" : undefined}
148
variant={item.variant}
149
+ detached={detached}
150
density="comfortable"
151
data-chat-composer-collapsed-controls="true"
152
>
apps/web/src/components/chat/ComposerSurface.tsx
+1
-1
@@ -41,7 +41,7 @@ function Host({ className, ...props }: ComponentProps<"div">) {
41
"relative z-10 w-full rounded-2xl shadow-composer after:z-1 dark:shadow-none",
42
"group-data-context-row/composer-surface:before:pointer-events-none group-data-context-row/composer-surface:before:absolute group-data-context-row/composer-surface:before:inset-0 group-data-context-row/composer-surface:before:-z-1 group-data-context-row/composer-surface:before:rounded-2xl group-data-context-row/composer-surface:before:bg-(--chat-composer-glass-surface)/(--glass-opacity) group-data-context-row/composer-surface:before:backdrop-blur-(--glass-blur) group-data-context-row/composer-surface:before:backdrop-saturate-(--glass-saturation)",
43
outlineClasses,
44
- "group-has-data-[composer-banner-surface=attached]/composer-surface:shadow-none group-has-data-[composer-banner-surface=attached]/composer-surface:after:hidden",
44
+ "group-has-data-[composer-banner-surface=attached]/composer-surface:shadow-none group-has-data-[composer-banner-surface=attached]/composer-surface:before:hidden group-has-data-[composer-banner-surface=attached]/composer-surface:after:hidden",
45
className,
46
)}
47
{...props}