Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(web): mute routine notices and update actions (#141)

EgerDev1b73b312d7b5
diff --git a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
index 4eb9a2a8e..18da902c8 100644
--- a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
+++ b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
@@ -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"));
@@ -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"));
diff --git a/apps/web/src/components/ProviderUpdateEnvironmentRows.tsx b/apps/web/src/components/ProviderUpdateEnvironmentRows.tsx
index 28242b88f..56aaa9e96 100644
--- a/apps/web/src/components/ProviderUpdateEnvironmentRows.tsx
+++ b/apps/web/src/components/ProviderUpdateEnvironmentRows.tsx
@@ -133,7 +133,7 @@ function EnvironmentUpdateRow({
break;
default:
trailing = (
- <Button size="xs" onClick={onUpdate}>
+ <Button size="xs" variant="outline" onClick={onUpdate}>
Update
</Button>
);
diff --git a/apps/web/src/components/ProviderUpdatePrimaryNotification.test.tsx b/apps/web/src/components/ProviderUpdatePrimaryNotification.test.tsx
index 531223f24..a9423979a 100644
--- a/apps/web/src/components/ProviderUpdatePrimaryNotification.test.tsx
+++ b/apps/web/src/components/ProviderUpdatePrimaryNotification.test.tsx
@@ -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(
diff --git a/apps/web/src/components/ProviderUpdatePrimaryNotification.tsx b/apps/web/src/components/ProviderUpdatePrimaryNotification.tsx
index 8766ed8a7..7ab94f44b 100644
--- a/apps/web/src/components/ProviderUpdatePrimaryNotification.tsx
+++ b/apps/web/src/components/ProviderUpdatePrimaryNotification.tsx
@@ -301,7 +301,7 @@ export function ProviderUpdatePrimaryNotification() {
children: "Settings",
onClick: openSettings,
},
- actionVariant: oneClickProviders.length > 0 ? "default" : "outline",
+ actionVariant: "outline",
data: {
leadingIcon:
updateProviders.length === 1 ? (
diff --git a/apps/web/src/components/ServerUpdateAction.tsx b/apps/web/src/components/ServerUpdateAction.tsx
index 6fdf89f92..c7a46f4b6 100644
--- a/apps/web/src/components/ServerUpdateAction.tsx
+++ b/apps/web/src/components/ServerUpdateAction.tsx
@@ -154,7 +154,7 @@ export function ServerUpdateAction({
}
return (
- <Button size="xs" onClick={() => void handleUpdate()}>
+ <Button size="xs" variant="outline" onClick={() => void handleUpdate()}>
{label}
</Button>
);
diff --git a/apps/web/src/components/chat/ComposerBanner.tsx b/apps/web/src/components/chat/ComposerBanner.tsx
index f81565718..d222972b4 100644
--- a/apps/web/src/components/chat/ComposerBanner.tsx
+++ b/apps/web/src/components/chat/ComposerBanner.tsx
@@ -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)]",
};
@@ -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",
};
diff --git a/apps/web/src/components/chat/ComposerBannerStack.test.tsx b/apps/web/src/components/chat/ComposerBannerStack.test.tsx
index 33d0d17ee..c75ad3aed 100644
--- a/apps/web/src/components/chat/ComposerBannerStack.test.tsx
+++ b/apps/web/src/components/chat/ComposerBannerStack.test.tsx
@@ -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,
@@ -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")]} />);
diff --git a/apps/web/src/components/chat/ComposerBannerStack.tsx b/apps/web/src/components/chat/ComposerBannerStack.tsx
index d8b876144..e4b0874c7 100644
--- a/apps/web/src/components/chat/ComposerBannerStack.tsx
+++ b/apps/web/src/components/chat/ComposerBannerStack.tsx
@@ -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>
diff --git a/apps/web/src/components/settings/ProviderInstanceCard.tsx b/apps/web/src/components/settings/ProviderInstanceCard.tsx
index a663aa909..c232c454b 100644
--- a/apps/web/src/components/settings/ProviderInstanceCard.tsx
+++ b/apps/web/src/components/settings/ProviderInstanceCard.tsx
@@ -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"
>
@@ -651,7 +651,7 @@ export function ProviderInstanceCard({
<Button
type="button"
size="xs"
- variant="default"
+ variant="outline"
className="w-full"
disabled={isUpdating}
onClick={onRunUpdate}
diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx
index 95202446c..db0048515 100644
--- a/apps/web/src/components/settings/SettingsPanels.tsx
+++ b/apps/web/src/components/settings/SettingsPanels.tsx
@@ -349,7 +349,7 @@ function AboutVersionSection() {
render={
<Button
size="xs"
- variant={action === "install" ? "default" : "outline"}
+ variant="outline"
disabled={buttonDisabled || isUpdateActionPending}
onClick={handleButtonClick}
>
diff --git a/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx b/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx
index 9346a742a..60fa379ce 100644
--- a/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx
+++ b/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx
@@ -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>
);
@@ -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>
diff --git a/apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx b/apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx
index ef067ec42..494ee97e7 100644
--- a/apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx
+++ b/apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx
@@ -14,9 +14,9 @@ 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:
@@ -24,7 +24,7 @@ const PROVIDER_UPDATE_PILL_STYLES = {
} 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;
diff --git a/apps/web/src/components/sidebar/SidebarUpdatePill.tsx b/apps/web/src/components/sidebar/SidebarUpdatePill.tsx
index cf5e74682..b17005890 100644
--- a/apps/web/src/components/sidebar/SidebarUpdatePill.tsx
+++ b/apps/web/src/components/sidebar/SidebarUpdatePill.tsx
@@ -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)]",
@@ -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>