From 63bdd402803a3b055d7a249fd059c4cfb0e7ca98 Mon Sep 17 00:00:00 2001 From: chengyongru <61816729+chengyongru@users.noreply.github.com> Date: Tue, 6 Oct 2026 00:46:38 +0800 Subject: [PATCH] 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 --- webui/src/components/ChatList.tsx | 24 +-- webui/src/components/CodeBlock.tsx | 2 +- webui/src/components/ImageLightbox.tsx | 4 +- webui/src/components/MessageBubble.tsx | 21 +-- webui/src/components/PreviewPane.tsx | 4 +- webui/src/components/Sidebar.tsx | 52 +++---- .../components/SidebarSelectionHighlight.tsx | 4 +- webui/src/components/WebPreviewPanel.tsx | 2 +- webui/src/components/ZoomableImage.tsx | 4 +- webui/src/components/icons/product-icons.tsx | 80 ++++++++++ .../remote/HostConnectionStatus.tsx | 2 +- webui/src/components/remote/HostSwitcher.tsx | 14 +- .../remote/RemoteConnectionsPage.tsx | 2 +- .../components/settings/SettingsSidebar.tsx | 51 +++---- .../settings/SkillsCatalogSettings.tsx | 2 +- .../components/settings/SkillsMarketplace.tsx | 4 +- .../settings/capabilities/WebSettings.tsx | 4 +- .../settings/channels/ChannelCatalogRow.tsx | 2 +- .../settings/channels/ChannelHelpMenu.tsx | 2 +- .../settings/channels/CredentialForm.tsx | 2 +- .../settings/models/ProviderSettings.tsx | 6 +- .../settings/overview/OverviewSettings.tsx | 20 +-- .../settings/shared/SettingsControls.tsx | 4 +- .../settings/shared/SettingsTextEditor.tsx | 2 +- .../settings/system/AppsSettings.tsx | 38 ++--- .../settings/system/AutomationsSettings.tsx | 2 +- .../settings/system/ChannelsSettings.tsx | 2 +- .../settings/system/McpManagementDialog.tsx | 17 +-- .../thread/AgentActivityCluster.tsx | 52 ++----- .../components/thread/ModelPresetBadge.tsx | 11 +- .../src/components/thread/PromptNavigator.tsx | 11 +- .../src/components/thread/RecoveryNotice.tsx | 7 +- .../components/thread/SessionInfoPopover.tsx | 4 +- .../components/thread/StreamErrorNotice.tsx | 2 +- webui/src/components/thread/SubagentTasks.tsx | 34 +++-- .../src/components/thread/ThreadComposer.tsx | 139 ++++++++++-------- webui/src/components/thread/ThreadHeader.tsx | 14 +- .../src/components/thread/ThreadMessages.tsx | 5 +- .../src/components/thread/ThreadViewport.tsx | 2 +- .../components/thread/WorkspaceControls.tsx | 137 +++++------------ .../thread/activity/ActivityStep.tsx | 22 +-- .../thread/activity/GenericToolRun.tsx | 47 ++++-- .../activity/ThinkingReasoningShell.tsx | 7 +- .../thread/activity/WebSearchRun.tsx | 7 +- webui/src/components/ui/button.tsx | 13 +- webui/src/components/ui/dialog.tsx | 2 +- .../components/workbench/PaneWorkbench.tsx | 5 +- webui/src/globals.css | 91 ++++++++---- webui/src/tests/app-layout.test.tsx | 8 +- webui/src/tests/host-switcher.test.tsx | 18 ++- webui/src/tests/model-preset-badge.test.tsx | 8 +- webui/src/tests/pane-workbench.test.tsx | 9 +- webui/src/tests/reasoning-row.test.tsx | 8 +- webui/src/tests/remote-instances.test.tsx | 6 +- webui/src/tests/settings-apps-oauth.test.tsx | 1 - webui/src/tests/star-prompt.test.tsx | 11 +- webui/src/tests/thread-composer.test.tsx | 61 ++++---- webui/src/tests/thread-messages.test.tsx | 1 - webui/src/tests/thread-shell.test.tsx | 4 +- 59 files changed, 615 insertions(+), 505 deletions(-) create mode 100644 webui/src/components/icons/product-icons.tsx diff --git a/webui/src/components/ChatList.tsx b/webui/src/components/ChatList.tsx index 380c9c30f..034ccddeb 100644 --- a/webui/src/components/ChatList.tsx +++ b/webui/src/components/ChatList.tsx @@ -1082,7 +1082,7 @@ export const ChatList = memo(function ChatList({ @@ -1275,10 +1275,10 @@ function WorkbenchTabHeader({ onClick={onToggle} className={cn( "relative inline-flex h-6 w-3.5 shrink-0 items-center justify-center rounded-md before:absolute before:-inset-x-1 before:inset-y-0", - "text-sidebar-muted-foreground transition-[background-color,color,transform] duration-150 ease-out", - "media-hover:hover:bg-sidebar-accent media-hover:hover:text-sidebar-foreground active:scale-[0.96]", + "text-sidebar-muted-foreground transition-[color] duration-150 ease-out", + "media-hover:hover:text-sidebar-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60", - "motion-reduce:transition-none motion-reduce:active:scale-100", + "motion-reduce:transition-none ", )} > onClose(session.key)} - className="inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-sidebar-muted-foreground transition-colors media-hover:hover:bg-destructive/10 media-hover:hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60" + className="inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-sidebar-muted-foreground transition-colors media-hover:hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60" > @@ -1776,10 +1776,10 @@ function ProjectGroupHeader({ onClick={onToggle} className={cn( "relative inline-flex h-6 w-3.5 shrink-0 items-center justify-center rounded-md before:absolute before:-inset-x-1 before:inset-y-0", - "text-sidebar-muted-foreground transition-[background-color,color,transform] duration-150 ease-out", - "media-hover:hover:bg-sidebar-accent media-hover:hover:text-sidebar-foreground active:scale-[0.96]", + "text-sidebar-muted-foreground transition-[color] duration-150 ease-out", + "media-hover:hover:text-sidebar-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60", - "motion-reduce:transition-none motion-reduce:active:scale-100", + "motion-reduce:transition-none ", )} > @@ -219,8 +209,8 @@ export function MessageBlockMenuActions({ aria-label={t("message.forkFromHere")} className={cn( "inline-flex h-[var(--message-block-control-size)] w-[var(--message-block-action-width)] items-center justify-center rounded-control", - "text-muted-foreground transition-[color,background-color,scale]", - "hover:bg-muted/70 hover:text-foreground active:scale-[0.96]", + "text-muted-foreground transition-colors", + "hover:text-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "motion-reduce:transform-none", sheet && "w-full justify-start gap-2 px-2 text-sm", @@ -256,8 +246,7 @@ export function MessageBlockMenuActions({ data-message-block-activity-icon className={cn( "inline-flex h-[var(--message-block-control-size)] w-[var(--message-block-action-width)] shrink-0 items-center justify-center rounded-control", - "transition-[background-color,box-shadow,scale]", - "group-hover:bg-muted/70 group-active:scale-[0.96]", + "transition-colors", "group-focus-visible:ring-2 group-focus-visible:ring-ring", "motion-reduce:transform-none", sheet && "w-3.5", diff --git a/webui/src/components/PreviewPane.tsx b/webui/src/components/PreviewPane.tsx index efd1c40a7..4dc3459eb 100644 --- a/webui/src/components/PreviewPane.tsx +++ b/webui/src/components/PreviewPane.tsx @@ -51,7 +51,7 @@ export function PreviewPane({ tabs, activeId, width, isClosing, onSelect, onClos ? remaining[Math.min(index, remaining.length - 1)]?.id ?? null : activeId; onCloseTab(tab.id); }; - const iconButton = "touch-target inline-flex size-8 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"; + const iconButton = "touch-target inline-flex size-8 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"; return