The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 03:00 UTC
fix(web): keep the composer chin below the input (#21345)
Theo Browne committed
Oct 18, 2026 at 15:51 UTC
b72740852ffb5ab727e1ae7c042d9e89533bc341
2 files changed
+35
-2
apps/web/src/components/chat/ComposerSurface.browser.test.tsx
new
+33
@@ -0,0 +1,33 @@
1
+import "~/index.css";
2
+
3
+import { act } from "react";
4
+import { createRoot } from "react-dom/client";
5
+import { expect, it, vi } from "vite-plus/test";
6
+
7
+import { ComposerSurface } from "./ComposerSurface";
8
+
9
+it("masks the toolbar overlap and reveals its surface one pixel before the input edge", async () => {
10
+ vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
11
+ const container = document.createElement("div");
12
+ document.body.append(container);
13
+ const root = createRoot(container);
14
+
15
+ try {
16
+ await act(async () => {
17
+ root.render(
18
+ <ComposerSurface.Shell contextStrip>
19
+ <ComposerSurface.Host>Message</ComposerSurface.Host>
20
+ <ComposerSurface.ContextStrip>Workspace</ComposerSurface.ContextStrip>
21
+ </ComposerSurface.Shell>,
22
+ );
23
+ });
24
+
25
+ const strip = container.querySelector('[data-slot="composer-context-strip"]')!;
26
+ const mask = getComputedStyle(strip, "::before").maskImage;
27
+ expect(mask).toContain("rgba(0, 0, 0, 0) 15px, rgb(0, 0, 0) 15px");
28
+ } finally {
29
+ await act(async () => root.unmount());
30
+ container.remove();
31
+ vi.unstubAllGlobals();
32
+ }
33
+});
apps/web/src/components/chat/ComposerSurface.tsx
+2
-2
@@ -79,14 +79,14 @@ function Main({ className, ...props }: ComponentProps<"div">) {
79
);
80
}
81
82
-/** Extends the composer outline below the input, masking its overlap up to one pixel above the shared edge so no seam shows. */
82
+/** Mask offsets use the position hint so class merging preserves the transparent and black stops. */
83
function ContextStrip({ className, ...props }: ComponentProps<"div">) {
84
return (
85
<div
86
data-slot="composer-context-strip"
87
className={cn(
88
"group/composer-context relative isolate mx-auto -mt-4 flex w-[calc(100%-2*var(--chat-composer-drawer-inset))] items-center gap-2 overflow-x-clip overflow-y-visible px-2 pt-5 pb-1",
89
- "before:absolute before:inset-0 before:-z-1 before:rounded-b-2xl before:border before:border-(--chat-composer-outline) before:mask-b-from-transparent before:mask-b-from-(length:--spacing-composer-seam) before:mask-b-to-black before:mask-b-to-(length:--spacing-composer-seam) before:shadow-composer",
89
+ "before:absolute before:inset-0 before:-z-1 before:rounded-b-2xl before:border before:border-(--chat-composer-outline) before:mask-b-from-transparent before:mask-b-from-(position:--spacing-composer-seam) before:mask-b-to-black before:mask-b-to-(position:--spacing-composer-seam) before:shadow-composer",
90
"dark:before:border-white/7 dark:before:bg-composer-seam-below dark:before:shadow-composer-dark",
91
"group-has-data-[composer-banner-surface=attached]/composer-surface:before:bg-(--chat-composer-glass-surface)/(--glass-opacity) group-has-data-[composer-banner-surface=attached]/composer-surface:before:backdrop-blur-(--glass-blur) group-has-data-[composer-banner-surface=attached]/composer-surface:before:backdrop-saturate-(--glass-saturation)",
92
"not-supports-[clip-path:shape(from_0_0,line_to_1px_1px)]:before:bg-(--chat-composer-glass-surface)/(--glass-opacity) not-supports-[clip-path:shape(from_0_0,line_to_1px_1px)]:before:backdrop-blur-(--glass-blur) not-supports-[clip-path:shape(from_0_0,line_to_1px_1px)]:before:backdrop-saturate-(--glass-saturation)",