@devries-cameron20 / t3code-1 / commits / e9db39ce05
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): align composer notices and stash (#8890)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Bilal Bakr committed Sep 2, 2026 at 07:12 UTC e9db39ce05c706122bb747fd5e7e70e1aac78935
8 files changed +82 -69
apps/web/src/components/ChatView.tsx
+16 -25
@@ -25,10 +25,7 @@ import {
25 RuntimeMode,
26 TerminalOpenInput,
27 } from "@t3tools/contracts";
28 -import {
29 - connectionStatusTitle,
30 - type EnvironmentConnectionPresentation,
31 -} from "@t3tools/client-runtime/connection";
28 +import { type EnvironmentConnectionPresentation } from "@t3tools/client-runtime/connection";
29 import { wasBootstrapThreadDeleted } from "@t3tools/client-runtime/errors";
30 import { type CodexArtifactTemplate } from "@t3tools/client-runtime/codex-artifact-templates";
31 import { effectiveSnoozed, threadWokeAt } from "@t3tools/client-runtime/state/thread-settled";
@@ -2267,21 +2264,20 @@ function ChatViewContent(props: ChatViewProps) {
2264 />
2265 ),
2266 title: `${unavailableConnection.phase === "connecting" ? "Connecting" : "Reconnecting"} to ${activeEnvironmentUnavailableState.label}`,
2270 - description: "It may be finishing an update. One moment.",
2267 + description: "Finishing an update",
2268 });
2269 } else {
2270 items.push({
2271 id: `environment-unavailable:${activeEnvironmentUnavailableState.environmentId}`,
2272 variant: unavailableConnection.phase === "error" ? "error" : "warning",
2273 icon: <WifiOffIcon />,
2277 - title: `${activeEnvironmentUnavailableState.label}: ${connectionStatusTitle(unavailableConnection)}`,
2278 - description:
2279 - unavailableConnection.error ??
2280 - "Reconnect this environment before sending messages or running actions.",
2274 + title: `${activeEnvironmentUnavailableState.label} is ${environmentReconnecting ? "reconnecting" : "offline"}`,
2275 + description: environmentReconnecting ? "Trying again" : "Reconnect to continue",
2276 actions: (
2277 <>
2278 <Button
2279 size="xs"
2280 + variant="ghost"
2281 disabled={environmentReconnecting}
2282 onClick={() =>
2283 void handleReconnectActiveEnvironment(
@@ -2293,7 +2289,7 @@ function ChatViewContent(props: ChatViewProps) {
2289 </Button>
2290 <Button
2291 size="xs"
2296 - variant="outline"
2292 + variant="ghost"
2293 onClick={() => void navigate({ to: "/settings/connections" })}
2294 >
2295 Connections
@@ -2344,13 +2340,10 @@ function ChatViewContent(props: ChatViewProps) {
2340 description:
2341 !updateInProgress &&
2342 !updateFailed &&
2347 - versionMismatchSelfUpdate === "desktop-managed" &&
2348 - !versionMismatchDesktopAppUpdate
2349 - ? serverUpdateGuidance(versionMismatchSelfUpdate, versionMismatchServerLabel)
2343 + versionMismatchSelfUpdate !== null &&
2344 + (versionMismatchSelfUpdate !== "desktop-managed" || !versionMismatchDesktopAppUpdate)
2345 + ? serverUpdateGuidance(versionMismatchSelfUpdate)
2346 : undefined,
2351 - // The desktop-managed guidance is already the description; the action
2352 - // slot would only repeat it. When the desktop app accepts remote
2353 - // update requests, the action button takes over instead.
2347 actions:
2348 updateInProgress ||
2349 !versionMismatch ||
@@ -2363,6 +2356,7 @@ function ChatViewContent(props: ChatViewProps) {
2356 desktopAppUpdate={versionMismatchDesktopAppUpdate}
2357 targetVersion={versionMismatch.clientVersion}
2358 label={updateFailed ? "Retry" : "Update"}
2359 + variant="ghost"
2360 />
2361 ),
2362 ...(updateInProgress || (!updateFailed && !versionMismatchDismissKey)
@@ -5000,8 +4994,8 @@ function ChatViewContent(props: ChatViewProps) {
4994 id: `thread-woke:${activeThread?.id ?? "unknown"}`,
4995 variant: "info",
4996 icon: <AlarmClockIcon />,
5003 - title: "This thread woke from snooze",
5004 - description: "Dismiss to clear the Woke indicator, or send a message to keep going.",
4997 + title: "Thread woke from snooze",
4998 + description: "Send a message to continue",
4999 dismissLabel: "Dismiss Woke notification",
5000 onDismiss: acknowledgeActiveThreadWoke,
5001 };
@@ -5016,13 +5010,11 @@ function ChatViewContent(props: ChatViewProps) {
5010 variant: "info",
5011 icon: isSnoozed ? <AlarmClockIcon /> : <CheckCircle2Icon />,
5012 title: `This thread is ${isSnoozed ? "snoozed" : "settled"}`,
5019 - description: isSnoozed
5020 - ? "Sending a message wakes it and moves it back to Active in the sidebar."
5021 - : "Sending a message moves it back to Active in the sidebar.",
5013 + description: `Send a message to ${isSnoozed ? "wake" : "unsettle"}`,
5014 actions: (
5015 <Button
5016 size="xs"
5025 - variant="outline"
5017 + variant="ghost"
5018 disabled={isSnoozed ? isUnsnoozing : isUnsettling}
5019 onClick={() =>
5020 void (isSnoozed ? handleUnsnoozeActiveThread() : handleUnsettleActiveThread())
@@ -5106,7 +5098,7 @@ function ChatViewContent(props: ChatViewProps) {
5098 const compactAction = (
5099 <Button
5100 size="xs"
5109 - variant="outline"
5101 + variant="ghost"
5102 disabled={compactDisabled}
5103 onClick={() => {
5104 if (compactDisabled) return;
@@ -5121,7 +5113,7 @@ function ChatViewContent(props: ChatViewProps) {
5113 variant: "info",
5114 icon: <Minimize2Icon />,
5115 title: "Resume with less context",
5124 - description: `${formatContextWindowTokens(activeContextWindow.usedTokens)} tokens from an older session`,
5116 + description: `${formatContextWindowTokens(activeContextWindow.usedTokens)} tokens from earlier`,
5117 actions: compactDisabledReason ? (
5118 <Tooltip>
5119 <TooltipTrigger render={<span className="inline-flex">{compactAction}</span>} />
@@ -5198,7 +5190,6 @@ function ChatViewContent(props: ChatViewProps) {
5190 </Tooltip>
5191 </span>
5192 ),
5201 - className: "dark:shadow-none",
5193 actions: (
5194 <Button
5195 size="xs"
apps/web/src/components/ServerUpdateAction.tsx
+5 -2
@@ -4,6 +4,7 @@ import {
4 isAtomCommandInterrupted,
5 squashAtomCommandFailure,
6 } from "@t3tools/client-runtime/state/runtime";
7 +import type { ComponentProps } from "react";
8
9 import { requestConfirmDialog } from "~/confirmDialog";
10 import { useCopyToClipboard } from "~/hooks/useCopyToClipboard";
@@ -79,6 +80,7 @@ export function ServerUpdateAction({
80 desktopAppUpdate = false,
81 targetVersion,
82 label = "Update",
83 + variant = "outline",
84 }: {
85 readonly environmentId: EnvironmentId;
86 readonly serverLabel: string;
@@ -88,6 +90,7 @@ export function ServerUpdateAction({
90 readonly desktopAppUpdate?: boolean;
91 readonly targetVersion: string;
92 readonly label?: string;
93 + readonly variant?: ComponentProps<typeof Button>["variant"];
94 }) {
95 const isDesktopAppUpdate = selfUpdate === "desktop-managed";
96 const updateServer = useAtomCommand(serverEnvironment.updateServer, {
@@ -170,14 +173,14 @@ export function ServerUpdateAction({
173 if (selfUpdate === null) {
174 const command = manualServerUpdateCommand(targetVersion);
175 return (
173 - <Button size="xs" variant="outline" onClick={() => copyToClipboard(command, { command })}>
176 + <Button size="xs" variant={variant} onClick={() => copyToClipboard(command, { command })}>
177 Copy update command
178 </Button>
179 );
180 }
181
182 return (
180 - <Button size="xs" variant="outline" onClick={() => void handleUpdate()}>
183 + <Button size="xs" variant={variant} onClick={() => void handleUpdate()}>
184 {label}
185 </Button>
186 );
apps/web/src/components/chat/ComposerBanner.tsx
+6 -2
@@ -143,11 +143,13 @@ function Column({ className, ...props }: ComponentProps<"div">) {
143
144 function Root({
145 className,
146 + density = "default",
147 placement = "attached",
148 variant = "default",
149 width = "fill",
150 ...props
151 }: ComponentProps<"div"> & {
152 + density?: "default" | "comfortable";
153 placement?: "attached" | "floating";
154 variant?: ComposerBannerVariant;
155 width?: "fill" | "content";
@@ -155,7 +157,8 @@ function Root({
157 return (
158 <Surface
159 className={cn(
158 - "min-w-0 p-1 pb-[calc(var(--chat-composer-attachment-overlap)+(--spacing(1)))] text-xs/4 [--composer-banner-icon-column:--spacing(7)] sm:[--composer-banner-icon-column:--spacing(6)]",
160 + "min-w-0 px-1 pt-(--composer-banner-padding-block) pb-[calc(var(--chat-composer-attachment-overlap)+var(--composer-banner-padding-block))] text-xs/4 [--composer-banner-icon-column:--spacing(7)] [--composer-banner-padding-block:--spacing(1)] sm:[--composer-banner-icon-column:--spacing(6)]",
161 + density === "comfortable" && "[--composer-banner-padding-block:--spacing(1.25)]",
162 width === "content" ? "w-fit max-w-full flex-none" : "@container",
163 className,
164 )}
@@ -183,7 +186,7 @@ function Row({
186 "not-has-[>[data-slot=composer-banner-actions]]:grid-cols-[var(--composer-banner-icon-column)_minmax(0,1fr)]",
187 "[&:is(button)]:cursor-pointer [&:is(button)]:rounded-[0.5rem] [&:is(button)]:focus-visible:outline-2 [&:is(button)]:focus-visible:-outline-offset-2 [&:is(button)]:focus-visible:outline-ring",
188 layout === "wrap-actions" &&
186 - "@max-[400px]:flex @max-[400px]:flex-wrap @max-[400px]:gap-y-1 @max-[400px]:*:data-[slot=composer-banner-actions]:ms-auto @max-[400px]:*:data-[slot=composer-banner-actions]:max-w-full @max-[400px]:has-[>[data-slot=composer-banner-icon]]:*:data-[slot=composer-banner-actions]:max-w-[calc(100%-var(--composer-banner-icon-column)-(--spacing(1)))] @max-[400px]:*:data-[slot=composer-banner-content]:min-h-(--composer-banner-icon-column) @max-[400px]:*:data-[slot=composer-banner-content]:flex-[1_1_10rem]",
189 + "@max-[400px]:*:data-[slot=composer-banner-content]:min-h-(--composer-banner-icon-column)",
190 className,
191 ),
192 "data-composer-banner-row": "true",
@@ -243,6 +246,7 @@ function Actions({ className, ...props }: ComponentProps<"span">) {
246 data-slot="composer-banner-actions"
247 className={cn(
248 "col-start-3 row-start-1 flex flex-wrap items-center justify-end gap-1",
249 + "@max-[400px]:group-data-[composer-banner-layout=wrap-actions]/banner-row:has-[>:nth-child(2)]:col-start-2 @max-[400px]:group-data-[composer-banner-layout=wrap-actions]/banner-row:has-[>:nth-child(2)]:col-end-4 @max-[400px]:group-data-[composer-banner-layout=wrap-actions]/banner-row:has-[>:nth-child(2)]:row-start-2 @max-[400px]:group-data-[composer-banner-layout=wrap-actions]/banner-row:has-[>:nth-child(2)]:-ms-2 @max-[400px]:group-data-[composer-banner-layout=wrap-actions]/banner-row:has-[>:nth-child(2)]:justify-start",
250 className,
251 )}
252 {...props}
apps/web/src/components/chat/ComposerBannerStack.tsx
+42 -14
@@ -1,6 +1,9 @@
1 +import { InfoIcon } from "lucide-react";
2 import { useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode } from "react";
3
4 import { cn } from "~/lib/utils";
5 +import { Button } from "../ui/button";
6 +import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover";
7 import { ComposerBanner, type ComposerBannerVariant } from "./ComposerBanner";
8
9 // Match the duration-220 exit transition before removing a dismissed notice.
@@ -15,14 +18,13 @@ export interface ComposerBannerStackItem {
18 readonly description?: ReactNode;
19 readonly children?: ReactNode;
20 readonly actions?: ReactNode;
18 - readonly className?: string;
21 readonly dismissLabel?: string;
22 readonly onDismiss?: () => void;
23 }
24
25 export type ComposerBannerStackContent = Pick<
26 ComposerBannerStackItem,
25 - "id" | "variant" | "priority" | "className"
27 + "id" | "variant" | "priority"
28 > & { readonly content: ReactNode };
29
30 type ComposerBannerStackEntry = ComposerBannerStackItem | ComposerBannerStackContent;
@@ -252,37 +254,63 @@ function ComposerBannerStackAlert({
254 if ("content" in item) {
255 return (
256 <ComposerBanner.Root
257 + density="comfortable"
258 placement={attached ? "attached" : "floating"}
259 variant={item.variant}
257 - className={item.className}
260 >
261 {item.content}
262 </ComposerBanner.Root>
263 );
264 }
263 -
265 return (
266 <ComposerBanner.Root
267 role="alert"
268 placement={attached ? "attached" : "floating"}
269 variant={item.variant}
269 - className={item.className}
270 + density="comfortable"
271 >
272 <ComposerBanner.Row layout="wrap-actions">
272 - <ComposerBanner.Icon className={item.description ? "min-h-4 self-start" : undefined}>
273 + <ComposerBanner.Icon className="h-(--composer-banner-icon-column) self-start">
274 {item.icon}
275 </ComposerBanner.Icon>
275 - <ComposerBanner.Content
276 - className={item.description ? "flex-col items-start gap-0" : "font-medium"}
277 - >
276 + <ComposerBanner.Content className="whitespace-nowrap">
277 + <span
278 + className={cn(
279 + "min-w-0 font-medium leading-7 sm:leading-6",
280 + typeof item.title === "string" && "truncate",
281 + )}
282 + >
283 + {item.title}
284 + </span>
285 {item.description ? (
286 <>
280 - <span className="font-medium">{item.title}</span>
281 - <span className="text-muted-foreground">{item.description}</span>
287 + <span className="min-w-0 shrink-[9999] truncate text-muted-foreground @max-[400px]:sr-only">
288 + {item.description}
289 + </span>
290 + <Popover>
291 + <PopoverTrigger
292 + openOnHover
293 + render={
294 + <Button
295 + size="icon-xs"
296 + variant="ghost"
297 + aria-label="Show notice details"
298 + className="hidden flex-none text-muted-foreground hover:text-foreground @max-[400px]:inline-flex"
299 + />
300 + }
301 + >
302 + <InfoIcon className="size-3.5" />
303 + </PopoverTrigger>
304 + <PopoverPopup
305 + tooltipStyle
306 + side="top"
307 + className="max-w-72 whitespace-normal text-pretty"
308 + >
309 + {item.description}
310 + </PopoverPopup>
311 + </Popover>
312 </>
283 - ) : (
284 - item.title
285 - )}
313 + ) : null}
314 </ComposerBanner.Content>
315 {item.actions || item.onDismiss ? (
316 <ComposerBanner.Actions>
apps/web/src/components/chat/ComposerStashBadge.tsx
+6 -1
@@ -34,7 +34,12 @@ export const ComposerStashBadge = memo(function ComposerStashBadge(props: {
34 );
35
36 return (
37 - <ComposerBanner.Root width="content" data-composer-shoulder-tab className="ml-auto">
37 + <ComposerBanner.Root
38 + density="comfortable"
39 + width="content"
40 + data-composer-shoulder-tab
41 + className="ml-auto"
42 + >
43 <ComposerBanner.Row
44 render={<button type="button" />}
45 data-prompt-stash-badge="true"
apps/web/src/components/chat/ComposerTasksBadge.tsx
+3 -1
@@ -123,7 +123,9 @@ export const ComposerTasksBadge = memo(function ComposerTasksBadge({
123 return placement === "inline" ? (
124 row
125 ) : (
126 - <ComposerBanner.Root data-composer-shoulder-tab>{row}</ComposerBanner.Root>
126 + <ComposerBanner.Root density="comfortable" data-composer-shoulder-tab>
127 + {row}
128 + </ComposerBanner.Root>
129 );
130 });
131
apps/web/src/versionSkew.test.ts
+2 -9
@@ -215,14 +215,7 @@ describe("versionSkew", () => {
215 });
216
217 it("matches version-drift guidance to the advertised update path", () => {
218 - expect(serverUpdateGuidance("respawn", "Remote server")).toBe(
219 - "Update the Remote server so they stay in sync.",
220 - );
221 - expect(serverUpdateGuidance("desktop-managed", "Desktop server")).toBe(
222 - "Update the desktop app that runs the Desktop server.",
223 - );
224 - expect(serverUpdateGuidance(null, "Local server")).toBe(
225 - "Relaunch the Local server with the copied command to sync them.",
226 - );
218 + expect(serverUpdateGuidance("respawn")).toBe("Update to stay in sync");
219 + expect(serverUpdateGuidance("desktop-managed")).toBe("Update the desktop app");
220 });
221 });
apps/web/src/versionSkew.ts
+2 -15
@@ -111,21 +111,8 @@ export function manualServerUpdateCommand(targetVersion: string): string {
111 return `npx t3@${targetVersion}`;
112 }
113
114 -/** One sentence telling the user how to resolve version skew for a server,
115 - matched to the update path it offers. */
116 -export function serverUpdateGuidance(
117 - capability: ServerSelfUpdateCapability | null,
118 - serverLabel: string,
119 -): string {
120 - switch (capability) {
121 - case "boot-service":
122 - case "respawn":
123 - return `Update the ${serverLabel} so they stay in sync.`;
124 - case "desktop-managed":
125 - return `Update the desktop app that runs the ${serverLabel}.`;
126 - default:
127 - return `Relaunch the ${serverLabel} with the copied command to sync them.`;
128 - }
114 +export function serverUpdateGuidance(capability: ServerSelfUpdateCapability): string {
115 + return capability === "desktop-managed" ? "Update the desktop app" : "Update to stay in sync";
116 }
117
118 export function buildVersionMismatchDismissalKey(