Skip to content

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

🔇 feat: Let a Theme Quiet Decorative Borders (#16741)

Marco Beretta88eae294f3c9
diff --git a/client/src/components/Agents/AgentCard.tsx b/client/src/components/Agents/AgentCard.tsx
index 85b9cddf37..12c1b0d837 100644
--- a/client/src/components/Agents/AgentCard.tsx
+++ b/client/src/components/Agents/AgentCard.tsx
@@ -131,7 +131,7 @@ const AgentCard = memo(
size: 'sm',
showBorder: false,
className:
- 'rounded-full bg-surface-tertiary ring-1 ring-border-light transition-colors duration-150 group-hover:ring-border-medium',
+ 'rounded-full bg-surface-tertiary ring-1 ring-border-chrome transition-colors duration-150 group-hover:ring-border-chrome-medium',
})}
</motion.div>
{agent.category != null && agent.category !== '' && (
@@ -181,7 +181,7 @@ const AgentCard = memo(
<motion.span
aria-hidden="true"
variants={CARD_HANDOFF_VARIANTS}
- className="bg-border-light absolute inset-x-0 top-0 h-px"
+ className="bg-border-inset absolute inset-x-0 top-0 h-px"
/>
{contact != null && (
<motion.div
diff --git a/client/src/components/Agents/AgentDetailContent.tsx b/client/src/components/Agents/AgentDetailContent.tsx
index 121df93f77..4cffc28784 100644
--- a/client/src/components/Agents/AgentDetailContent.tsx
+++ b/client/src/components/Agents/AgentDetailContent.tsx
@@ -286,7 +286,7 @@ const AgentDetailContent: React.FC<AgentDetailContentProps> = ({
{renderAgentAvatar(agent, {
size: 'md',
showBorder: false,
- className: 'rounded-full bg-surface-tertiary ring-1 ring-border-light',
+ className: 'rounded-full bg-surface-tertiary ring-1 ring-border-chrome',
})}
</motion.div>
<div className="min-w-0 flex-1 sm:self-center">
diff --git a/client/src/components/Agents/CategoryTabs.tsx b/client/src/components/Agents/CategoryTabs.tsx
index 98fee14ed1..196d526efe 100644
--- a/client/src/components/Agents/CategoryTabs.tsx
+++ b/client/src/components/Agents/CategoryTabs.tsx
@@ -143,8 +143,8 @@ const CategoryTabs: React.FC<CategoryTabsProps> = ({
'focus-visible:ring-text-primary inline-flex h-8 cursor-pointer items-center justify-center rounded-full border px-2.5 text-xs font-medium whitespace-nowrap select-none focus-visible:ring-2 focus-visible:outline-hidden focus-visible:ring-inset',
isSmallScreen ? 'min-w-fit shrink-0' : '',
activeTab === category.value
- ? 'border-border-heavy bg-surface-active-alt text-text-primary'
- : 'border-border-light bg-surface-secondary text-text-secondary hover:bg-surface-hover hover:text-text-primary',
+ ? 'border-border-chrome-heavy bg-surface-active-alt text-text-primary'
+ : 'border-border-chrome bg-surface-secondary text-text-secondary hover:bg-surface-hover hover:text-text-primary',
)}
role="tab"
aria-selected={activeTab === category.value}
diff --git a/client/src/components/Agents/GridSkeleton.tsx b/client/src/components/Agents/GridSkeleton.tsx
index a3963b4f7e..acc72b0b9e 100644
--- a/client/src/components/Agents/GridSkeleton.tsx
+++ b/client/src/components/Agents/GridSkeleton.tsx
@@ -27,7 +27,7 @@ const card = (
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-5/6" />
</div>
- <div className="border-border-light mt-auto flex justify-between gap-3 border-t pt-4">
+ <div className="border-border-inset mt-auto flex justify-between gap-3 border-t pt-4">
<Skeleton className="h-4 w-24" />
<Skeleton className="h-4 w-20" />
</div>
diff --git a/client/src/components/Auth/Login.tsx b/client/src/components/Auth/Login.tsx
index 30dd425bbc..93c2366e09 100644
--- a/client/src/components/Auth/Login.tsx
+++ b/client/src/components/Auth/Login.tsx
@@ -123,12 +123,12 @@ function Login() {
/>
)}
{startupConfig?.registrationEnabled === true && (
- <p className="my-4 text-center text-sm font-light text-text-secondary">
+ <p className="text-text-secondary my-4 text-center text-sm font-light">
{' '}
{localize('com_auth_no_account')}{' '}
<a
href={registerPage()}
- className="inline-flex p-1 text-sm font-medium text-accent-primary underline decoration-transparent transition-all duration-200 hover:text-accent-primary-hover hover:decoration-accent-primary-hover focus:text-accent-primary-hover focus:decoration-accent-primary-hover"
+ className="text-accent-primary hover:text-accent-primary-hover hover:decoration-accent-primary-hover focus:text-accent-primary-hover focus:decoration-accent-primary-hover inline-flex p-1 text-sm font-medium underline decoration-transparent transition-all duration-200"
>
{localize('com_auth_sign_up')}
</a>
diff --git a/client/src/components/Auth/LoginForm.tsx b/client/src/components/Auth/LoginForm.tsx
index ee4a0f93f7..7a6879e85c 100644
--- a/client/src/components/Auth/LoginForm.tsx
+++ b/client/src/components/Auth/LoginForm.tsx
@@ -37,7 +37,7 @@ const LoginForm: React.FC<TLoginFormProps> = ({ onSubmit, startupConfig, error,
? `${baseAutoComplete} webauthn`
: baseAutoComplete;
const authInputClassName =
- 'webkit-dark-styles peer h-auto w-full rounded-2xl border border-border-light px-3.5 pb-2.5 pt-3 text-text-primary duration-200 hover:border-border-light focus:border-accent-primary focus-visible:border-accent-primary';
+ 'webkit-dark-styles peer h-auto w-full rounded-2xl border px-3.5 pb-2.5 pt-3 text-text-primary duration-200 focus:border-accent-primary focus-visible:border-accent-primary';
const authSecretInputClassName = `${authInputClassName} pr-12`;
const authLabelClassName =
'absolute start-3 top-1.5 z-10 origin-[0] -translate-y-4 scale-75 transform bg-surface-primary px-2 text-sm text-text-secondary-alt duration-200 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-1.5 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 peer-focus:text-accent-primary rtl:peer-focus:left-auto rtl:peer-focus:translate-x-1/4';
diff --git a/client/src/components/Auth/Registration.tsx b/client/src/components/Auth/Registration.tsx
index eb0d3e00f6..d3c3c70aa8 100644
--- a/client/src/components/Auth/Registration.tsx
+++ b/client/src/components/Auth/Registration.tsx
@@ -38,7 +38,7 @@ const Registration: React.FC = () => {
// only require captcha if we have a siteKey
const requireCaptcha = Boolean(startupConfig?.turnstile?.siteKey);
const authInputClassName =
- 'webkit-dark-styles peer h-auto w-full rounded-2xl border border-border-light px-3.5 pb-2.5 pt-3 text-text-primary duration-200 hover:border-border-light focus:border-accent-primary focus-visible:border-accent-primary';
+ 'webkit-dark-styles peer h-auto w-full rounded-2xl border px-3.5 pb-2.5 pt-3 text-text-primary duration-200 focus:border-accent-primary focus-visible:border-accent-primary';
const authSecretInputClassName = `${authInputClassName} pr-12`;
const authLabelClassName =
'absolute start-3 top-1.5 z-10 origin-[0] -translate-y-4 scale-75 transform bg-surface-primary px-2 text-sm text-text-secondary-alt duration-200 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-1.5 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 peer-focus:text-accent-primary rtl:peer-focus:left-auto rtl:peer-focus:translate-x-1/4';
diff --git a/client/src/components/Auth/RequestPasswordReset.tsx b/client/src/components/Auth/RequestPasswordReset.tsx
index 760b62bc03..a1c6b6fe43 100644
--- a/client/src/components/Auth/RequestPasswordReset.tsx
+++ b/client/src/components/Auth/RequestPasswordReset.tsx
@@ -111,7 +111,7 @@ function RequestPasswordReset() {
},
})}
aria-invalid={!!errors.email}
- className="webkit-dark-styles peer border-border-light text-text-primary focus:border-accent-primary h-auto w-full rounded-2xl border px-3.5 pt-3 pb-2.5 duration-200"
+ className="webkit-dark-styles peer text-text-primary focus:border-accent-primary h-auto w-full rounded-2xl border px-3.5 pt-3 pb-2.5 duration-200"
placeholder=" "
/>
<label
diff --git a/client/src/components/Auth/ResetPassword.tsx b/client/src/components/Auth/ResetPassword.tsx
index d3bf379d60..e7ebfbcdc1 100644
--- a/client/src/components/Auth/ResetPassword.tsx
+++ b/client/src/components/Auth/ResetPassword.tsx
@@ -21,7 +21,7 @@ function ResetPassword() {
const resetPassword = useResetPasswordMutation();
const { setError, setHeaderText, startupConfig } = useOutletContext<TLoginLayoutContext>();
const authInputClassName =
- 'webkit-dark-styles peer h-auto w-full rounded-2xl border border-border-light px-3.5 pb-2.5 pr-12 pt-3 text-text-primary duration-200 hover:border-border-light focus:border-accent-primary focus-visible:border-accent-primary';
+ 'webkit-dark-styles peer h-auto w-full rounded-2xl border px-3.5 pb-2.5 pr-12 pt-3 text-text-primary duration-200 focus:border-accent-primary focus-visible:border-accent-primary';
const authLabelClassName =
'absolute start-3 top-1.5 z-10 origin-[0] -translate-y-4 scale-75 transform bg-surface-primary px-2 text-sm text-text-secondary-alt duration-200 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-1.5 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 peer-focus:text-accent-primary rtl:peer-focus:left-auto rtl:peer-focus:translate-x-1/4';
const authSecretButtonClassName =
diff --git a/client/src/components/Auth/SocialButton.tsx b/client/src/components/Auth/SocialButton.tsx
index 1dbf3c704f..706ace5975 100644
--- a/client/src/components/Auth/SocialButton.tsx
+++ b/client/src/components/Auth/SocialButton.tsx
@@ -9,7 +9,7 @@ const SocialButton = ({ id, enabled, serverDomain, oauthPath, Icon, label }) =>
<div className="mt-2 flex gap-x-2">
<a
aria-label={`${label}`}
- className="flex w-full items-center space-x-3 rounded-2xl border border-border-light bg-surface-primary px-5 py-3 text-text-primary transition-colors duration-200 hover:bg-surface-tertiary"
+ className="border-border-light bg-surface-primary text-text-primary hover:bg-surface-tertiary flex w-full items-center space-x-3 rounded-2xl border px-5 py-3 transition-colors duration-200"
href={`${serverDomain}/oauth/${oauthPath}`}
data-testid={id}
>
diff --git a/client/src/components/Chat/AddMultiConvo.tsx b/client/src/components/Chat/AddMultiConvo.tsx
index 4cc907382b..cdc9663192 100644
--- a/client/src/components/Chat/AddMultiConvo.tsx
+++ b/client/src/components/Chat/AddMultiConvo.tsx
@@ -1,5 +1,5 @@
import { PlusCircle } from 'lucide-react';
-import { TooltipAnchor } from '@librechat/client';
+import { Button, TooltipAnchor } from '@librechat/client';
import useMultiConvo from '~/hooks/Chat/useMultiConvo';
import { useLocalize } from '~/hooks';
@@ -14,15 +14,19 @@ function AddMultiConvo() {
return (
<TooltipAnchor
description={localize('com_ui_add_multi_conversation')}
- role="button"
- tabIndex={0}
- aria-label={localize('com_ui_add_multi_conversation')}
- onClick={addConversation}
- data-testid="add-multi-convo-button"
- className="border-border-light bg-presentation text-text-primary hover:bg-surface-tertiary inline-flex size-9 shrink-0 items-center justify-center rounded-xl border transition-all ease-in-out disabled:pointer-events-none disabled:opacity-50"
- >
- <PlusCircle className="icon-sm" aria-hidden="true" />
- </TooltipAnchor>
+ render={
+ <Button
+ size="icon"
+ className="size-9"
+ variant="header-action"
+ aria-label={localize('com_ui_add_multi_conversation')}
+ onClick={addConversation}
+ data-testid="add-multi-convo-button"
+ >
+ <PlusCircle className="icon-sm" aria-hidden="true" />
+ </Button>
+ }
+ />
);
}
diff --git a/client/src/components/Chat/BackgroundTasks/Button.tsx b/client/src/components/Chat/BackgroundTasks/Button.tsx
index f304526827..91413fe30c 100644
--- a/client/src/components/Chat/BackgroundTasks/Button.tsx
+++ b/client/src/components/Chat/BackgroundTasks/Button.tsx
@@ -103,7 +103,7 @@ function BackgroundTasksButton({
store={popover}
aria-label={triggerLabel}
data-testid="header-background-tasks-button"
- className="border-border-light bg-presentation text-text-primary hover:bg-surface-tertiary aria-expanded:bg-surface-tertiary relative inline-flex size-9 flex-shrink-0 items-center justify-center rounded-xl border transition-all ease-in-out"
+ className="border-border-chrome bg-presentation text-text-primary hover:bg-surface-tertiary aria-expanded:bg-surface-tertiary relative inline-flex size-9 flex-shrink-0 items-center justify-center rounded-xl border transition-all ease-in-out"
>
<ListTodo className="icon-md" aria-hidden="true" />
{(activeCount > 0 || awaitingCount > 0 || failedCount > 0 || incomplete) && (
diff --git a/client/src/components/Chat/ExportAndShareMenu.tsx b/client/src/components/Chat/ExportAndShareMenu.tsx
index dc1789a18d..7b69f4fd99 100644
--- a/client/src/components/Chat/ExportAndShareMenu.tsx
+++ b/client/src/components/Chat/ExportAndShareMenu.tsx
@@ -46,7 +46,7 @@ export default function ExportAndShareMenu({
<Ariakit.MenuButton
id="export-menu-button"
aria-label={description}
- className="border-border-light bg-presentation text-text-primary hover:bg-surface-tertiary aria-expanded:bg-surface-tertiary relative inline-flex size-9 shrink-0 items-center justify-center rounded-xl border transition-all ease-in-out disabled:pointer-events-none disabled:opacity-50"
+ className="border-border-chrome bg-presentation text-text-primary hover:bg-surface-tertiary aria-expanded:bg-surface-tertiary relative inline-flex size-9 shrink-0 items-center justify-center rounded-xl border transition-all ease-in-out disabled:pointer-events-none disabled:opacity-50"
>
<Ellipsis
className="icon-md text-text-primary"
diff --git a/client/src/components/Chat/Input/QuoteButton.tsx b/client/src/components/Chat/Input/QuoteButton.tsx
index 05f487d696..69728496e0 100644
--- a/client/src/components/Chat/Input/QuoteButton.tsx
+++ b/client/src/components/Chat/Input/QuoteButton.tsx
@@ -632,7 +632,7 @@ function QuoteButton({ conversationId }: { conversationId: string }) {
display: 'none',
}}
className={cn(
- 'border-border-light bg-surface-secondary text-text-primary hover:bg-surface-tertiary fixed z-50 inline-flex items-center gap-1.5 rounded-full border text-sm font-medium shadow-lg transition-colors',
+ 'border-border-chrome bg-surface-secondary text-text-primary hover:bg-surface-tertiary fixed z-50 inline-flex items-center gap-1.5 rounded-full border text-sm font-medium shadow-lg transition-colors',
/** Comfortable tap target when the selection came from a finger. */
'px-3 py-1.5 data-[touch=true]:min-h-11 data-[touch=true]:px-4 data-[touch=true]:py-2.5',
)}
diff --git a/client/src/components/Chat/Menus/BookmarkMenu.tsx b/client/src/components/Chat/Menus/BookmarkMenu.tsx
index 779f694b27..f3e6ee504c 100644
--- a/client/src/components/Chat/Menus/BookmarkMenu.tsx
+++ b/client/src/components/Chat/Menus/BookmarkMenu.tsx
@@ -51,7 +51,7 @@ const BookmarkMenu: FC = () => {
aria-label={triggerAriaLabel}
aria-pressed={hasBookmarks}
className={cn(
- 'border-border-light bg-presentation hover:bg-surface-hover flex size-9 shrink-0 items-center justify-center gap-2 rounded-xl border text-sm transition-colors duration-200',
+ 'border-border-chrome bg-presentation hover:bg-surface-hover flex size-9 shrink-0 items-center justify-center gap-2 rounded-xl border text-sm transition-colors duration-200',
isMenuOpen ? 'bg-surface-hover' : '',
)}
data-testid="bookmark-menu"
diff --git a/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx b/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx
index defccd40da..580967df36 100644
--- a/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx
+++ b/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx
@@ -73,7 +73,7 @@ function ModelSelectorContent() {
<button
data-testid="model-selector-button"
aria-keyshortcuts={modelSelectorAriaKey}
- className="border-border-light bg-presentation text-text-primary hover:bg-surface-active-alt rounded-theme-control my-1 flex h-9 max-w-full items-center gap-2 border px-3 py-2 text-sm"
+ className="border-border-chrome bg-presentation text-text-primary hover:bg-surface-active-alt rounded-theme-control my-1 flex h-9 max-w-full items-center gap-2 border px-3 py-2 text-sm"
aria-label={localize('com_ui_select_model')}
>
{selectedIcon && React.isValidElement(selectedIcon) && (
diff --git a/client/src/components/Chat/Messages/Content/AskUserQuestionCall.tsx b/client/src/components/Chat/Messages/Content/AskUserQuestionCall.tsx
index 9b629523a1..35efea91c0 100644
--- a/client/src/components/Chat/Messages/Content/AskUserQuestionCall.tsx
+++ b/client/src/components/Chat/Messages/Content/AskUserQuestionCall.tsx
@@ -173,7 +173,7 @@ export default function AskUserQuestionCall({
batch.questions.map((item, index) => (
<div
key={item.id}
- className={index > 0 ? 'border-border-light border-t pt-4' : undefined}
+ className={index > 0 ? 'border-border-inset border-t pt-4' : undefined}
>
{item.header != null && (
<p className="text-text-secondary mb-1 text-xs font-medium">{item.header}</p>
diff --git a/client/src/components/Chat/Messages/Content/BackgroundTaskCard.tsx b/client/src/components/Chat/Messages/Content/BackgroundTaskCard.tsx
index d1b94917e0..f887d514db 100644
--- a/client/src/components/Chat/Messages/Content/BackgroundTaskCard.tsx
+++ b/client/src/components/Chat/Messages/Content/BackgroundTaskCard.tsx
@@ -135,7 +135,7 @@ export default function BackgroundTaskCard({
</div>
)}
{result && (
- <div className="border-border-light mt-3 border-t pt-2.5">
+ <div className="border-border-inset mt-3 border-t pt-2.5">
<div
className={cn(
'mb-1.5 text-xs font-medium',
@@ -153,7 +153,7 @@ export default function BackgroundTaskCard({
</div>
)}
{error && (
- <div className="border-border-light mt-3 border-t pt-2.5">
+ <div className="border-border-inset mt-3 border-t pt-2.5">
<div className="text-status-error mb-1.5 text-xs font-medium">
{localize('com_ui_error')}
</div>
diff --git a/client/src/components/Chat/Messages/Content/MessageQuotes.tsx b/client/src/components/Chat/Messages/Content/MessageQuotes.tsx
index 5298c03f5d..c5f209994a 100644
--- a/client/src/components/Chat/Messages/Content/MessageQuotes.tsx
+++ b/client/src/components/Chat/Messages/Content/MessageQuotes.tsx
@@ -30,13 +30,13 @@ function MessageQuotes({ quotes }: { quotes?: string[] }) {
<div
key={`${index}-${text.slice(0, 24)}`}
role="listitem"
- className="flex items-start gap-1.5 rounded-2xl border border-border-light bg-surface-secondary px-2.5 py-1.5 text-sm text-text-secondary"
+ className="border-border-chrome bg-surface-secondary text-text-secondary flex items-start gap-1.5 rounded-2xl border px-2.5 py-1.5 text-sm"
>
<TextQuote
- className="mt-0.5 h-3.5 w-3.5 shrink-0 text-text-tertiary"
+ className="text-text-tertiary mt-0.5 h-3.5 w-3.5 shrink-0"
aria-hidden="true"
/>
- <span className="line-clamp-3 whitespace-pre-wrap break-words">{text}</span>
+ <span className="line-clamp-3 break-words whitespace-pre-wrap">{text}</span>
</div>
))}
</div>
diff --git a/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx b/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx
index 3636c37d35..4b5b705f5c 100644
--- a/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx
@@ -355,7 +355,7 @@ const TextAttachment = memo(
)}
<div className="bg-surface-secondary overflow-hidden rounded-lg">
{!showFileChip && (
- <div className="border-border-light flex items-center justify-between gap-2 border-b px-3 py-2">
+ <div className="border-border-inset flex items-center justify-between gap-2 border-b px-3 py-2">
<span className="min-w-0 truncate text-sm font-medium" title={visibleFilename}>
{visibleFilename}
</span>
diff --git a/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx b/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx
index 618de0d061..80343b1cb6 100644
--- a/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx
@@ -209,13 +209,13 @@ export default function BackgroundTaskCall({
</p>
)}
{(display == null || hasParams) && (
- <div className={cn(display != null && 'border-border-light border-t')}>
+ <div className={cn(display != null && 'border-border-inset border-t')}>
<ToolCallInfo input={input} output={display == null ? output : undefined} />
</div>
)}
{display != null && (
<details
- className="border-border-light border-t px-3 py-2"
+ className="border-border-inset border-t px-3 py-2"
onToggle={(event) => setShowRaw(event.currentTarget.open)}
>
<summary className="text-text-secondary hover:text-text-primary focus-visible:ring-focus-subtle cursor-pointer rounded text-xs focus-visible:ring-2 focus-visible:outline-none">
diff --git a/client/src/components/Chat/Messages/Content/Parts/BashCall.tsx b/client/src/components/Chat/Messages/Content/Parts/BashCall.tsx
index f953ecd617..af59ef51c0 100644
--- a/client/src/components/Chat/Messages/Content/Parts/BashCall.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/BashCall.tsx
@@ -259,10 +259,10 @@ export default function BashCall({
<PtcToolTrace
toolCallId={toolCallId}
expanded={showCode}
- className={cn(command && 'border-border-light border-t')}
+ className={cn(command && 'border-border-inset border-t')}
/>
{hasOutput && backgroundHandle == null && (
- <div className={cn('px-3 py-2.5', command && 'border-border-light border-t')}>
+ <div className={cn('px-3 py-2.5', command && 'border-border-inset border-t')}>
{outputIsEmpty ? (
<p className="text-text-secondary text-xs italic">
{localize('com_ui_no_output')}
diff --git a/client/src/components/Chat/Messages/Content/Parts/DiffView.tsx b/client/src/components/Chat/Messages/Content/Parts/DiffView.tsx
index d38d6b7f19..ab739b29f8 100644
--- a/client/src/components/Chat/Messages/Content/Parts/DiffView.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/DiffView.tsx
@@ -172,7 +172,7 @@ interface DiffRowProps {
const DiffRow = memo(function DiffRow({ type, text, num, hasLineNumbers }: DiffRowProps) {
if (type === 'hunk') {
if (!text) {
- return <div className="border-border-light mx-3 my-1.5 border-t" />;
+ return <div className="border-border-inset mx-3 my-1.5 border-t" />;
}
return <div className="text-text-tertiary px-3 py-0.5 text-[11px] select-none">{text}</div>;
}
diff --git a/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx b/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx
index 874744b6c8..675f1c25f6 100644
--- a/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx
@@ -202,7 +202,7 @@ export default function ExecuteCode({
<PtcToolTrace
toolCallId={toolCallId}
expanded={showCode}
- className={cn(code && 'border-border-light border-t')}
+ className={cn(code && 'border-border-inset border-t')}
/>
{hasOutput && backgroundHandle == null && (
<div
@@ -210,7 +210,7 @@ export default function ExecuteCode({
/* No fill of its own: the output shows the panel's surface-secondary in both
* modes, which is the surface-primary-alt it was painted in light. */
'p-4 text-xs',
- code && 'border-border-light border-t',
+ code && 'border-border-inset border-t',
)}
>
<div className="text-text-secondary mb-1.5 text-[10px] font-medium tracking-wide uppercase">
diff --git a/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx b/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx
index 47d8c5a5e6..6cbbf7dde3 100644
--- a/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/FileAuthoringCall.tsx
@@ -268,7 +268,7 @@ export default function FileAuthoringCall({
{showOutputSection && (
<pre
className={cn(
- 'border-border-light max-h-[18.75rem] overflow-auto border-t px-3 py-2 font-mono text-xs break-words whitespace-pre-wrap',
+ 'border-border-inset max-h-[18.75rem] overflow-auto border-t px-3 py-2 font-mono text-xs break-words whitespace-pre-wrap',
phase === 'failed' ? 'text-status-error' : 'text-text-secondary',
)}
>
diff --git a/client/src/components/Chat/Messages/Content/RetrievalCall.tsx b/client/src/components/Chat/Messages/Content/RetrievalCall.tsx
index 884429cd15..944eef7ba0 100644
--- a/client/src/components/Chat/Messages/Content/RetrievalCall.tsx
+++ b/client/src/components/Chat/Messages/Content/RetrievalCall.tsx
@@ -503,7 +503,7 @@ export default function RetrievalCall({
onOpenPreview={item.fileId ? () => openPreview(i) : undefined}
/>
{item.content && (
- <div className="border-border-light border-t px-3 py-3">
+ <div className="border-border-inset border-t px-3 py-3">
<OutputRenderer text={item.content} />
</div>
)}
diff --git a/client/src/components/Chat/Messages/Content/SkillPills.tsx b/client/src/components/Chat/Messages/Content/SkillPills.tsx
index d261957cc2..1af9c52150 100644
--- a/client/src/components/Chat/Messages/Content/SkillPills.tsx
+++ b/client/src/components/Chat/Messages/Content/SkillPills.tsx
@@ -50,12 +50,12 @@ function SkillPills({
key={name}
role="listitem"
data-skill-source={source}
- className="inline-flex items-center gap-1 rounded-full border border-border-light bg-surface-secondary px-2 py-1 text-xs text-text-secondary"
+ className="border-border-chrome bg-surface-secondary text-text-secondary inline-flex items-center gap-1 rounded-full border px-2 py-1 text-xs"
>
{source === 'always-apply' ? (
- <Pin className="h-3 w-3 text-status-info" aria-hidden="true" />
+ <Pin className="text-status-info h-3 w-3" aria-hidden="true" />
) : (
- <ScrollText className="h-3 w-3 text-status-info" aria-hidden="true" />
+ <ScrollText className="text-status-info h-3 w-3" aria-hidden="true" />
)}
<span className="max-w-[12rem] truncate">{name}</span>
</span>
diff --git a/client/src/components/Chat/Messages/Content/SubagentProgress.tsx b/client/src/components/Chat/Messages/Content/SubagentProgress.tsx
index a5b6b31ab0..349c8aad8d 100644
--- a/client/src/components/Chat/Messages/Content/SubagentProgress.tsx
+++ b/client/src/components/Chat/Messages/Content/SubagentProgress.tsx
@@ -196,7 +196,7 @@ const SubagentProgress = memo(function SubagentProgress({
const tree = useMemo(() => buildDigestTree(digest.nodes), [digest.nodes]);
const active = digest.active ?? digest.nodes[digest.nodes.length - 1]?.path;
return (
- <div className="border-border-light mt-3 border-t pt-2.5" data-testid="subagent-progress">
+ <div className="border-border-inset mt-3 border-t pt-2.5" data-testid="subagent-progress">
<div className="text-text-secondary mb-1.5 flex items-center gap-2 text-xs font-medium">
<span>{localize('com_ui_subagent_progress')}</span>
<span className="text-text-tertiary font-normal tabular-nums">
diff --git a/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx b/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx
index 94b04838d7..e052dceaaa 100644
--- a/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx
+++ b/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx
@@ -98,7 +98,7 @@ export default function ToolCallInfo({ input, output }: { input: string; output?
return (
<div className="w-full px-3 py-3.5">
{output && <OutputRenderer text={output} />}
- {output && hasParams && <div className="border-border-light my-2 border-t" />}
+ {output && hasParams && <div className="border-border-inset my-2 border-t" />}
{hasParams && (
<>
<button
diff --git a/client/src/components/Chat/Messages/Content/WebSearch.tsx b/client/src/components/Chat/Messages/Content/WebSearch.tsx
index c6f6d06982..0d72bb73a0 100644
--- a/client/src/components/Chat/Messages/Content/WebSearch.tsx
+++ b/client/src/components/Chat/Messages/Content/WebSearch.tsx
@@ -326,7 +326,7 @@ export default function WebSearch({
)}
</div>
{answerBox && (answerBox.title || answerText) && (
- <div className="border-border-light border-t pt-2">
+ <div className="border-border-inset border-t pt-2">
{answerBox.title && (
<div className="text-text-primary text-sm font-medium">
{answerBox.title}
@@ -367,7 +367,7 @@ export default function WebSearch({
className={cn(
'hover:bg-surface-hover flex gap-2.5 px-3 py-2 transition-colors',
snippet ? 'items-start' : 'items-center',
- i > 0 && 'border-border-light border-t',
+ i > 0 && 'border-border-inset border-t',
)}
>
<FaviconImage
diff --git a/client/src/components/Chat/Messages/Content/verticals.tsx b/client/src/components/Chat/Messages/Content/verticals.tsx
index 670ae171c1..5d6ecefb36 100644
--- a/client/src/components/Chat/Messages/Content/verticals.tsx
+++ b/client/src/components/Chat/Messages/Content/verticals.tsx
@@ -203,7 +203,7 @@ function PlaceList({ places, label }: { places: PlaceResult[]; label: string })
/** The same provider place can appear in several grouped searches;
* discriminate each occurrence even when its identifier is present. */
key={`${place.identifier || `${place.name ?? ''}|${place.address ?? ''}`}|${i}`}
- className={cn(i > 0 && 'border-border-light border-t')}
+ className={cn(i > 0 && 'border-border-inset border-t')}
>
<a
href={mapLink(place)}
diff --git a/client/src/components/Chat/Subagents/EventSubagentActivityGroup.tsx b/client/src/components/Chat/Subagents/EventSubagentActivityGroup.tsx
index 6e83438dd2..91f7cc870e 100644
--- a/client/src/components/Chat/Subagents/EventSubagentActivityGroup.tsx
+++ b/client/src/components/Chat/Subagents/EventSubagentActivityGroup.tsx
@@ -172,7 +172,7 @@ function EventSubagentRows({
<div
id={panelId}
hidden={!expanded}
- className="divide-border-light border-border-light divide-y border-t"
+ className="divide-border-inset border-border-inset divide-y border-t"
>
{eventChildren.map((child) => {
const agent = child.agentId == null ? undefined : agentsMap?.[child.agentId];
diff --git a/client/src/components/Chat/Subagents/SubagentActivity.tsx b/client/src/components/Chat/Subagents/SubagentActivity.tsx
index c8dcf9625f..b8fe5f767c 100644
--- a/client/src/components/Chat/Subagents/SubagentActivity.tsx
+++ b/client/src/components/Chat/Subagents/SubagentActivity.tsx
@@ -277,7 +277,7 @@ function SubagentPrompt({ prompt }: { prompt: string }) {
aria-labelledby={headingId}
className="border-border-light bg-surface-secondary text-text-primary mb-3 shrink-0 overflow-hidden rounded-lg border"
>
- <div className="border-border-light flex min-h-[2.75rem] items-center justify-between gap-3 border-b px-3 py-2">
+ <div className="border-border-inset flex min-h-[2.75rem] items-center justify-between gap-3 border-b px-3 py-2">
<h3 id={headingId} className="text-text-primary text-sm font-medium">
{localize('com_ui_prompt')}
</h3>
diff --git a/client/src/components/Chat/TemporaryChat.tsx b/client/src/components/Chat/TemporaryChat.tsx
index 0ae2ae038d..e2aac8a24c 100644
--- a/client/src/components/Chat/TemporaryChat.tsx
+++ b/client/src/components/Chat/TemporaryChat.tsx
@@ -29,7 +29,7 @@ export function TemporaryChat() {
aria-disabled={isEnforced}
aria-keyshortcuts={isEnforced ? undefined : ariaKey}
className={cn(
- 'border-border-light text-text-primary inline-flex size-9 shrink-0 items-center justify-center rounded-xl border transition-all ease-in-out',
+ 'border-border-chrome text-text-primary inline-flex size-9 shrink-0 items-center justify-center rounded-xl border transition-all ease-in-out',
isTemporary
? 'bg-surface-active'
: 'bg-presentation hover:bg-surface-active-alt shadow-xs',
diff --git a/client/src/components/Nav/Settings/Dialog.tsx b/client/src/components/Nav/Settings/Dialog.tsx
index 5413238f23..c96dc2fbba 100644
--- a/client/src/components/Nav/Settings/Dialog.tsx
+++ b/client/src/components/Nav/Settings/Dialog.tsx
@@ -74,13 +74,13 @@ export default function SettingsDialog({ open, onOpenChange }: TDialogProps) {
/** Headless UI panel, so it bypasses the shared dialog primitives
* and needs the contrast edge declared here. `shadow-2xl` is a
* black shadow with nothing to separate against on a black canvas. */
- 'bg-surface-dialog high-contrast:border high-contrast:border-solid high-contrast:border-border-medium high-contrast:shadow-none rounded-theme-surface flex max-h-[85vh] w-full flex-col overflow-hidden shadow-2xl',
+ 'bg-surface-dialog border-border-light high-contrast:border high-contrast:border-solid high-contrast:border-border-medium high-contrast:shadow-none rounded-theme-surface flex max-h-[85vh] w-full flex-col overflow-hidden border-(length:--theme-dialog-stroke) shadow-2xl',
!isSmallScreen && 'h-[85vh] w-[56.25rem] max-w-[calc(100vw-4rem)]',
)}
>
<DialogTitle
as="div"
- className="border-border-light flex items-center justify-between border-b p-5"
+ className="border-border-inset flex items-center justify-between border-b p-5"
>
{inDetail ? (
<button
diff --git a/client/src/components/SidePanel/Agents/AgentConfig.tsx b/client/src/components/SidePanel/Agents/AgentConfig.tsx
index ce6b96fd85..b7f947d820 100644
--- a/client/src/components/SidePanel/Agents/AgentConfig.tsx
+++ b/client/src/components/SidePanel/Agents/AgentConfig.tsx
@@ -118,7 +118,7 @@ export default function AgentConfig({
onClick={() => setActivePanel(Panel.model)}
title={model || undefined}
className={cn(
- 'border-border-light bg-surface-secondary text-text-primary hover:bg-surface-tertiary focus-visible:ring-ring-primary relative flex h-9 w-full min-w-0 items-center overflow-hidden rounded-lg border text-sm font-medium transition-colors focus:outline-hidden focus-visible:ring-2',
+ 'border-border-control bg-surface-secondary text-text-primary hover:bg-surface-tertiary focus-visible:ring-ring-primary relative flex h-9 w-full min-w-0 items-center overflow-hidden rounded-lg border text-sm font-medium transition-colors focus:outline-hidden focus-visible:ring-2',
model != null && model ? 'px-1' : 'px-3',
)}
>
diff --git a/client/src/components/UnifiedSidebar/ExpandedPanel.tsx b/client/src/components/UnifiedSidebar/ExpandedPanel.tsx
index 4c11217685..12e404dc76 100644
--- a/client/src/components/UnifiedSidebar/ExpandedPanel.tsx
+++ b/client/src/components/UnifiedSidebar/ExpandedPanel.tsx
@@ -151,7 +151,7 @@ function ExpandedPanel({
const toggleSidebarAriaKey = useShortcutAriaKey('toggleSidebar');
return (
- <div className="border-border-light bg-surface-primary-alt flex h-full shrink-0 flex-col gap-2 border-r px-2 py-2">
+ <div className="border-border-inset bg-surface-primary-alt flex h-full shrink-0 flex-col gap-2 border-r px-2 py-2">
<TooltipAnchor
side="right"
description={toggleSidebarHint}
@@ -173,7 +173,7 @@ function ExpandedPanel({
/>
<NewChatButton setActive={setActive} switchToHistory={switchToHistory} />
<AgentMarketplaceButton />
- <div className="border-border-light mx-2 border-b" />
+ <div className="border-border-inset mx-2 border-b" />
<div className="flex flex-col gap-1 overflow-y-auto">
{links.map((link) => (
<NavIconButton
diff --git a/e2e/specs/mock/scenarios/chrome-border.spec.ts b/e2e/specs/mock/scenarios/chrome-border.spec.ts
new file mode 100644
index 0000000000..df14f8a06b
--- /dev/null
+++ b/e2e/specs/mock/scenarios/chrome-border.spec.ts
@@ -0,0 +1,127 @@
+import { expect, test } from '@playwright/test';
+import type { Page } from '@playwright/test';
+import { clickHouseTheme } from '../../../../packages/client/src/theme/themes/clickhouse';
+import { NEW_CHAT_PATH } from '../helpers';
+
+/**
+ * The chrome and inset border roles. `border-chrome` outlines the controls and chips that sit on
+ * the shell and `border-inset` draws the hairlines inside a surface that is already stroked; both
+ * are `border-light` at the `chromeBorderAlpha` and `insetBorderAlpha` shares, 1 by default, so the
+ * bundled palettes draw them as they always drew `border-light`. ClickHouse sets both to 0, as
+ * Click UI strokes neither, and a reference theme proves each role follows its own alpha.
+ */
+
+type Mode = 'light' | 'dark';
+type Borders = { chrome: string; inset: string };
+
+const QUIET_THEME = {
+ version: 1,
+ name: 'e2e-border-share',
+ modes: {
+ light: {
+ colors: { 'rgb-border-light': '10 20 30' },
+ appearance: { chromeBorderAlpha: '0.25', insetBorderAlpha: '0.5' },
+ },
+ dark: {
+ colors: { 'rgb-border-light': '10 20 30' },
+ appearance: { chromeBorderAlpha: '0.25', insetBorderAlpha: '0.5' },
+ },
+ },
+} as const;
+
+async function openChat(page: Page, mode: Mode, definition?: { name: string }) {
+ await page.addInitScript(
+ ([appearance, stored]) => {
+ localStorage.setItem('color-theme', appearance as string);
+ localStorage.removeItem('theme-colors');
+ localStorage.removeItem('theme-name');
+ if (stored) {
+ localStorage.setItem('theme-definition', JSON.stringify(stored));
+ localStorage.setItem('theme-source', 'definition');
+ } else {
+ localStorage.removeItem('theme-definition');
+ localStorage.removeItem('theme-source');
+ }
+ },
+ [mode, definition ?? null] as [string, unknown],
+ );
+ await page.goto(NEW_CHAT_PATH, { timeout: 15000 });
+ await expect(page.getByRole('textbox', { name: 'Message input' })).toBeVisible({
+ timeout: 30000,
+ });
+ const root = page.locator('html');
+ if (definition) {
+ await expect(root).toHaveAttribute('data-theme', definition.name);
+ } else {
+ await expect(root).not.toHaveAttribute('data-theme');
+ }
+ await expect(root).toHaveClass(mode === 'dark' ? /\bdark\b/ : /\blight\b/);
+}
+
+function borders(page: Page): Promise<Borders> {
+ return page.evaluate(() => {
+ const paint = (className: string) => {
+ const node = document.createElement('div');
+ node.className = `border border-solid ${className}`;
+ document.body.append(node);
+ const style = getComputedStyle(node);
+ const color = style.borderTopColor;
+ const width = style.borderTopWidth;
+ node.remove();
+ return `${color} ${width}`;
+ };
+ return { chrome: paint('border-border-chrome'), inset: paint('border-border-inset') };
+ });
+}
+
+/** Each tag is written out whole: the runner finds a scenario by its literal tag. */
+const CASES: Array<{
+ title: string;
+ mode: Mode;
+ definition?: { name: string };
+ expected: Borders;
+}> = [
+ {
+ title:
+ 'the default light theme draws chrome and inset borders as border-light @scenario:chrome-border-default-light-unchanged',
+ mode: 'light',
+ expected: { chrome: 'rgb(227, 227, 227) 1px', inset: 'rgb(227, 227, 227) 1px' },
+ },
+ {
+ title:
+ 'the default dark theme draws chrome and inset borders as border-light @scenario:chrome-border-default-dark-unchanged',
+ mode: 'dark',
+ expected: { chrome: 'rgb(33, 33, 33) 1px', inset: 'rgb(33, 33, 33) 1px' },
+ },
+ {
+ title:
+ 'the ClickHouse light theme draws no chrome or inset border and keeps the 1px box @scenario:chrome-border-clickhouse-light',
+ mode: 'light',
+ definition: clickHouseTheme,
+ expected: { chrome: 'rgba(230, 231, 233, 0) 1px', inset: 'rgba(230, 231, 233, 0) 1px' },
+ },
+ {
+ title:
+ 'the ClickHouse dark theme draws no chrome or inset border and keeps the 1px box @scenario:chrome-border-clickhouse-dark',
+ mode: 'dark',
+ definition: clickHouseTheme,
+ expected: { chrome: 'rgba(50, 50, 50, 0) 1px', inset: 'rgba(50, 50, 50, 0) 1px' },
+ },
+ {
+ title:
+ 'a theme that sets the border shares draws chrome and inset at their own share @scenario:chrome-border-follow-reference-theme',
+ mode: 'light',
+ definition: QUIET_THEME,
+ expected: { chrome: 'rgba(10, 20, 30, 0.25) 1px', inset: 'rgba(10, 20, 30, 0.5) 1px' },
+ },
+];
+
+test.describe('chrome and inset border roles', () => {
+ for (const { title, mode, definition, expected } of CASES) {
+ test(title, async ({ page }) => {
+ await openChat(page, mode, definition);
+
+ expect(await borders(page)).toEqual(expected);
+ });
+ }
+});
diff --git a/eslint-suppressions.json b/eslint-suppressions.json
index b289ba5b38..306e6909c1 100644
--- a/eslint-suppressions.json
+++ b/eslint-suppressions.json
@@ -88,22 +88,22 @@
},
"client/src/components/Auth/LoginForm.tsx": {
"shadcn/no-restyle": {
- "count": 37
+ "count": 33
}
},
"client/src/components/Auth/Registration.tsx": {
"shadcn/no-restyle": {
- "count": 37
+ "count": 33
}
},
"client/src/components/Auth/RequestPasswordReset.tsx": {
"shadcn/no-restyle": {
- "count": 14
+ "count": 13
}
},
"client/src/components/Auth/ResetPassword.tsx": {
"shadcn/no-restyle": {
- "count": 52
+ "count": 48
}
},
"client/src/components/Auth/TwoFactorScreen.tsx": {
@@ -136,11 +136,6 @@
"count": 1
}
},
- "client/src/components/Chat/AddMultiConvo.tsx": {
- "shadcn/no-restyle": {
- "count": 9
- }
- },
"client/src/components/Chat/ChatView.tsx": {
"shadcn/no-restyle": {
"count": 1
@@ -2201,4 +2196,4 @@
"count": 1
}
}
-}
+}
\ No newline at end of file
diff --git a/packages/client/src/components/Button.spec.tsx b/packages/client/src/components/Button.spec.tsx
index a816eea93c..f51c28d849 100644
--- a/packages/client/src/components/Button.spec.tsx
+++ b/packages/client/src/components/Button.spec.tsx
@@ -10,6 +10,25 @@ jest.mock('react-i18next', () => ({
}));
describe('Button', () => {
+ it('outlines an icon button in the chrome border and a text button in the light one', () => {
+ const icon = cn(buttonVariants({ variant: 'outline', size: 'icon-theme' }));
+ const text = cn(buttonVariants({ variant: 'outline', size: 'dense' }));
+
+ expect(icon).toContain('border-border-chrome');
+ expect(icon).not.toContain('border-border-light');
+ expect(text).toContain('border-border-light');
+ expect(text).not.toContain('border-border-chrome');
+ });
+
+ it('outlines a subtle icon button in the chrome border as well', () => {
+ expect(cn(buttonVariants({ variant: 'subtle', size: 'icon' }))).toContain(
+ 'border-border-chrome',
+ );
+ expect(cn(buttonVariants({ variant: 'subtle', size: 'dense' }))).toContain(
+ 'border-border-light',
+ );
+ });
+
it('owns dense action padding without changing the default-height recipe', () => {
render(
<Button variant="outline" size="dense">
@@ -121,7 +140,7 @@ describe('Button', () => {
* text through itself while every neighbour sits on `bg-presentation`. */
expect(screen.getByRole('button', { name: 'Toggle' })).toHaveClass(
'bg-presentation',
- 'border-border-light',
+ 'border-border-chrome',
'rounded-xl',
'duration-0',
'hover:bg-surface-active-alt',
diff --git a/packages/client/src/components/Button.tsx b/packages/client/src/components/Button.tsx
index 09538055bd..631ed1e3ba 100644
--- a/packages/client/src/components/Button.tsx
+++ b/packages/client/src/components/Button.tsx
@@ -135,7 +135,7 @@ const buttonVariantRecipe = cva(
* lag rather than polish.
*/
'header-action':
- 'rounded-xl border border-border-light bg-presentation text-text-primary duration-0 hover:bg-surface-active-alt hover:text-text-primary',
+ 'rounded-xl border border-border-chrome bg-presentation text-text-primary duration-0 hover:bg-surface-active-alt hover:text-text-primary',
/**
* Text that turns into its own editor when activated, such as a workspace
* title or description. It reads as the text it stands for, so the caller
@@ -210,6 +210,12 @@ const buttonVariantRecipe = cva(
},
},
compoundVariants: [
+ /* An outlined icon button is chrome: a theme that draws no chrome outline leaves it ghost-shaped. */
+ {
+ variant: ['outline', 'subtle'],
+ size: ['icon', 'icon-sm', 'icon-xs', 'icon-theme'],
+ class: 'border-border-chrome',
+ },
{
variant: 'subtle',
shape: 'unset',
diff --git a/packages/client/src/components/Chip.spec.tsx b/packages/client/src/components/Chip.spec.tsx
index 63611e580d..efde0a64ed 100644
--- a/packages/client/src/components/Chip.spec.tsx
+++ b/packages/client/src/components/Chip.spec.tsx
@@ -7,7 +7,7 @@ describe('Chip', () => {
render(<Chip tone="surface">Context</Chip>);
expect(screen.getByText('Context').parentElement).toHaveClass(
- 'border-border-light',
+ 'border-border-chrome',
'bg-surface-secondary',
'text-text-secondary',
);
diff --git a/packages/client/src/components/Chip.tsx b/packages/client/src/components/Chip.tsx
index c9e1d11c95..1b0b566d4e 100644
--- a/packages/client/src/components/Chip.tsx
+++ b/packages/client/src/components/Chip.tsx
@@ -16,7 +16,7 @@ const chipVariants: (props?: ChipVariantProps & ClassProp) => string = cva(
{
variants: {
tone: {
- surface: 'border-border-light bg-surface-secondary text-text-secondary',
+ surface: 'border-border-chrome bg-surface-secondary text-text-secondary',
neutral: 'border-status-neutral-border bg-status-neutral-subtle text-status-neutral',
info: 'border-status-info-border bg-status-info-subtle text-status-info',
success: 'border-status-success-border bg-status-success-subtle text-status-success',
diff --git a/packages/client/src/components/FilterInput.tsx b/packages/client/src/components/FilterInput.tsx
index 43b0620dda..d11b4be058 100644
--- a/packages/client/src/components/FilterInput.tsx
+++ b/packages/client/src/components/FilterInput.tsx
@@ -47,7 +47,7 @@ const FilterInput: React.ForwardRefExoticComponent<
placeholder=" "
aria-label={label}
className={cn(
- 'peer border-border-light text-text-primary ring-offset-surface-primary placeholder:text-text-secondary flex h-9 w-full rounded-lg border bg-transparent px-3 py-2 text-sm focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
+ 'peer border-border-control text-text-primary ring-offset-surface-primary placeholder:text-text-secondary flex h-9 w-full rounded-lg border bg-transparent px-3 py-2 text-sm focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
disabledFillClasses,
className,
)}
diff --git a/packages/client/src/components/IconButton.tsx b/packages/client/src/components/IconButton.tsx
index 562821622d..252d3c2cec 100644
--- a/packages/client/src/components/IconButton.tsx
+++ b/packages/client/src/components/IconButton.tsx
@@ -31,7 +31,7 @@ const iconButtonVariants: (props?: IconButtonVariantProps & ClassProp) => string
primary:
'bg-surface-inverted text-text-inverted hover:bg-surface-inverted-hover hover:active:bg-surface-inverted-pressed',
secondary:
- 'border border-border-light bg-surface-secondary hover:bg-surface-hover hover:active:bg-surface-pressed',
+ 'border border-border-chrome bg-surface-secondary hover:bg-surface-hover hover:active:bg-surface-pressed',
ghost: 'bg-transparent hover:bg-surface-hover hover:active:bg-surface-pressed',
/** An action inside a list row whose highlight is already `surface-hover`,
* so its own hover takes the active fill to stay visible on top of it. */
diff --git a/packages/client/src/theme/README.md b/packages/client/src/theme/README.md
index c9a15673de..4e0111e034 100644
--- a/packages/client/src/theme/README.md
+++ b/packages/client/src/theme/README.md
@@ -437,6 +437,14 @@ Each status family has a foreground, a `-subtle` background, a `-border`, and a
control inside content (tool rows, attachments, summaries, message
navigation). Defaults to `border-heavy`, so a theme that names neither keeps
the ring it had.
+- `border-border-chrome` / `border-border-inset` - `border-light` at the
+ `chromeBorderAlpha` and `insetBorderAlpha` appearance roles (both 1 by
+ default, so they draw as `border-light`). Chrome is the outline of an icon
+ button, pill, chip or avatar ring on the shell; inset is a hairline inside a
+ surface that is already stroked. A theme sets 0 to separate them by fill; the
+ 1px box stays so layout does not shift. `border-border-chrome-heavy` and `border-border-chrome-medium` are
+ `border-heavy` and `border-medium` at the chrome share, for the selected and hover
+ states of a chrome control.
- `ring-focus-control` - The keyboard focus ring of the shared primitives
(`Checkbox`, `Switch`, `Field`, `IconButton` and their siblings). Defaults to
the primary text ink; a theme that names only `rgb-text-primary` rings its
diff --git a/packages/client/src/theme/defaults.css b/packages/client/src/theme/defaults.css
index c7451190a4..54741c91b1 100644
--- a/packages/client/src/theme/defaults.css
+++ b/packages/client/src/theme/defaults.css
@@ -330,6 +330,8 @@ html {
--theme-tooltip-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.25);
--theme-motion-fast: 150ms;
--theme-motion-normal: 200ms;
+ --theme-border-chrome-alpha: 1;
+ --theme-border-inset-alpha: 1;
--switch-unchecked: 148 148 148;
--switch-thumb: 255 255 255;
/* Follows the secondary text it was before it had a role, in every mode. */
diff --git a/packages/client/src/theme/registry.spec.ts b/packages/client/src/theme/registry.spec.ts
index 6a0d75c5ac..276e76dd43 100644
--- a/packages/client/src/theme/registry.spec.ts
+++ b/packages/client/src/theme/registry.spec.ts
@@ -304,6 +304,30 @@ describe('theme registry', () => {
expect(resolved.colors['rgb-chart-widget-stroke']).toBe('50 51 52');
});
+ it('keeps chrome and inset borders at the full border-light share unless a theme lowers them', () => {
+ const quiet: ThemeDefinition = {
+ version: 1,
+ name: 'quiet-borders-reference',
+ modes: { light: { appearance: { chromeBorderAlpha: '0', insetBorderAlpha: '0.5' } } },
+ };
+ const loud: ThemeDefinition = {
+ version: 1,
+ name: 'loud-borders-reference',
+ modes: { light: { appearance: { chromeBorderAlpha: '2' } } },
+ };
+
+ expect(defaultAppearance.chromeBorderAlpha).toBe('1');
+ expect(defaultAppearance.insetBorderAlpha).toBe('1');
+ expect(validateThemeDefinition(quiet)).toEqual([]);
+ expect(resolveTheme(quiet, 'light').appearance).toMatchObject({
+ chromeBorderAlpha: '0',
+ insetBorderAlpha: '0.5',
+ });
+ expect(validateThemeDefinition(loud)).toEqual([
+ 'Invalid appearance value for chromeBorderAlpha: 2',
+ ]);
+ });
+
it('rings subtle focus in the heavy border for a theme that predates the role', () => {
const resolved = resolveTheme(
{
diff --git a/packages/client/src/theme/registry.ts b/packages/client/src/theme/registry.ts
index d7e9d5a273..65c6fdadf1 100644
--- a/packages/client/src/theme/registry.ts
+++ b/packages/client/src/theme/registry.ts
@@ -297,6 +297,8 @@ export const themeAppearanceProperties: Readonly<
tooltipShadow: '--theme-tooltip-shadow',
motionFast: '--theme-motion-fast',
motionNormal: '--theme-motion-normal',
+ chromeBorderAlpha: '--theme-border-chrome-alpha',
+ insetBorderAlpha: '--theme-border-inset-alpha',
});
export const defaultAppearance: IThemeAppearance = Object.freeze({
@@ -388,6 +390,8 @@ export const defaultAppearance: IThemeAppearance = Object.freeze({
tooltipShadow: '0 2px 4px 0 rgb(0 0 0 / 0.25)',
motionFast: '150ms',
motionNormal: '200ms',
+ chromeBorderAlpha: '1',
+ insetBorderAlpha: '1',
});
/**
diff --git a/packages/client/src/theme/themes/clickhouse.spec.tsx b/packages/client/src/theme/themes/clickhouse.spec.tsx
index 74934c6651..65da6c92eb 100644
--- a/packages/client/src/theme/themes/clickhouse.spec.tsx
+++ b/packages/client/src/theme/themes/clickhouse.spec.tsx
@@ -403,11 +403,16 @@ describe('clickhouse theme definition', () => {
).toEqual([]);
});
- /** Click UI's keyboard outline is the focus ring, on rows inside content as on controls. */
- it.each<ThemeMode>(['light', 'dark'])('rings subtle focus in the outline in %s', (mode) => {
- const { colors } = resolveTheme(clickHouseTheme, mode);
- expect(colors['rgb-focus-subtle']).toBe(colors['rgb-focus-outline']);
- });
+ /** Click UI draws no stroke on icon buttons or chat chrome and separates a card's regions by
+ * fill; its keyboard outline is the focus ring. */
+ it.each<ThemeMode>(['light', 'dark'])(
+ 'draws no chrome or inset border and rings subtle focus in the outline in %s',
+ (mode) => {
+ const { appearance, colors } = resolveTheme(clickHouseTheme, mode);
+ expect([appearance.chromeBorderAlpha, appearance.insetBorderAlpha]).toEqual(['0', '0']);
+ expect(colors['rgb-focus-subtle']).toBe(colors['rgb-focus-outline']);
+ },
+ );
/** Click UI's control height, button padding and gap, `transition.default`, and the two steps of
* its `spaces` scale the shared spacing takes. */
diff --git a/packages/client/src/theme/themes/clickhouse.ts b/packages/client/src/theme/themes/clickhouse.ts
index 0c5f4dc24f..765a02ae99 100644
--- a/packages/client/src/theme/themes/clickhouse.ts
+++ b/packages/client/src/theme/themes/clickhouse.ts
@@ -519,6 +519,11 @@ const clickHouseShape = {
tableRowStroke: '1px', // table.cell.stroke
motionFast: '100ms', // transition.duration.medium, the step transition.default runs at
motionNormal: '150ms', // transition.duration.smooth
+ /** Click UI strokes cards, panels, dialogs, fields and tables in stroke.default, but not the
+ * controls and chat chrome LibreChat outlines (iconButton.*.stroke.default and tabs.basic are
+ * transparent), and it separates a card's inner regions by fill. */
+ chromeBorderAlpha: '0', // iconButton.primary.stroke.default
+ insetBorderAlpha: '0', // separation by fill, not a nested stroke
};
const elevation = (alpha: number): string =>
diff --git a/packages/client/src/theme/themes/clickui.spec.ts b/packages/client/src/theme/themes/clickui.spec.ts
index fbf705a4f7..369ae88ccf 100644
--- a/packages/client/src/theme/themes/clickui.spec.ts
+++ b/packages/client/src/theme/themes/clickui.spec.ts
@@ -642,6 +642,18 @@ const appearanceDecisions: Partial<Record<keyof IThemeAppearance, AppearanceDeci
reason:
'none: Click UI Tooltip.module.css draws its tooltip with no shadow; no token carries it',
},
+ chromeBorderAlpha: {
+ value: '0',
+ status: 'match',
+ reason:
+ '0: Click UI IconButton, tabs.basic and chat chrome draw no stroke (iconButton.*.stroke.default is rgba(0, 0, 0, 0)); hover and selection are a fill',
+ },
+ insetBorderAlpha: {
+ value: '0',
+ status: 'match',
+ reason:
+ '0: Click UI separates a card header from its body by fill; only tables and separators draw an inner stroke',
+ },
fieldFillStyle: {
value: 'fill',
status: 'match',
diff --git a/packages/client/src/theme/tokens.css b/packages/client/src/theme/tokens.css
index a08cb523e1..35ae083058 100644
--- a/packages/client/src/theme/tokens.css
+++ b/packages/client/src/theme/tokens.css
@@ -115,6 +115,13 @@
/* borders */
--color-border-light: rgb(var(--border-light) / var(--border-light-alpha, 1));
--color-border-medium: rgb(var(--border-medium) / var(--border-medium-alpha, 1));
+ /* border-light, at the share the theme keeps for chrome outlines and inset hairlines. */
+ --color-border-chrome: rgb(var(--border-light) / calc(var(--border-light-alpha, 1) * var(--theme-border-chrome-alpha, 1)));
+ /* border-heavy, at the chrome share: the pressed or selected outline of a control that is chrome. */
+ --color-border-chrome-heavy: rgb(var(--border-heavy) / calc(var(--border-heavy-alpha, 1) * var(--theme-border-chrome-alpha, 1)));
+ /* border-medium, at the chrome share: the hover outline of a chrome control. */
+ --color-border-chrome-medium: rgb(var(--border-medium) / calc(var(--border-medium-alpha, 1) * var(--theme-border-chrome-alpha, 1)));
+ --color-border-inset: rgb(var(--border-light) / calc(var(--border-light-alpha, 1) * var(--theme-border-inset-alpha, 1)));
--color-border-medium-alt: rgb(var(--border-medium-alt));
--color-border-heavy: rgb(var(--border-heavy) / var(--border-heavy-alpha, 1));
--color-border-xheavy: rgb(var(--border-xheavy) / var(--border-xheavy-alpha, 1));
diff --git a/packages/client/src/theme/tokens.spec.ts b/packages/client/src/theme/tokens.spec.ts
index 0bc4f5fd1a..203de10fe7 100644
--- a/packages/client/src/theme/tokens.spec.ts
+++ b/packages/client/src/theme/tokens.spec.ts
@@ -106,6 +106,33 @@ describe('theme color tokens', () => {
expect(css).toContain('color-mix(in oklab, rgb(var(--surface-primary)) 50%');
});
+ it('draws the chrome and inset borders as border-light at the theme share', async () => {
+ const css = await generate(['border-border-chrome', 'border-border-inset']);
+
+ expect(css).toContain(
+ 'rgb(var(--border-light) / calc(var(--border-light-alpha, 1) * var(--theme-border-chrome-alpha, 1)))',
+ );
+ expect(css).toContain(
+ 'rgb(var(--border-light) / calc(var(--border-light-alpha, 1) * var(--theme-border-inset-alpha, 1)))',
+ );
+ });
+
+ it('draws the chrome heavy border as border-heavy at the chrome share', async () => {
+ const css = await generate(['border-border-chrome-heavy']);
+
+ expect(css).toContain(
+ 'rgb(var(--border-heavy) / calc(var(--border-heavy-alpha, 1) * var(--theme-border-chrome-alpha, 1)))',
+ );
+ });
+
+ it('draws the chrome medium border as border-medium at the chrome share', async () => {
+ const css = await generate(['border-border-chrome-medium']);
+
+ expect(css).toContain(
+ 'rgb(var(--border-medium) / calc(var(--border-medium-alpha, 1) * var(--theme-border-chrome-alpha, 1)))',
+ );
+ });
+
it.each(['./theme.css', '../../../../client/src/style.css'])(
'%s preserves closed compatibility palettes without declaring them as semantic tokens',
async (repositoryEntry) => {
diff --git a/packages/client/src/theme/types/index.ts b/packages/client/src/theme/types/index.ts
index a6ceb4201e..2de73e2412 100644
--- a/packages/client/src/theme/types/index.ts
+++ b/packages/client/src/theme/types/index.ts
@@ -695,6 +695,14 @@ export interface IThemeAppearance {
tooltipShadow: string;
motionFast: string;
motionNormal: string;
+ /**
+ * The share of `border-light` that `border-chrome` (the outline of an icon button, pill, chip
+ * or avatar ring that sits on the shell) and `border-inset` (a hairline inside a surface that
+ * is already stroked) paint. 1 keeps them as `border-light`; 0 draws none, with the 1px box
+ * unchanged so layout and focus geometry stay put.
+ */
+ chromeBorderAlpha: string;
+ insetBorderAlpha: string;
}
export interface ThemeModeDefinition {
diff --git a/packages/data-provider/src/theme.ts b/packages/data-provider/src/theme.ts
index 6229ebbdf5..935c93a5a5 100644
--- a/packages/data-provider/src/theme.ts
+++ b/packages/data-provider/src/theme.ts
@@ -481,6 +481,10 @@ const appearanceValidators = {
tooltipShadow: isShadow,
motionFast: isDuration,
motionNormal: isDuration,
+ /** How much of `border-light` the outlines of controls and chips, and the hairlines inside a
+ * stroked surface, keep: 0 draws none and leaves the box where it was. */
+ chromeBorderAlpha: isOpacity,
+ insetBorderAlpha: isOpacity,
} satisfies Record<string, (value: unknown) => boolean>;
export type ThemeAppearanceToken = keyof typeof appearanceValidators;