History

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

maria committed 2 months ago

Commit 98725df1 parent 08aad599 files · +19 −29Browse files

Unified · Split

9 files
  1. apps/web/src/components/ProviderUpdateEnvironmentRows.tsx +1 −1
  2. apps/web/src/components/ProviderUpdatePrimaryNotification.tsx +1 −1
  3. apps/web/src/components/ServerUpdateAction.tsx +1 −1
  4. apps/web/src/components/chat/ComposerBanner.tsx +4 −5
  5. apps/web/src/components/settings/ProviderInstanceCard.tsx +3 −3
  6. apps/web/src/components/settings/SettingsPanels.tsx +1 −1
  7. apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx +2 −2
  8. apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx +3 −3
  9. apps/web/src/components/sidebar/SidebarUpdatePill.tsx +3 −12
apps/web/src/components/ProviderUpdateEnvironmentRows.tsx+1−1
@@ -133,7 +133,7 @@ function EnvironmentUpdateRow({ · 132 unmodified lines
133133 break;
134134 default:
135135 trailing = (
136− <Button size="xs" onClick={onUpdate}>
136+ <Button size="xs" variant="outline" onClick={onUpdate}>
137137 Update
138138 </Button>
139139 );
apps/web/src/components/ProviderUpdatePrimaryNotification.tsx+1−1
@@ -281,7 +281,7 @@ export function ProviderUpdatePrimaryNotification() { · 280 unmodified lines
281281 children: "Settings",
282282 onClick: openSettings,
283283 },
284− actionVariant: oneClickProviders.length > 0 ? "default" : "outline",
284+ actionVariant: "outline",
285285 data: {
286286 leadingIcon:
287287 updateProviders.length === 1 ? (
apps/web/src/components/ServerUpdateAction.tsx+1−1
@@ -154,7 +154,7 @@ export function ServerUpdateAction({ · 153 unmodified lines
154154 }
155155
156156 return (
157− <Button size="xs" onClick={() => void handleUpdate()}>
157+ <Button size="xs" variant="outline" onClick={() => void handleUpdate()}>
158158 {label}
159159 </Button>
160160 );
apps/web/src/components/chat/ComposerBanner.tsx+4−5
@@ -27,9 +27,8 @@ const variantColors: Record<ComposerBannerVariant, string> = { · 26 unmodified lines
2727 default: neutralOutline,
2828 error:
2929 "[--chat-composer-attached-outline:color-mix(in_srgb,var(--error)_32%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--error)_8%,transparent)]",
30− 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)]",
31− success:
32− "[--chat-composer-attached-outline:color-mix(in_srgb,var(--success)_32%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--success)_4%,transparent)]",
30+ info: neutralOutline,
31+ success: neutralOutline,
3332 warning:
3433 "[--chat-composer-attached-outline:color-mix(in_srgb,var(--warning)_28%,transparent)] [--chat-composer-attached-tint:color-mix(in_srgb,var(--warning)_8%,transparent)]",
3534 };
@@ -71,8 +70,8 @@ function Surface({ · 35 unmodified lines
7170 const peekBorder: Record<ComposerBannerVariant, string> = {
7271 default: "border-(--chat-composer-attached-outline)",
7372 error: "border-destructive/24",
74− info: "border-info/24",
75− success: "border-success/24",
73+ info: "border-(--chat-composer-attached-outline)",
74+ success: "border-(--chat-composer-attached-outline)",
7675 warning: "border-warning/24",
7776 };
7877
apps/web/src/components/settings/ProviderInstanceCard.tsx+3−3
@@ -660,7 +660,7 @@ export function ProviderInstanceCard({ · 659 unmodified lines
660660 {versionCodeNode}
661661 {versionAdvisory ? (
662662 <span role="img" aria-label="Update available" className="inline-flex shrink-0">
663− <ArrowUpCircleIcon className="size-3.5 text-update-foreground" />
663+ <ArrowUpCircleIcon className="size-3.5 text-muted-foreground" />
664664 </span>
665665 ) : null}
666666 </span>
@@ -715,7 +715,7 @@ export function ProviderInstanceCard({ · 48 unmodified lines
715715 "size-5 rounded-sm p-0",
716716 versionAdvisory.emphasis === "strong"
717717 ? "text-warning hover:text-warning"
718− : "text-update-foreground hover:text-update-foreground",
718+ : "text-muted-foreground hover:text-foreground",
719719 )}
720720 aria-label="Update available — view details"
721721 >
@@ -748,7 +748,7 @@ export function ProviderInstanceCard({ · 26 unmodified lines
748748 <Button
749749 type="button"
750750 size="xs"
751− variant="default"
751+ variant="outline"
752752 className="w-full"
753753 disabled={isUpdating}
754754 onClick={onRunUpdate}
apps/web/src/components/settings/SettingsPanels.tsx+1−1
@@ -388,7 +388,7 @@ function AboutVersionSection() { · 387 unmodified lines
388388 render={
389389 <Button
390390 size="xs"
391− variant={action === "install" ? "default" : "outline"}
391+ variant="outline"
392392 disabled={buttonDisabled || isUpdateActionPending}
393393 onClick={handleButtonClick}
394394 >
apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx+2−2
@@ -46,7 +46,7 @@ function DesktopUpdateAvailableIcon() { · 45 unmodified lines
4646 <DownloadIcon className="size-4" />
4747 <span
4848 aria-hidden="true"
49− className="absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-update-foreground ring-2 ring-update-surface"
49+ className="absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-current ring-2 ring-sidebar-control-surface"
5050 />
5151 </span>
5252 );
@@ -93,7 +93,7 @@ function DesktopUpdateDownloadedIcon() { · 40 unmodified lines
9393 return (
9494 <span className="relative grid size-4 place-items-center">
9595 <RotateCwIcon className="size-4" />
96− <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">
96+ <span className="absolute -right-1 -bottom-1 grid size-2.5 place-items-center rounded-full bg-foreground text-background ring-2 ring-background">
9797 <CheckIcon className="size-2" strokeWidth={3} />
9898 </span>
9999 </span>
apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx+3−3
@@ -14,9 +14,9 @@ import { Button } from "../ui/button"; · 13 unmodified lines
1414
1515 const PROVIDER_UPDATE_PILL_STYLES = {
1616 loading:
17− "bg-update-surface text-update-foreground group-has-[button.provider-update-main:hover]/provider-update:bg-update/22",
17+ "bg-sidebar-control-surface text-sidebar-foreground group-has-[button.provider-update-main:hover]/provider-update:bg-sidebar-row-hover",
1818 success:
19− "bg-success/12 text-success group-has-[button.provider-update-main:hover]/provider-update:bg-success/18",
19+ "bg-sidebar-control-surface text-sidebar-foreground group-has-[button.provider-update-main:hover]/provider-update:bg-sidebar-row-hover",
2020 warning:
2121 "bg-warning/12 text-warning group-has-[button.provider-update-main:hover]/provider-update:bg-warning/18",
2222 error:
@@ -24,7 +24,7 @@ const PROVIDER_UPDATE_PILL_STYLES = { · 1 unmodified line
2424 } as const;
2525
2626 const PROVIDER_UPDATE_PILL_PROGRESS_STYLES = {
27− success: "bg-success/18",
27+ success: "bg-foreground/8",
2828 warning: "bg-warning/14",
2929 error: "bg-destructive/14",
3030 } as const;
apps/web/src/components/sidebar/SidebarUpdatePill.tsx+3−12
@@ -84,7 +84,7 @@ function SidebarUpdateReleaseNotesTooltip({ · 83 unmodified lines
8484 Update ready to download
8585 </div>
8686 {state.availableVersion ? (
87− <div className="mt-0.5 text-xs leading-4 text-update-foreground">
87+ <div className="mt-0.5 text-xs leading-4 text-muted-foreground">
8888 {state.availableVersion}
8989 </div>
9090 ) : null}
@@ -319,8 +319,8 @@ function SidebarUpdateControl() { · 228 unmodified lines
319319 isInteractionDisabled ? "cursor-not-allowed" : "cursor-pointer",
320320 showUpdateIconState
321321 ? cn(
322− "bg-update-surface text-update-foreground",
323− !isInteractionDisabled && "hover:bg-update/12",
322+ "bg-sidebar-control-surface text-sidebar-foreground",
323+ !isInteractionDisabled && "hover:bg-sidebar-row-hover",
324324 )
325325 : cn(
326326 "text-[var(--sidebar-icon-color)]",
@@ -351,15 +351,6 @@ function SidebarUpdateControl() { · 24 unmodified lines
351351 : undefined
352352 }
353353 side="top"
354− style={
355− showUpdateDetails
356− ? {
357− background:
358− "color-mix(in srgb, var(--update) 18%, color-mix(in srgb, var(--popover) var(--glass-opacity), transparent))",
359− borderColor: "var(--update-foreground)",
360− }
361− : undefined
362− }
363354 variant={showUpdateDetails ? "glass" : "default"}
364355 >
365356 {showUpdateDetails && state ? (