fix(web): refine server update notice (#9744)

This commit is contained in:
maria authored and GitHub committed 2026-09-04 14:51:31 -04:00
1 parent a76b898b3a
commit 0de956ed2f
4 files changed
+11 -5

No files matched your search

+4 -1
View File
@@ -2405,7 +2405,10 @@ export default function ChatView(props: ChatViewProps) {
<Tooltip>
<TooltipTrigger
render={
<button type="button" className="cursor-help rounded-sm text-left">
<button
type="button"
className="block max-w-full cursor-help truncate rounded-sm text-left"
>
Server update available
</button>
}
@@ -178,7 +178,7 @@ function Row({
layout = "inline",
...props
}: useRender.ComponentProps<"div"> & {
layout?: "inline" | "wrap-actions";
layout?: "inline" | "wrap-actions" | "wrap-actions-narrow";
}) {
const rowProps = {
className: cn(
@@ -187,6 +187,8 @@ function Row({
"[&: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",
layout === "wrap-actions" &&
"@max-[400px]:*:data-[slot=composer-banner-content]:min-h-(--composer-banner-icon-column)",
layout === "wrap-actions-narrow" &&
"@max-[320px]:*:data-[slot=composer-banner-content]:min-h-(--composer-banner-icon-column)",
className,
),
"data-composer-banner-row": "true",
@@ -247,6 +249,7 @@ function Actions({ className, ...props }: ComponentProps<"span">) {
className={cn(
"col-start-3 row-start-1 flex flex-wrap items-center justify-end gap-1",
"@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",
"@max-[320px]:group-data-[composer-banner-layout=wrap-actions-narrow]/banner-row:has-[>:nth-child(2)]:col-start-2 @max-[320px]:group-data-[composer-banner-layout=wrap-actions-narrow]/banner-row:has-[>:nth-child(2)]:col-end-4 @max-[320px]:group-data-[composer-banner-layout=wrap-actions-narrow]/banner-row:has-[>:nth-child(2)]:row-start-2 @max-[320px]:group-data-[composer-banner-layout=wrap-actions-narrow]/banner-row:has-[>:nth-child(2)]:-ms-2 @max-[320px]:group-data-[composer-banner-layout=wrap-actions-narrow]/banner-row:has-[>:nth-child(2)]:justify-start",
className,
)}
{...props}
@@ -269,7 +269,7 @@ function ComposerBannerStackAlert({
variant={item.variant}
density="comfortable"
>
<ComposerBanner.Row layout="wrap-actions">
<ComposerBanner.Row layout="wrap-actions-narrow">
<ComposerBanner.Icon className="h-(--composer-banner-icon-column) self-start">
{item.icon}
</ComposerBanner.Icon>
@@ -1,5 +1,5 @@
import type { ServerUpdateState } from "@t3tools/client-runtime/state/server";
import { CircleAlertIcon, InfoIcon, LoaderCircleIcon } from "lucide-react";
import { CircleAlertIcon, DownloadIcon, LoaderCircleIcon } from "lucide-react";
import { useId, useState } from "react";
import { serverUpdateStageLabel } from "../ServerUpdateAction";
@@ -17,7 +17,7 @@ export function ComposerServerUpdateIcon({
if (status === "failed") {
return <CircleAlertIcon aria-hidden className="text-error" />;
}
return <InfoIcon aria-hidden />;
return <DownloadIcon aria-hidden />;
}
/** One text line, clipped at the end so the error detail never squeezes its title. */