From aae49b375f89fee012dd941226d3f4a7aa78356e Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Tue, 6 Oct 2026 22:06:20 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20refactor:=20Clear=20the=20Raw-Co?= =?UTF-8?q?lor=20and=20Unknown-Class=20Design=20Suppressions=20(#16825)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: Clear the Raw-Color and Unknown-Class Design Suppressions * fix: Keep the Prose Classes style.css Still Reads * fix: Keep the split-parent Marker the Screenshot Spec Waits On * chore: Prune the Recorded Suppressions the Rebase Cleared --- .../src/components/Chat/Input/AddedConvo.tsx | 2 +- .../src/components/Endpoints/ConvoIconURL.tsx | 2 +- .../Endpoints/MessageEndpointIcon.tsx | 8 +-- .../SidePanel/Agents/AgentConfig.tsx | 2 +- .../components/ui/TermsAndConditionsModal.tsx | 2 +- client/src/hooks/Input/useMentions.ts | 6 +- client/src/style.css | 5 ++ eslint-suppressions.json | 59 ------------------- eslint.config.mjs | 18 ++++++ .../src/components/AnimatedSearchInput.tsx | 2 +- packages/client/src/components/Badge.tsx | 16 ++--- 11 files changed, 39 insertions(+), 83 deletions(-) diff --git a/client/src/components/Chat/Input/AddedConvo.tsx b/client/src/components/Chat/Input/AddedConvo.tsx index 4a5fc71d37..86f75c35f2 100644 --- a/client/src/components/Chat/Input/AddedConvo.tsx +++ b/client/src/components/Chat/Input/AddedConvo.tsx @@ -44,7 +44,7 @@ export default function AddedConvo({ conversation={addedConvo} endpointsConfig={endpointsConfig} agentsMap={agentsMap} - containerClassName="shadow-stroke overflow-hidden rounded-full" + containerClassName="avatar-stroke overflow-hidden rounded-full" context="menu-item" size={20} /> diff --git a/client/src/components/Endpoints/ConvoIconURL.tsx b/client/src/components/Endpoints/ConvoIconURL.tsx index 61c3d47bfd..d35469f80b 100644 --- a/client/src/components/Endpoints/ConvoIconURL.tsx +++ b/client/src/components/Endpoints/ConvoIconURL.tsx @@ -51,7 +51,7 @@ const ConvoIconURL: React.FC = ({ } return ( -
+
); diff --git a/client/src/components/Endpoints/MessageEndpointIcon.tsx b/client/src/components/Endpoints/MessageEndpointIcon.tsx index c5e953d20e..9373a1de2a 100644 --- a/client/src/components/Endpoints/MessageEndpointIcon.tsx +++ b/client/src/components/Endpoints/MessageEndpointIcon.tsx @@ -31,7 +31,7 @@ const MessageEndpointIcon: React.FC = (props) => { className={cn('overflow-hidden rounded-full', props.className ?? '')} > {assistantName} = (props) => {
) : (
-
+
@@ -60,7 +60,7 @@ const MessageEndpointIcon: React.FC = (props) => { className={cn('overflow-hidden rounded-full', props.className ?? '')} > {agentName} = (props) => {
) : (
-
+
diff --git a/client/src/components/SidePanel/Agents/AgentConfig.tsx b/client/src/components/SidePanel/Agents/AgentConfig.tsx index b7f947d820..db6907af95 100644 --- a/client/src/components/SidePanel/Agents/AgentConfig.tsx +++ b/client/src/components/SidePanel/Agents/AgentConfig.tsx @@ -124,7 +124,7 @@ export default function AgentConfig({ >
{providerValue !== undefined && ( -
+
-
+
{content !== '' ? ( ) : ( diff --git a/client/src/hooks/Input/useMentions.ts b/client/src/hooks/Input/useMentions.ts index e07e20e769..125a9fe3fa 100644 --- a/client/src/hooks/Input/useMentions.ts +++ b/client/src/hooks/Input/useMentions.ts @@ -45,7 +45,7 @@ const assistantMapFn = description: description ?? '', icon: EndpointIcon({ conversation: { assistant_id: id, endpoint }, - containerClassName: 'shadow-stroke overflow-hidden rounded-full', + containerClassName: 'avatar-stroke overflow-hidden rounded-full', endpointsConfig: endpointsConfig, context: 'menu-item', assistantMap, @@ -119,7 +119,7 @@ export default function useMentions({ endpoint: EModelEndpoint.agents, iconURL: avatar?.filepath, }, - containerClassName: 'shadow-stroke overflow-hidden rounded-full', + containerClassName: 'avatar-stroke overflow-hidden rounded-full', endpointsConfig: endpointsConfig, context: 'menu-item', size: 20, @@ -247,7 +247,7 @@ export default function useMentions({ description: getPresetTitle(preset, true), icon: EndpointIcon({ conversation: preset, - containerClassName: 'shadow-stroke overflow-hidden rounded-full', + containerClassName: 'avatar-stroke overflow-hidden rounded-full', endpointsConfig: endpointsConfig, context: 'menu-item', assistantMap, diff --git a/client/src/style.css b/client/src/style.css index 3acbe4b34d..5a486a370d 100644 --- a/client/src/style.css +++ b/client/src/style.css @@ -1560,9 +1560,11 @@ html { } } +.avatar-stroke, .shadow-stroke { position: relative; } +.avatar-stroke:after, .shadow-stroke:after { --tw-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); --tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color); @@ -1574,7 +1576,9 @@ html { right: 0; top: 0; } +.dark .avatar-stroke:after, .dark .shadow-stroke:after, +.avatar-stroke:after, .shadow-stroke:after { box-shadow: 0 0 transparent, @@ -1584,6 +1588,7 @@ html { var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow); } +.dark .avatar-stroke:after, .dark .shadow-stroke:after { --tw-shadow: inset 0 0 0 1px hsla(0, 0%, 100%, 0.3); --tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color); diff --git a/eslint-suppressions.json b/eslint-suppressions.json index c994c3157c..5f21c7d7f9 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -146,11 +146,6 @@ "count": 1 } }, - "client/src/components/Chat/Input/AddedConvo.tsx": { - "shadcn/no-raw-colors": { - "count": 1 - } - }, "client/src/components/Chat/Input/AskUserQuestionPopover.tsx": { "shadcn/no-restyle": { "count": 7 @@ -882,18 +877,10 @@ "count": 2 } }, - "client/src/components/Endpoints/ConvoIconURL.tsx": { - "shadcn/no-raw-colors": { - "count": 1 - } - }, "client/src/components/Endpoints/MessageEndpointIcon.tsx": { "shadcn/no-arbitrary-values": { "count": 1 }, - "shadcn/no-raw-colors": { - "count": 4 - }, "shadcn/no-restyle": { "count": 3 } @@ -1454,9 +1441,6 @@ "shadcn/no-arbitrary-values": { "count": 3 }, - "shadcn/no-raw-colors": { - "count": 1 - }, "shadcn/no-restyle": { "count": 9 } @@ -2016,21 +2000,11 @@ "count": 2 } }, - "packages/client/src/components/AnimatedSearchInput.tsx": { - "shadcn/no-raw-colors": { - "count": 1 - } - }, "packages/client/src/components/Avatar.tsx": { "shadcn/no-inline-styles": { "count": 1 } }, - "packages/client/src/components/Badge.tsx": { - "shadcn/no-unknown-classes": { - "count": 6 - } - }, "packages/client/src/components/Combobox.tsx": { "shadcn/no-inline-styles": { "count": 2 @@ -2079,9 +2053,6 @@ "packages/client/src/components/SplitText.tsx": { "shadcn/no-inline-styles": { "count": 7 - }, - "shadcn/no-unknown-classes": { - "count": 1 } }, "packages/client/src/components/Toast.tsx": { @@ -2094,36 +2065,6 @@ "count": 2 } }, - "packages/client/src/svgs/BirthdayIcon.tsx": { - "shadcn/no-raw-colors": { - "count": 10 - } - }, - "packages/client/src/svgs/DiscordIcon.tsx": { - "shadcn/no-raw-colors": { - "count": 2 - } - }, - "packages/client/src/svgs/FacebookIcon.tsx": { - "shadcn/no-raw-colors": { - "count": 3 - } - }, - "packages/client/src/svgs/GeminiIcon.tsx": { - "shadcn/no-raw-colors": { - "count": 2 - } - }, - "packages/client/src/svgs/GoogleIcon.tsx": { - "shadcn/no-raw-colors": { - "count": 4 - } - }, - "packages/client/src/svgs/PaLMIcon.tsx": { - "shadcn/no-raw-colors": { - "count": 7 - } - }, "packages/client/src/svgs/SendMessageIcon.tsx": { "shadcn/no-inline-styles": { "count": 1 diff --git a/eslint.config.mjs b/eslint.config.mjs index b1d1034481..9c9fd1c986 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -307,6 +307,7 @@ export default [ 'scroll-animation', 'hover-button-active', 'open', + 'split-parent', ], }, ], @@ -326,6 +327,23 @@ export default [ 'shadcn/require-static-classes': 'off', }, }, + { + // Entries 2 and 4 of packages/client/src/theme/allowlist.md: the third-party brand marks and + // the opt-in multicolour illustration carry fixed `fill` literals that must not follow the + // theme. The scope is these six files by name, so a new SVG or any other file still reports + // its colours; the allowlist stays the record of why each one is here. + files: [ + 'packages/client/src/svgs/GoogleIcon.tsx', + 'packages/client/src/svgs/FacebookIcon.tsx', + 'packages/client/src/svgs/DiscordIcon.tsx', + 'packages/client/src/svgs/GeminiIcon.tsx', + 'packages/client/src/svgs/PaLMIcon.tsx', + 'packages/client/src/svgs/BirthdayIcon.tsx', + ], + rules: { + 'shadcn/no-raw-colors': 'off', + }, + }, { files: ['**/.eslintrc.js', '**/jest.config.js', 'client/vite.config.ts'], languageOptions: { diff --git a/packages/client/src/components/AnimatedSearchInput.tsx b/packages/client/src/components/AnimatedSearchInput.tsx index bfe97f7f9c..158c4a7058 100644 --- a/packages/client/src/components/AnimatedSearchInput.tsx +++ b/packages/client/src/components/AnimatedSearchInput.tsx @@ -66,7 +66,7 @@ const AnimatedSearchInput = ({ >
- {Icon && ( -