Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -3522,14 +3522,7 @@ describe("ProviderCommandReactor", () => {
}),
);

await waitFor(async () => {
const readModel = await harness.readModel();
const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1"));
if (!thread) return false;
return thread.activities.some(
(activity) => activity.kind === "provider.approval.respond.failed",
);
});
await harness.drain();

const readModel = await harness.readModel();
const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1"));
Expand Down Expand Up @@ -3641,14 +3634,7 @@ describe("ProviderCommandReactor", () => {
}),
);

await waitFor(async () => {
const readModel = await harness.readModel();
const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1"));
if (!thread) return false;
return thread.activities.some(
(activity) => activity.kind === "provider.user-input.respond.failed",
);
});
await harness.drain();

const readModel = await harness.readModel();
const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1"));
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ProviderUpdateEnvironmentRows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function EnvironmentUpdateRow({
break;
default:
trailing = (
<Button size="xs" onClick={onUpdate}>
<Button size="xs" variant="outline" onClick={onUpdate}>
Update
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ describe("ProviderUpdatePrimaryNotification", () => {
state.notificationVersion += 1;
});

it("uses an outline action for routine update notices", () => {
renderNotification();

expect(state.toasts[0]).toMatchObject({ actionVariant: "outline" });
});

it("opens repair settings for the environment where the update started", async () => {
let finishUpdate!: () => void;
state.updateProvider.mockImplementation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export function ProviderUpdatePrimaryNotification() {
children: "Settings",
onClick: openSettings,
},
actionVariant: oneClickProviders.length > 0 ? "default" : "outline",
actionVariant: "outline",
data: {
leadingIcon:
updateProviders.length === 1 ? (
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ServerUpdateAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function ServerUpdateAction({
}

return (
<Button size="xs" onClick={() => void handleUpdate()}>
<Button size="xs" variant="outline" onClick={() => void handleUpdate()}>
{label}
</Button>
);
Expand Down
9 changes: 4 additions & 5 deletions apps/web/src/components/chat/ComposerBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ const variantColors: Record<ComposerBannerVariant, string> = {
default: neutralOutline,
error:
"[--chat-composer-attached-outline:color-mix(in_srgb,var(--error)_32%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--error)_8%,transparent)]",
info: "[--chat-composer-attached-outline:color-mix(in_srgb,var(--info)_32%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--info)_4%,transparent)]",
success:
"[--chat-composer-attached-outline:color-mix(in_srgb,var(--success)_32%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--success)_4%,transparent)]",
info: neutralOutline,
success: neutralOutline,
warning:
"[--chat-composer-attached-outline:color-mix(in_srgb,var(--warning)_28%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--warning)_8%,transparent)]",
};
Expand Down Expand Up @@ -71,8 +70,8 @@ function Surface({
const peekBorder: Record<ComposerBannerVariant, string> = {
default: "border-(--chat-composer-attached-outline)",
error: "border-destructive/24",
info: "border-info/24",
success: "border-success/24",
info: "border-(--chat-composer-attached-outline)",
success: "border-(--chat-composer-attached-outline)",
warning: "border-warning/24",
};

Expand Down
20 changes: 20 additions & 0 deletions apps/web/src/components/chat/ComposerBannerStack.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vite-plus/test";

import { ComposerBannerStack, type ComposerBannerStackItem } from "./ComposerBannerStack";
import { ComposerBanner } from "./ComposerBanner";

const banner = (
id: string,
Expand Down Expand Up @@ -47,6 +48,25 @@ describe("ComposerBannerStack", () => {
expect(warningBehind).toContain("border-warning/24");
});

it("keeps routine info and success banners neutral", () => {
const infoRoot = renderToStaticMarkup(<ComposerBanner.Root variant="info" />);
const successRoot = renderToStaticMarkup(<ComposerBanner.Root variant="success" />);

for (const markup of [infoRoot, successRoot]) {
expect(markup).toContain("--chat-composer-attached-outline:var(--chat-composer-outline");
expect(markup).not.toContain("--chat-composer-attached-tint:color-mix");
}

for (const variant of ["info", "success"] as const) {
const stack = renderToStaticMarkup(
<ComposerBannerStack items={[banner(variant, variant)]} />,
);
expect(stack).toContain('data-variant="default"');
expect(stack).not.toContain(`border-${variant}/32`);
expect(stack).not.toContain(`bg-${variant}/4`);
}
});

it("does not render an expandable region for a single banner", () => {
const markup = renderToStaticMarkup(<ComposerBannerStack items={[banner("front")]} />);

Expand Down
6 changes: 4 additions & 2 deletions apps/web/src/components/chat/ComposerBannerStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,19 @@ function ComposerBannerStackAlert({
readonly onDismissRequest: () => void;
}) {
const dismissOnly = item.onDismiss && !item.actions;
const visualVariant =
item.variant === "info" || item.variant === "success" ? "default" : item.variant;

return (
<Alert
variant={item.variant}
variant={visualVariant}
className={cn(
attached
? "chat-composer-drawer-surface chat-composer-drawer-attached px-3 pt-2 pb-[calc(var(--chat-composer-attachment-overlap)_+_0.375rem)] text-xs sm:px-4"
: "alert-glass rounded-[22px]",
item.className,
)}
data-variant={item.variant}
data-variant={visualVariant}
>
{item.icon}
<AlertTitle>{item.title}</AlertTitle>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/settings/ProviderInstanceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ export function ProviderInstanceCard({
"size-5 rounded-sm p-0",
versionAdvisory.emphasis === "strong"
? "text-warning hover:text-warning"
: "text-update-foreground hover:text-update-foreground",
: "text-muted-foreground hover:text-foreground",
)}
aria-label="Update available — view details"
>
Expand Down Expand Up @@ -651,7 +651,7 @@ export function ProviderInstanceCard({
<Button
type="button"
size="xs"
variant="default"
variant="outline"
className="w-full"
disabled={isUpdating}
onClick={onRunUpdate}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/settings/SettingsPanels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ function AboutVersionSection() {
render={
<Button
size="xs"
variant={action === "install" ? "default" : "outline"}
variant="outline"
disabled={buttonDisabled || isUpdateActionPending}
onClick={handleButtonClick}
>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function DesktopUpdateAvailableIcon() {
<DownloadIcon className="size-4" />
<span
aria-hidden="true"
className="absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-update-foreground ring-2 ring-update-surface"
className="absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-current ring-2 ring-sidebar-control-surface"
/>
</span>
);
Expand Down Expand Up @@ -93,7 +93,7 @@ function DesktopUpdateDownloadedIcon() {
return (
<span className="relative grid size-4 place-items-center">
<RotateCwIcon className="size-4" />
<span className="absolute -right-1 -bottom-1 grid size-2.5 place-items-center rounded-full bg-update-foreground text-background ring-2 ring-background">
<span className="absolute -right-1 -bottom-1 grid size-2.5 place-items-center rounded-full bg-foreground text-background ring-2 ring-background">
<CheckIcon className="size-2" strokeWidth={3} />
</span>
</span>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import { Button } from "../ui/button";

const PROVIDER_UPDATE_PILL_STYLES = {
loading:
"bg-update-surface text-update-foreground group-has-[button.provider-update-main:hover]/provider-update:bg-update/22",
"bg-sidebar-control-surface text-sidebar-foreground group-has-[button.provider-update-main:hover]/provider-update:bg-sidebar-row-hover",
success:
"bg-success/12 text-success group-has-[button.provider-update-main:hover]/provider-update:bg-success/18",
"bg-sidebar-control-surface text-sidebar-foreground group-has-[button.provider-update-main:hover]/provider-update:bg-sidebar-row-hover",
warning:
"bg-warning/12 text-warning group-has-[button.provider-update-main:hover]/provider-update:bg-warning/18",
error:
"bg-destructive/12 text-destructive group-has-[button.provider-update-main:hover]/provider-update:bg-destructive/18",
} as const;

const PROVIDER_UPDATE_PILL_PROGRESS_STYLES = {
success: "bg-success/18",
success: "bg-foreground/8",
warning: "bg-warning/14",
error: "bg-destructive/14",
} as const;
Expand Down
19 changes: 3 additions & 16 deletions apps/web/src/components/sidebar/SidebarUpdatePill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ function SidebarUpdateControl() {
isInteractionDisabled ? "cursor-not-allowed" : "cursor-pointer",
showUpdateIconState
? cn(
"bg-update-surface text-update-foreground",
!isInteractionDisabled && "hover:bg-update/12",
"bg-sidebar-control-surface text-sidebar-foreground",
!isInteractionDisabled && "hover:bg-sidebar-row-hover",
)
: cn(
"text-[var(--sidebar-icon-color)]",
Expand All @@ -279,20 +279,7 @@ function SidebarUpdateControl() {
</button>
}
/>
<TooltipPopup
align="center"
side="top"
style={
showUpdateDetails
? {
background:
"color-mix(in srgb, var(--update) 18%, color-mix(in srgb, var(--popover) var(--glass-opacity), transparent))",
borderColor: "var(--update-foreground)",
}
: undefined
}
variant={showUpdateDetails ? "glass" : "default"}
>
<TooltipPopup align="center" side="top" variant={showUpdateDetails ? "glass" : "default"}>
{tooltip}
</TooltipPopup>
</Tooltip>
Expand Down
Loading