Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🎚️ refactor: Use Primitive Tones, Variants and Shapes in Remaining Components (#16872)
Marco Berettaf26b60dd2341
diff --git a/client/src/components/Agents/AgentGrid.tsx b/client/src/components/Agents/AgentGrid.tsxindex d8f11e6eaf..6a00e07cd6 100644--- a/client/src/components/Agents/AgentGrid.tsx+++ b/client/src/components/Agents/AgentGrid.tsx@@ -431,7 +431,7 @@ const AgentGrid: React.FC<AgentGridProps> = ({aria-live="polite"aria-label={localize('com_agents_loading')}>- <Spinner className="text-text-primary h-6 w-6" />+ <Spinner tone="primary" className="h-6 w-6" /><span className="sr-only">{localize('com_agents_loading')}</span></div>)}diff --git a/client/src/components/Agents/SearchBar.tsx b/client/src/components/Agents/SearchBar.tsxindex a01afbb02e..6d2d41ac34 100644--- a/client/src/components/Agents/SearchBar.tsx+++ b/client/src/components/Agents/SearchBar.tsx@@ -89,13 +89,11 @@ const SearchBar: React.FC<SearchBarProps> = ({ value, onSearch, className = '' }{/* Show clear button only when search has value - Google style */}{searchTerm && (<Button- variant="ghost"+ variant="quiet"size="icon-sm"type="button"onClick={handleClear}- /* `ghost` only colours its hover state, so the glyph would inherit the- document's colour and disappear against a dark surface. */- className="text-text-secondary absolute end-0.5 top-1/2 -translate-y-1/2 rounded-md transition-none"+ className="absolute end-0.5 top-1/2 -translate-y-1/2 rounded-md transition-none"aria-label={localize('com_agents_clear_search')}><X className="size-4" aria-hidden="true" />diff --git a/client/src/components/Bookmarks/DeleteBookmarkButton.tsx b/client/src/components/Bookmarks/DeleteBookmarkButton.tsxindex 38d77d3b0e..b2feb2ff2f 100644--- a/client/src/components/Bookmarks/DeleteBookmarkButton.tsx+++ b/client/src/components/Bookmarks/DeleteBookmarkButton.tsx@@ -56,7 +56,7 @@ const DeleteBookmarkButton: FC<{onFocus={onFocus}onBlur={onBlur}onClick={() => setOpen(!open)}- className="h-8 w-8 p-0"+ size="icon-sm"><TrashIcon /></Button>diff --git a/client/src/components/Bookmarks/EditBookmarkButton.tsx b/client/src/components/Bookmarks/EditBookmarkButton.tsxindex 7c4355be81..4e603f107d 100644--- a/client/src/components/Bookmarks/EditBookmarkButton.tsx+++ b/client/src/components/Bookmarks/EditBookmarkButton.tsx@@ -32,7 +32,7 @@ const EditBookmarkButton: FC<{onFocus={onFocus}onBlur={onBlur}onClick={() => setOpen(!open)}- className="h-8 w-8 p-0"+ size="icon-sm"><EditIcon /></Button>diff --git a/client/src/components/Conversations/ConvoLink.tsx b/client/src/components/Conversations/ConvoLink.tsxindex 8b9748c327..b9ce02b7e2 100644--- a/client/src/components/Conversations/ConvoLink.tsx+++ b/client/src/components/Conversations/ConvoLink.tsx@@ -157,10 +157,10 @@ const ConvoLink: React.FC<ConvoLinkProps> = ({ref={titleRef}className={cn(isUnseen && !isGenerating && 'font-semibold',- 'min-w-0 flex-1 overflow-hidden [mask-size:100%_100%] [mask-position:left] [mask-repeat:no-repeat] [text-align:start] whitespace-nowrap [transition-property:mask-size] [transition-duration:0ms] [transition-timing-function:linear] [--convo-title-fade-width:24px] [--convo-title-reveal-duration:800ms] [&:dir(rtl)]:[mask-position:right]',+ 'min-w-0 flex-1 overflow-hidden [mask-size:100%_100%] [mask-position:left] [mask-repeat:no-repeat] [text-align:start] whitespace-nowrap [transition-property:mask-size] duration-0 ease-linear [--convo-title-fade-width:24px] [--convo-title-reveal-duration:800ms] [&:dir(rtl)]:[mask-position:right]',isOverflowing &&'[mask-image:linear-gradient(to_right,currentColor_calc(100%_-_var(--convo-title-fade-width)),transparent)] [&:dir(rtl)]:[mask-image:linear-gradient(to_left,currentColor_calc(100%_-_var(--convo-title-fade-width)),transparent)]',- 'data-[title-revealed=true]:[mask-size:calc(100%_+_var(--convo-title-fade-width))_100%] data-[title-revealed=true]:[transition-duration:var(--convo-title-reveal-duration)]',+ 'data-[title-revealed=true]:[mask-size:calc(100%_+_var(--convo-title-fade-width))_100%] data-[title-revealed=true]:duration-(--convo-title-reveal-duration)',)}onDoubleClick={(e) => {if (isSmallScreen) {diff --git a/client/src/components/Conversations/ProjectsSection.tsx b/client/src/components/Conversations/ProjectsSection.tsxindex fe16913f4a..4e9422b350 100644--- a/client/src/components/Conversations/ProjectsSection.tsx+++ b/client/src/components/Conversations/ProjectsSection.tsx@@ -155,10 +155,10 @@ const ProjectChatsInline = memo(function ProjectChatsInline({{hasMore && (<Buttontype="button"- variant="ghost"+ variant="quiet"size="sm"onClick={onShowAll}- className="text-text-secondary mt-0.5 ml-1 h-auto rounded-md px-2 py-1 text-xs font-medium"+ className="mt-0.5 ml-1 h-auto rounded-md px-2 py-1 text-xs font-medium">{localize('com_ui_show_all')}</Button>@@ -455,7 +455,7 @@ const ProjectsSection = ({ toggleNav, isAuthenticated }: ProjectsSectionProps) =if (isLoading && projects.length === 0) {return (<div className="flex justify-start py-2 pl-2">- <Spinner className="text-text-secondary h-4 w-4" />+ <Spinner tone="secondary" className="h-4 w-4" /></div>);}diff --git a/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx b/client/src/components/Input/SetKeyDialog/GoogleConfig.tsxindex 0cd587ac8a..b984dcede2 100644--- a/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx+++ b/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx@@ -28,7 +28,7 @@ const GoogleConfig = ({ userKey, setUserKey }: Pick<TConfigProps, 'userKey' | 's<Label htmlFor={AuthKeys.GOOGLE_SERVICE_KEY} className="text-left text-sm font-medium">{localize('com_endpoint_config_google_service_key')}</Label>- <Label className="mx-1 text-right text-sm text-text-secondary">+ <Label variant="secondary" className="mx-1 text-right text-sm">{localize('com_endpoint_config_google_cloud_platform')}</Label><br />diff --git a/client/src/components/Input/SetKeyDialog/InputWithLabel.tsx b/client/src/components/Input/SetKeyDialog/InputWithLabel.tsxindex 807ff0d454..280ca83df3 100644--- a/client/src/components/Input/SetKeyDialog/InputWithLabel.tsx+++ b/client/src/components/Input/SetKeyDialog/InputWithLabel.tsx@@ -1,8 +1,8 @@import { forwardRef } from 'react';import { Input, Label, SecretInput } from '@librechat/client';import type { ChangeEvent, FC, Ref } from 'react';-import { cn } from '~/utils/';import { useLocalize } from '~/hooks';+import { cn } from '~/utils/';interface InputWithLabelProps {id: string;@@ -35,7 +35,9 @@ const InputWithLabel: FC<InputWithLabelProps> = forwardRef((props, ref) => {{label}</Label>{subLabel && (- <Label className="mx-1 text-right text-sm text-text-secondary">{subLabel}</Label>+ <Label variant="secondary" className="mx-1 text-right text-sm">+ {subLabel}+ </Label>)}<br /></div>diff --git a/client/src/components/Insights/InsightsView.tsx b/client/src/components/Insights/InsightsView.tsxindex 66d41a9f0f..821a6a2372 100644--- a/client/src/components/Insights/InsightsView.tsx+++ b/client/src/components/Insights/InsightsView.tsx@@ -129,7 +129,7 @@ function EmptyState({ message }: { message: string }) {function LoadingState({ message }: { message: string }) {return (<Panel className="flex min-h-52 flex-col items-center justify-center gap-3">- <Spinner className="text-text-secondary size-7" />+ <Spinner tone="secondary" className="size-7" /><span className="text-text-secondary text-sm">{message}</span></Panel>);@@ -448,7 +448,7 @@ function LatestConversations({<h2 className="text-base font-semibold">{localize('com_insights_latest_conversations')}</h2>- {isFetching && <Spinner className="text-text-secondary size-4" />}+ {isFetching && <Spinner tone="secondary" className="size-4" />}</div><div className="relative w-full sm:max-w-md"><Search@@ -825,7 +825,7 @@ export default function InsightsView() {variant="ghost"aria-pressed={!customDateRange && range === item.value}className={cn(- 'h-8 rounded-md px-3',+ 'h-8 rounded-md',!customDateRange && range === item.value && 'bg-surface-active-alt',)}onClick={() => {diff --git a/client/src/components/MCP/CustomUserVarsSection.tsx b/client/src/components/MCP/CustomUserVarsSection.tsxindex 827f88c2d2..02f67304f7 100644--- a/client/src/components/MCP/CustomUserVarsSection.tsx+++ b/client/src/components/MCP/CustomUserVarsSection.tsx@@ -77,8 +77,7 @@ function AuthField({ name, config, hasValue, control, errors, autoFocus }: AuthFconst placeholder = hasValue? localize('com_ui_mcp_update_var', { 0: config.title }): localize('com_ui_mcp_enter_var', { 0: config.title });- const className =- 'w-full rounded border border-border-medium bg-transparent px-2 py-1 text-text-primary placeholder:text-text-secondary sm:text-sm';+ const className = 'w-full rounded border border-border-medium px-2 py-1 sm:text-sm';// Prevent autofill: browser DOM mutations bypass React's synthetic// onChange, silently emptying react-hook-form state on submit.const sharedProps = {diff --git a/client/src/components/MCP/MCPServerMenuItem.tsx b/client/src/components/MCP/MCPServerMenuItem.tsxindex 1f6e59c5ae..4e6af7a03e 100644--- a/client/src/components/MCP/MCPServerMenuItem.tsx+++ b/client/src/components/MCP/MCPServerMenuItem.tsx@@ -57,16 +57,16 @@ export default function MCPServerMenuItem({)}>{/* Server Icon with Status Dot */}- <div className="relative shrink-0">+ <div className="text-text-primary relative shrink-0">{server.config?.iconPath ? (<CustomIconsrc={server.config.iconPath}- className="text-text-primary h-8 w-8 rounded-lg object-cover"+ className="h-8 w-8 rounded-lg object-cover"alt=""/>) : (- <div className="bg-surface-tertiary flex h-8 w-8 items-center justify-center rounded-lg">- <MCPIcon className="text-text-secondary h-5 w-5" />+ <div className="bg-surface-tertiary text-text-secondary flex h-8 w-8 items-center justify-center rounded-lg">+ <MCPIcon className="h-5 w-5" /></div>)}{/* Status dot - decorative, status is announced via aria-label on MenuItem */}diff --git a/client/src/components/MCP/MCPServerStatusIcon.tsx b/client/src/components/MCP/MCPServerStatusIcon.tsxindex bc730981d4..f5e637a446 100644--- a/client/src/components/MCP/MCPServerStatusIcon.tsx+++ b/client/src/components/MCP/MCPServerStatusIcon.tsx@@ -167,7 +167,7 @@ function LoadingStatusIcon({ serverName, onCancel, canCancel }: InitializingStataria-label={localize('com_ui_cancel')}><div className="relative size-4">- <Spinner className="text-text-primary size-4 group-hover:opacity-0" />+ <Spinner tone="primary" className="size-4 group-hover:opacity-0" /><X className="text-text-destructive absolute inset-0 size-4 opacity-0 group-hover:opacity-100" /></div></Button>@@ -179,7 +179,8 @@ function LoadingStatusIcon({ serverName, onCancel, canCancel }: InitializingStatreturn (<div className="flex size-6 items-center justify-center rounded p-1"><Spinner- className="text-text-primary size-4"+ tone="primary"+ className="size-4"aria-label={localize('com_nav_mcp_status_connecting', { 0: serverName })}/></div>@@ -190,7 +191,8 @@ function ConnectingSpinner({ serverName }: { serverName: string }) {return (<div className="flex size-6 items-center justify-center rounded p-1"><Spinner- className="text-text-primary size-4"+ tone="primary"+ className="size-4"aria-label={localize('com_nav_mcp_status_connecting', { 0: serverName })}/></div>diff --git a/client/src/components/MCP/McpOAuthDialog.tsx b/client/src/components/MCP/McpOAuthDialog.tsxindex ff4cda44d4..e6154f2979 100644--- a/client/src/components/MCP/McpOAuthDialog.tsx+++ b/client/src/components/MCP/McpOAuthDialog.tsx@@ -77,7 +77,7 @@ export default function McpOAuthDialog({* open smoothly without a hardcoded height, matching MCPToolItem. */}<divclassName={cn(- 'grid transition-[grid-template-rows] [transition-duration:var(--resize-dur)] [transition-timing-function:var(--resize-ease)] motion-reduce:transition-none',+ 'grid transition-all duration-(--resize-dur) ease-(--resize-ease) motion-reduce:transition-none',showQR ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]',)}>diff --git a/client/src/components/MCP/StackedMCPIcons.tsx b/client/src/components/MCP/StackedMCPIcons.tsxindex cdeb35214b..6b6f4fcf10 100644--- a/client/src/components/MCP/StackedMCPIcons.tsx+++ b/client/src/components/MCP/StackedMCPIcons.tsx@@ -66,7 +66,7 @@ export default function StackedMCPIcons({key={icon.key}title={icon.displayName}className={cn(- 'relative flex items-center justify-center rounded-full border',+ 'text-text-primary relative flex items-center justify-center rounded-full border',colors.border,colors.bg,sizes.container,@@ -78,10 +78,10 @@ export default function StackedMCPIcons({<CustomIconsrc={icon.iconPath}alt={icon.displayName}- className={cn('text-text-primary rounded-full object-cover', sizes.icon)}+ className={cn('rounded-full object-cover', sizes.icon)}/>) : (- <MCPIcon className={cn('text-text-primary', sizes.icon)} />+ <MCPIcon className={sizes.icon} />)}</div>))}diff --git a/client/src/components/Messages/Content/CodeBlock.tsx b/client/src/components/Messages/Content/CodeBlock.tsxindex 332981419b..73758521b1 100644--- a/client/src/components/Messages/Content/CodeBlock.tsx+++ b/client/src/components/Messages/Content/CodeBlock.tsx@@ -139,7 +139,7 @@ const CodeBlock: React.FC<CodeBlockProps> = ({{allowExecution === true && toolCalls && toolCalls.length > 0 && (<><div className="border-border-inset bg-surface-code border-t p-4 text-xs">- <div className="text-text-secondary mb-1 text-[10px] font-medium tracking-wide uppercase">+ <div className="text-text-secondary text-3xs mb-1 font-medium tracking-wide uppercase">{localize('com_ui_output')}</div><div className="text-text-primary flex flex-col-reverse">diff --git a/client/src/components/Plugins/Store/PluginAuthForm.tsx b/client/src/components/Plugins/Store/PluginAuthForm.tsxindex de6b433cb3..f0cc29cf74 100644--- a/client/src/components/Plugins/Store/PluginAuthForm.tsx+++ b/client/src/components/Plugins/Store/PluginAuthForm.tsx@@ -156,7 +156,7 @@ function PluginAuthForm({};return (<div key={`${authField}-${i}`} className="flex w-full flex-col gap-1.5">- <Label htmlFor={authField} className="text-sm font-medium text-text-secondary">+ <Label htmlFor={authField} variant="secondary" className="text-sm font-medium">{config.label}</Label><HoverCard openDelay={300}>diff --git a/client/src/components/Share/ShareArtifacts.tsx b/client/src/components/Share/ShareArtifacts.tsxindex 2e4eadce13..653c4e0331 100644--- a/client/src/components/Share/ShareArtifacts.tsx+++ b/client/src/components/Share/ShareArtifacts.tsx@@ -150,9 +150,7 @@ export function ShareArtifactsContainer({>{mainContent}</ResizablePanel>- {showDockedPanel && (- <ResizableHandleAlt withHandle className="bg-border-medium text-text-primary" />- )}+ {showDockedPanel && <ResizableHandleAlt withHandle className="text-text-primary" />}{showDockedPanel && (<ResizablePaneldefaultSize={`${normalizedArtifactSize}`}diff --git a/client/src/components/Share/ShareView.tsx b/client/src/components/Share/ShareView.tsxindex 9566f2a490..254f747c8f 100644--- a/client/src/components/Share/ShareView.tsx+++ b/client/src/components/Share/ShareView.tsx@@ -376,7 +376,7 @@ export function ShareHeader({<div className="flex flex-wrap items-center justify-end gap-2 md:flex-nowrap md:self-start">{langfuseSessionUrl && (- <Button asChild variant="outline" className="border-border-medium rounded-full">+ <Button asChild variant="outline" shape="round" className="border-border-medium"><a href={langfuseSessionUrl} target="_blank" rel="noopener noreferrer"><span>{langfuseSessionLabel}</span><ExternalLink className="size-4 shrink-0" aria-hidden="true" />@@ -388,7 +388,7 @@ export function ShareHeader({variant="submit"onClick={onContinue}disabled={isContinuing}- className="rounded-full"+ shape="round">{isContinuing ? (<Spinner className="size-4" />@@ -403,9 +403,10 @@ export function ShareHeader({size={isMobile ? 'icon' : 'default'}type="button"variant="outline"+ shape="round"aria-label={settingsLabel}className={cn(- 'border-border-medium text-text-primary rounded-full text-sm transition-colors',+ 'border-border-medium transition-colors',isMobile? 'absolute right-4 bottom-4 justify-center p-0 shadow-lg': 'gap-2 self-start px-4 py-2',diff --git a/client/src/components/Sharing/GenericGrantAccessDialog.tsx b/client/src/components/Sharing/GenericGrantAccessDialog.tsxindex bfa5e18831..93503ac6fe 100644--- a/client/src/components/Sharing/GenericGrantAccessDialog.tsx+++ b/client/src/components/Sharing/GenericGrantAccessDialog.tsx@@ -303,7 +303,7 @@ export default function GenericGrantAccessDialog({<Share2Icon className="icon-md h-4 w-4" /></span>{totalCurrentShares > 0 && (- <Label className="text-text-secondary cursor-pointer text-sm font-medium">+ <Label variant="secondary" className="cursor-pointer text-sm font-medium">{totalCurrentShares}</Label>)}@@ -449,7 +449,7 @@ export default function GenericGrantAccessDialog({});}}disabled={isCopying}- className={cn('shrink-0 gap-2', isCopying ? 'cursor-default' : '')}+ className={cn('shrink-0', isCopying ? 'cursor-default' : '')}aria-label={localize('com_ui_copy_url_to_clipboard')}><MorphIcon icon={isCopying ? CopyCheck : Link} className="size-4" />diff --git a/client/src/components/Tools/AssistantToolsDialog.tsx b/client/src/components/Tools/AssistantToolsDialog.tsxindex 48767ed588..7c84eabdef 100644--- a/client/src/components/Tools/AssistantToolsDialog.tsx+++ b/client/src/components/Tools/AssistantToolsDialog.tsx@@ -161,7 +161,7 @@ function AssistantToolsDialog({style={{ minHeight: 'min(38.125rem, 90vh)' }}><div>- <div className="border-border-medium flex items-center justify-between border-b-[1px] px-4 pt-5 pb-4 sm:p-6">+ <div className="border-border-medium flex items-center justify-between border-b px-4 pt-5 pb-4 sm:p-6"><div className="flex items-center"><div className="text-center sm:text-left"><OGDialogTitle className="text-lg leading-6 font-medium">@@ -199,7 +199,7 @@ function AssistantToolsDialog({onChange={handleSearch}placeholder={localize('com_nav_tool_search')}aria-label={localize('com_nav_tool_search')}- className="border-border-medium text-text-primary max-w-64 min-w-0 flex-1 rounded border px-2 py-1"+ className="border-border-medium max-w-64 min-w-0 flex-1 rounded border px-2 py-1"/></div><divdiff --git a/client/src/components/Web/SourceHovercard.tsx b/client/src/components/Web/SourceHovercard.tsxindex 23132ca224..89a7fa24a9 100644--- a/client/src/components/Web/SourceHovercard.tsx+++ b/client/src/components/Web/SourceHovercard.tsx@@ -73,8 +73,9 @@ function FileHovercardContent({<FileText className="text-text-secondary size-4 shrink-0" aria-hidden="true" /><Buttonvariant="link"+ size="bare"onClick={onClick}- className="h-auto min-w-0 justify-start truncate p-0 font-medium"+ className="min-w-0 justify-start truncate font-medium">{fileName}</Button>diff --git a/client/src/components/Web/Sources.tsx b/client/src/components/Web/Sources.tsxindex ceb24f224a..201a6965ff 100644--- a/client/src/components/Web/Sources.tsx+++ b/client/src/components/Web/Sources.tsx@@ -59,7 +59,7 @@ function SourceItem({ source, expanded = false }: SourceItemProps) {}return (- <span className="not-prose relative inline-block h-full w-full">+ <span className="relative inline-block h-full w-full"><Ariakit.HovercardProvider showTimeout={150} hideTimeout={150}><div className="flex h-full items-center"><Ariakit.HovercardAnchordiff --git a/client/src/components/ui/Collapse.tsx b/client/src/components/ui/Collapse.tsxindex e5aced96dc..66465a14f9 100644--- a/client/src/components/ui/Collapse.tsx+++ b/client/src/components/ui/Collapse.tsx@@ -33,7 +33,7 @@ export default function Collapse({aria-hidden={!open || undefined}inert={!open ? '' : undefined}className={cn(- 'grid transition-[grid-template-rows] [transition-duration:var(--resize-dur)] [transition-timing-function:var(--resize-ease)] motion-reduce:transition-none',+ 'grid transition-all duration-(--resize-dur) ease-(--resize-ease) motion-reduce:transition-none',open ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]',)}>diff --git a/client/src/components/ui/TermsAndConditionsModal.tsx b/client/src/components/ui/TermsAndConditionsModal.tsxindex dfa6b88c95..5bfce84606 100644--- a/client/src/components/ui/TermsAndConditionsModal.tsx+++ b/client/src/components/ui/TermsAndConditionsModal.tsx@@ -76,7 +76,7 @@ const TermsAndConditionsModal = ({className="max-h-[60vh] overflow-y-auto p-4"aria-label={localize('com_ui_terms_and_conditions')}>- <div className="prose dark:prose-invert !text-text-primary w-full max-w-none">+ <div className="prose !text-text-primary w-full max-w-none">{content !== '' ? (<MarkdownLite content={content} />) : (diff --git a/client/src/routes/ChatRoute.tsx b/client/src/routes/ChatRoute.tsxindex 99fdab53aa..446b253763 100644--- a/client/src/routes/ChatRoute.tsx+++ b/client/src/routes/ChatRoute.tsx@@ -344,7 +344,7 @@ export default function ChatRoute() {if (endpointsQuery.isLoading || modelsQuery.isLoading) {return (<div className="flex h-screen items-center justify-center" aria-live="polite" role="status">- <Spinner className="text-text-primary" />+ <Spinner tone="primary" /></div>);}@@ -378,7 +378,7 @@ export default function ChatRoute() {</Button></div>) : (- <Spinner className="text-text-primary" />+ <Spinner tone="primary" />)}</div>)}diff --git a/e2e/specs/mock/scenarios/agent-search-clear.spec.ts b/e2e/specs/mock/scenarios/agent-search-clear.spec.tsnew file mode 100644index 0000000000..1d29048df3--- /dev/null+++ b/e2e/specs/mock/scenarios/agent-search-clear.spec.ts@@ -0,0 +1,43 @@+import { expect, test } from '@playwright/test';+import type { Locator } from '@playwright/test';++/** The ink a control draws, resolved to the colour the browser paints. */+const readInk = (locator: Locator) =>+ locator.evaluate((element) => getComputedStyle(element).color);++test.describe('agent search clear button', () => {+ test('@scenario:agent-search-clear-quiet-ink the clear button rests in the secondary ink and rises to the primary ink on hover', async ({+ page,+ }) => {+ await page.goto('/agents/all', { timeout: 10000 });+ const search = page.locator('#agent-search');+ await expect(search).toBeVisible({ timeout: 30000 });+ await search.fill('clear me');++ const clear = page.getByRole('button', { name: 'Clear search', exact: true });+ await expect(clear).toBeVisible();++ const probe = await page.evaluate(() => {+ const paint = (variable: string) => {+ const element = document.createElement('span');+ element.style.color = `rgb(var(${variable}))`;+ document.body.appendChild(element);+ const color = getComputedStyle(element).color;+ element.remove();+ return color;+ };+ return { secondary: paint('--text-secondary'), primary: paint('--text-primary') };+ });++ expect(await readInk(clear)).toBe(probe.secondary);+ const hasHover = await page.evaluate(() => matchMedia('(hover: hover)').matches);+ if (hasHover) {+ await clear.hover();+ await expect.poll(() => readInk(clear)).toBe(probe.primary);+ }++ await clear.click();+ await expect(search).toHaveValue('');+ await expect(clear).toBeHidden();+ });+});diff --git a/eslint-suppressions.json b/eslint-suppressions.jsonindex dbaf62979b..9fbc84ccd3 100644--- a/eslint-suppressions.json+++ b/eslint-suppressions.json@@ -12,11 +12,6 @@"count": 10}},- "client/src/components/Agents/AgentGrid.tsx": {- "shadcn/no-restyle": {- "count": 1- }- },"client/src/components/Agents/Marketplace.tsx": {"shadcn/no-restyle": {"count": 1@@ -29,7 +24,7 @@},"client/src/components/Agents/SearchBar.tsx": {"shadcn/no-restyle": {- "count": 7+ "count": 6}},"client/src/components/Artifacts/ArtifactCodeEditor.tsx": {@@ -55,16 +50,6 @@"count": 11}},- "client/src/components/Bookmarks/DeleteBookmarkButton.tsx": {- "shadcn/no-restyle": {- "count": 1- }- },- "client/src/components/Bookmarks/EditBookmarkButton.tsx": {- "shadcn/no-restyle": {- "count": 1- }- },"client/src/components/Chat/ChatView.tsx": {"shadcn/no-restyle": {"count": 1@@ -563,7 +548,7 @@},"client/src/components/Conversations/ConvoLink.tsx": {"shadcn/no-arbitrary-values": {- "count": 4+ "count": 1}},"client/src/components/Conversations/ConvoOptions/ShareButton.tsx": {@@ -583,7 +568,7 @@},"client/src/components/Conversations/ProjectsSection.tsx": {"shadcn/no-restyle": {- "count": 9+ "count": 7}},"client/src/components/Conversations/RenameForm.tsx": {@@ -657,14 +642,9 @@"count": 1}},- "client/src/components/Input/SetKeyDialog/GoogleConfig.tsx": {- "shadcn/no-restyle": {- "count": 1- }- },"client/src/components/Input/SetKeyDialog/InputWithLabel.tsx": {"shadcn/no-restyle": {- "count": 5+ "count": 4},"shadcn/require-static-classes": {"count": 2@@ -677,45 +657,37 @@},"client/src/components/Insights/InsightsView.tsx": {"shadcn/no-restyle": {- "count": 28+ "count": 25}},"client/src/components/MCP/CustomUserVarsSection.tsx": {"shadcn/no-restyle": {- "count": 18+ "count": 12}},"client/src/components/MCP/MCPServerMenuItem.tsx": {"shadcn/no-restyle": {- "count": 3+ "count": 1}},"client/src/components/MCP/MCPServerStatusIcon.tsx": {"shadcn/no-restyle": {- "count": 13+ "count": 10}},"client/src/components/MCP/McpOAuthDialog.tsx": {- "shadcn/no-arbitrary-values": {- "count": 3- },"shadcn/no-restyle": {"count": 3}},"client/src/components/MCP/StackedMCPIcons.tsx": {"shadcn/no-restyle": {- "count": 4+ "count": 2},"shadcn/require-static-classes": {"count": 3}},- "client/src/components/Messages/Content/CodeBlock.tsx": {- "shadcn/no-arbitrary-values": {- "count": 1- }- },"client/src/components/Messages/Content/Error/parts.tsx": {"shadcn/no-arbitrary-values": {"count": 1@@ -861,7 +833,7 @@},"client/src/components/Plugins/Store/PluginAuthForm.tsx": {"shadcn/no-restyle": {- "count": 9+ "count": 8}},"client/src/components/Projects/ProjectChatOptions.tsx": {@@ -960,12 +932,12 @@},"client/src/components/Share/ShareArtifacts.tsx": {"shadcn/no-restyle": {- "count": 2+ "count": 1}},"client/src/components/Share/ShareView.tsx": {"shadcn/no-restyle": {- "count": 14+ "count": 9}},"client/src/components/SharePoint/SharePointPickerDialog.tsx": {@@ -975,7 +947,7 @@},"client/src/components/Sharing/GenericGrantAccessDialog.tsx": {"shadcn/no-restyle": {- "count": 3+ "count": 1},"shadcn/require-static-classes": {"count": 2@@ -1300,11 +1272,8 @@}},"client/src/components/Tools/AssistantToolsDialog.tsx": {- "shadcn/no-arbitrary-values": {- "count": 1- },"shadcn/no-restyle": {- "count": 6+ "count": 5}},"client/src/components/Tools/ToolItem.tsx": {@@ -1353,7 +1322,7 @@"count": 1},"shadcn/no-restyle": {- "count": 3+ "count": 2}},"client/src/components/Web/Sources.tsx": {@@ -1362,9 +1331,6 @@},"shadcn/no-restyle": {"count": 44- },- "shadcn/no-unknown-classes": {- "count": 1}},"client/src/components/ui/AdminSettingsDialog.tsx": {@@ -1375,26 +1341,11 @@"count": 1}},- "client/src/components/ui/Collapse.tsx": {- "shadcn/no-arbitrary-values": {- "count": 3- }- },"client/src/components/ui/LocalizedDateRangePicker.tsx": {"shadcn/no-restyle": {"count": 1}},- "client/src/components/ui/TermsAndConditionsModal.tsx": {- "shadcn/no-unknown-classes": {- "count": 1- }- },- "client/src/routes/ChatRoute.tsx": {- "shadcn/no-restyle": {- "count": 2- }- },"client/src/routes/Root.tsx": {"shadcn/no-inline-styles": {"count": 2