feat(webui): unify icons and refine interaction feedback (#6074)

* feat(webui): unify product icons and refine interaction feedback

* test(webui): align layout and tooltip expectations with icon refresh

* test(webui): verify temporary chat uses shared icon controls

* fix(webui): toggle workspace access directly and restore send arrow

* fix(webui): keep the send control circular

* fix(webui): clear workspace toggle background on pointer leave

* test(webui): isolate GitHub navigation in star prompt tests

* test(webui): prevent external default navigation during star link clicks
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-06 00:46:38 +08:00
1 parent 9dc0abae4f
commit 63bdd40280
59 files changed
+615 -505

No files matched your search

@@ -1,3 +1,9 @@
import {
ImportIcon,
UpdateIcon,
McpIcon,
AppActionsIcon,
} from "@/components/icons/product-icons";
import {
forwardRef,
useEffect,
@@ -14,16 +20,12 @@ import {
ChevronDown,
ChevronRight,
Clipboard,
Database,
ExternalLink,
Loader2,
PauseCircle,
PlayCircle,
Plus,
RotateCcw,
Search,
Server,
SlidersHorizontal,
TriangleAlert,
Trash2,
} from "lucide-react";
@@ -440,7 +442,7 @@ function CliAppsCatalogRow({
disabled={busy}
tone="installed"
>
<Check className="h-4 w-4" aria-hidden />
<AppActionsIcon className="h-4 w-4" aria-hidden />
</AppsActionButton>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
@@ -449,7 +451,7 @@ function CliAppsCatalogRow({
{tx("settings.cliApps.test", "Test CLI")}
</DropdownMenuItem>
<DropdownMenuItem disabled={busy} onClick={() => onAction("update", app.name)}>
<RotateCcw aria-hidden />
<UpdateIcon aria-hidden />
{tx("settings.cliApps.update", "Update CLI")}
</DropdownMenuItem>
<DropdownMenuItem
@@ -674,7 +676,7 @@ function McpAppsCatalogRow({
disabled={anotherOAuthBusy}
onClick={() => openManagement("connection")}
>
<SlidersHorizontal className="h-4 w-4" aria-hidden />
<AppActionsIcon className="h-4 w-4" aria-hidden />
</AppsActionButton>
) : readyInstalled ? (
toggleable ? (
@@ -687,7 +689,7 @@ function McpAppsCatalogRow({
disabled={busy}
tone="installed"
>
<Check className="h-4 w-4" aria-hidden />
<AppActionsIcon className="h-4 w-4" aria-hidden />
</AppsActionButton>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
@@ -712,7 +714,7 @@ function McpAppsCatalogRow({
tone={runtimeConnected ? "installed" : "default"}
onClick={() => openManagement("overview")}
>
<Check className="h-4 w-4" aria-hidden />
<AppActionsIcon className="h-4 w-4" aria-hidden />
</AppsActionButton>
)
) : preset.enabled === false ? (
@@ -927,18 +929,18 @@ const AppsActionButton = forwardRef<HTMLButtonElement, AppsActionButtonProps>(
ref={ref}
type="button"
size={visibleLabel ? "sm" : "icon"}
variant="ghost"
variant={visibleLabel ? "ghost" : "icon"}
aria-label={ariaLabel}
title={ariaLabel}
title={visibleLabel ? undefined : ariaLabel}
disabled={disabled || busy}
className={cn(
"rounded-full text-muted-foreground transition-colors",
visibleLabel
? "h-8 w-auto gap-1.5 px-3 text-[12px] font-semibold"
: "h-9 w-9",
tone === "installed" && "bg-transparent settings-hover hover:text-foreground",
tone === "danger" && "bg-transparent hover:bg-destructive/10 hover:text-destructive",
tone === "default" && "bg-muted/70 settings-hover hover:text-foreground",
tone === "installed" && "bg-transparent hover:text-foreground",
tone === "danger" && "bg-transparent hover:text-destructive",
tone === "default" && "bg-muted/70 hover:text-foreground",
className,
)}
>
@@ -1038,7 +1040,7 @@ function McpCustomServerPanel({
<div className="flex flex-col gap-3 px-3 py-3 sm:flex-row sm:items-center sm:justify-between">
<div className="flex min-w-0 items-center gap-3">
<span className="grid h-9 w-9 shrink-0 place-items-center rounded-control bg-muted text-muted-foreground">
<Server className="h-4 w-4" aria-hidden />
<McpIcon className="h-4 w-4" aria-hidden />
</span>
<div className="min-w-0">
<h3 className="text-[13px] font-semibold leading-5 text-foreground">
@@ -1060,7 +1062,7 @@ function McpCustomServerPanel({
onClick={() => setActiveMode((mode) => (mode === "custom" ? null : "custom"))}
className="h-8 rounded-full px-3 text-[12px] font-semibold"
>
<Server className="mr-1.5 h-3.5 w-3.5" aria-hidden />
<McpIcon className="mr-1.5 h-3.5 w-3.5" aria-hidden />
{tx("settings.mcp.customAction", "Custom")}
</Button>
<Button
@@ -1070,7 +1072,7 @@ function McpCustomServerPanel({
onClick={() => setActiveMode((mode) => (mode === "import" ? null : "import"))}
className="h-8 rounded-full px-3 text-[12px] font-semibold"
>
<Database className="mr-1.5 h-3.5 w-3.5" aria-hidden />
<ImportIcon className="mr-1.5 h-3.5 w-3.5" aria-hidden />
{tx("settings.mcp.importAction", "Import")}
</Button>
</div>
@@ -1275,7 +1277,7 @@ function McpCustomServerPanel({
disabled={!configImport.trim() || importBusy}
className="h-9 shrink-0 rounded-full px-4 text-[12.5px] font-semibold"
>
{importBusy ? <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden /> : <Database className="mr-1.5 h-3.5 w-3.5" aria-hidden />}
{importBusy ? <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden /> : <ImportIcon className="mr-1.5 h-3.5 w-3.5" aria-hidden />}
{tx("settings.mcp.importConfig", "Import")}
</Button>
</div>
@@ -187,7 +187,7 @@ export function AutomationsSettings({
const filters = visibleJobs.length ? (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="sm" aria-label={filterLabel} title={filterLabel}
<Button variant="ghost" size="sm" aria-label={filterLabel} title={filter === "all" ? filterLabel : undefined}
className={cn("h-8 text-[12px]", filter === "all" ? "w-8 p-0 text-muted-foreground" : "gap-1.5 bg-background text-foreground")}>
<ListFilter className="h-4 w-4" strokeWidth={1.5} aria-hidden />
{filter !== "all" ? filterLabel : null}
@@ -168,7 +168,7 @@ export function ChannelsSettings({
<div className="relative">
<div className="absolute end-6 top-6 z-10 flex h-10 items-center gap-1">
{selectedChannel ? <ChannelHelpMenu feature={selectedChannel} chatAppsDocsUrl={chatAppsDocsUrl} /> : null}
<DialogClose className="grid h-8 w-8 place-items-center rounded-full text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring">
<DialogClose className="grid h-8 w-8 place-items-center rounded-full text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring">
<X className="h-4 w-4" aria-hidden />
<span className="sr-only">{t("common.close")}</span>
</DialogClose>
@@ -1,15 +1,8 @@
import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import {
Check,
ExternalLink,
Loader2,
RotateCcw,
Search,
Server,
SlidersHorizontal,
Trash2,
X,
} from "lucide-react";
AppActionsIcon,
} from "@/components/icons/product-icons";
import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import { Check, ExternalLink, Loader2, RotateCcw, Search, Server, Trash2, X } from "lucide-react";
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
@@ -383,7 +376,7 @@ function ToolsPanel({
{testBusy ? (
<Loader2 className="h-4 w-4 animate-spin motion-reduce:animate-none" aria-hidden />
) : (
<SlidersHorizontal className="h-4 w-4" aria-hidden />
<AppActionsIcon className="h-4 w-4" aria-hidden />
)}
</div>
<p