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

🧹 refactor: Clear Chat Design Suppressions That Render Nothing (#16822)

Marco Berettae95424277875
diff --git a/client/src/components/Chat/Input/Files/Table/DataTable.tsx b/client/src/components/Chat/Input/Files/Table/DataTable.tsx
index f8b33f483b..287064e96f 100644
--- a/client/src/components/Chat/Input/Files/Table/DataTable.tsx
+++ b/client/src/components/Chat/Input/Files/Table/DataTable.tsx
@@ -225,7 +225,7 @@ export default function DataTable<TData, TValue>({ columns, data }: DataTablePro
key={cell.id}
size="compact"
className={cn(
- 'align-start px-2 text-xs sm:px-4 sm:text-sm [tr[data-disabled=true]_&]:opacity-50',
+ 'px-2 text-xs sm:px-4 sm:text-sm [tr[data-disabled=true]_&]:opacity-50',
cell.column.id === 'select' ? 'overflow-visible' : 'overflow-x-auto',
)}
style={style}
diff --git a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx
index 0c904dd9de..29c11b7baf 100644
--- a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx
+++ b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx
@@ -192,7 +192,7 @@ const PhaseLabel = memo(function PhaseLabel({
key={`retired-${lines.retired}`}
className={cn(
'absolute inset-x-0 top-0 block truncate',
- 'animate-out fade-out-0 slide-out-to-top-5 fill-mode-forwards',
+ 'animate-out fade-out-0 slide-out-to-top-5 [animation-fill-mode:forwards]',
FOLD_EASING,
failed && 'text-text-warning',
)}
diff --git a/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx b/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx
index 4b5b705f5c..4adfb893f6 100644
--- a/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/Attachment.tsx
@@ -132,7 +132,6 @@ const FileAttachment = memo(({ attachment }: { attachment: Partial<TAttachment>
return (
<div
className={cn(
- 'file-attachment-container',
'transition-all duration-300 ease-out',
isVisible ? 'translate-y-0 opacity-100' : 'translate-y-2 opacity-0',
)}
@@ -153,7 +152,6 @@ const FileAttachment = memo(({ attachment }: { attachment: Partial<TAttachment>
return (
<div
className={cn(
- 'file-attachment-container',
'transition-all duration-300 ease-out',
isVisible ? 'translate-y-0 opacity-100' : 'translate-y-2 opacity-0',
)}
@@ -333,7 +331,7 @@ const TextAttachment = memo(
return (
<div
className={cn(
- 'text-attachment-container flex w-full flex-col gap-1.5',
+ 'flex w-full flex-col gap-1.5',
'transition-all duration-300 ease-out',
isVisible ? 'translate-y-0 opacity-100' : 'translate-y-2 opacity-0',
)}
@@ -415,7 +413,6 @@ const ImageAttachment = memo(({ attachment }: { attachment: TAttachment }) => {
return (
<div
className={cn(
- 'image-attachment-container',
'transition-all duration-500 ease-out',
isLoaded ? 'scale-100 opacity-100' : 'scale-[0.98] opacity-0',
)}
diff --git a/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx b/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx
index a38aa582b3..abfa7dc2bb 100644
--- a/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx
@@ -97,7 +97,7 @@ export const StreamingThoughtPeek = memo(({ text }: { text: string }) => {
/** Fixed-height window the text scrolls through. The one-line top pad
* keeps the first streaming line below the top fade (a blank line
* above it) instead of jammed against the faded edge. */
- 'text-text-primary h-[5.5rem] overflow-hidden pt-[26px] leading-[26px] break-words whitespace-pre-wrap',
+ 'text-text-primary h-[5.5rem] overflow-hidden pt-6.5 leading-6.5 break-words whitespace-pre-wrap',
fontSize,
)}
style={{ maskImage: PEEK_FADE, WebkitMaskImage: PEEK_FADE }}
@@ -426,9 +426,7 @@ export const ReasoningCompact = memo(
<div className="overflow-hidden" ref={expandRef}>
{shouldRenderBody && (
<div className="border-border-light bg-surface-secondary text-text-secondary relative my-2 rounded-2xl border p-4">
- <p className={cn('leading-[26px] whitespace-pre-wrap', fontSize)}>
- {reasoningText}
- </p>
+ <p className={cn('leading-6.5 whitespace-pre-wrap', fontSize)}>{reasoningText}</p>
<FloatingThinkingBar
isVisible={isBarVisible && isExpanded && !headerInViewport}
isExpanded={isExpanded}
diff --git a/client/src/components/Chat/Messages/Content/Parts/SteerPart.tsx b/client/src/components/Chat/Messages/Content/Parts/SteerPart.tsx
index 029f6248be..d4bb3690b7 100644
--- a/client/src/components/Chat/Messages/Content/Parts/SteerPart.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/SteerPart.tsx
@@ -116,7 +116,8 @@ const SteerPart = memo(function SteerPart({
return (
<div
id={steerId ? `steer-${steerId}` : undefined}
- className="steer-render group relative my-5 flex w-full justify-end"
+ data-steer-render
+ className="group relative my-5 flex w-full justify-end"
data-testid="steer-part"
>
<div className="user-turn relative flex w-fit max-w-[90%] flex-col items-end sm:max-w-[85%]">
diff --git a/client/src/components/Chat/Messages/Content/Parts/__tests__/SteerPart.test.tsx b/client/src/components/Chat/Messages/Content/Parts/__tests__/SteerPart.test.tsx
index ba0a530330..3b2f7ba18d 100644
--- a/client/src/components/Chat/Messages/Content/Parts/__tests__/SteerPart.test.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/__tests__/SteerPart.test.tsx
@@ -178,7 +178,7 @@ describe('SteerPart presentation', () => {
renderPart();
const part = screen.getByTestId('steer-part');
expect(part).toHaveAttribute('id', 'steer-s1');
- expect(part).toHaveClass('steer-render');
+ expect(part).toHaveAttribute('data-steer-render');
});
it('stays on the message content edge instead of outdenting', () => {
diff --git a/client/src/components/Chat/Messages/MessageNav.tsx b/client/src/components/Chat/Messages/MessageNav.tsx
index 7d6ca3c6a0..d4b78b89b7 100644
--- a/client/src/components/Chat/Messages/MessageNav.tsx
+++ b/client/src/components/Chat/Messages/MessageNav.tsx
@@ -80,10 +80,10 @@ export function buildEntry(id: string, msg: TMessage, node?: HTMLElement): Messa
}
const USER_TURN_SELECTOR = '.user-turn';
-const STEER_RENDER_CLASS = 'steer-render';
+const STEER_RENDER_ATTRIBUTE = 'data-steer-render';
/** One query, document order: steer nodes interleave at their in-thread
* position INSIDE the response that absorbed them. */
-const ENTRY_NODE_SELECTOR = `.message-render, .${STEER_RENDER_CLASS}`;
+const ENTRY_NODE_SELECTOR = `.message-render, [${STEER_RENDER_ATTRIBUTE}]`;
/** Rail-relevant node: a message row or an in-thread steer part. The mutation
* filter must match BOTH — a steer node swap (optimistic → persisted) or
@@ -91,7 +91,7 @@ const ENTRY_NODE_SELECTOR = `.message-render, .${STEER_RENDER_CLASS}`;
function isEntryNode(node: HTMLElement): boolean {
return (
node.classList?.contains('message-render') === true ||
- node.classList?.contains(STEER_RENDER_CLASS) === true
+ node.hasAttribute?.(STEER_RENDER_ATTRIBUTE) === true
);
}
@@ -165,7 +165,7 @@ function getMessageEntries(root: ParentNode, messagesById: Map<string, TMessage>
continue;
}
seen.add(id);
- if (node.classList.contains(STEER_RENDER_CLASS)) {
+ if (node.hasAttribute(STEER_RENDER_ATTRIBUTE)) {
entries.push(buildSteerEntry(node, id));
continue;
}
diff --git a/client/src/components/Chat/Messages/__tests__/MessageNav.spec.tsx b/client/src/components/Chat/Messages/__tests__/MessageNav.spec.tsx
index 2c37bb2ef3..2d71a30e51 100644
--- a/client/src/components/Chat/Messages/__tests__/MessageNav.spec.tsx
+++ b/client/src/components/Chat/Messages/__tests__/MessageNav.spec.tsx
@@ -473,7 +473,8 @@ describe('MessageNav', () => {
): HTMLDivElement {
const steer = document.createElement('div');
steer.id = `steer-${steerId}`;
- steer.className = 'steer-render group relative';
+ steer.className = 'group relative';
+ steer.setAttribute('data-steer-render', '');
const header = document.createElement('h2');
header.textContent = 'Danny';
const body = document.createElement('div');
@@ -743,7 +744,7 @@ describe('MessageNav', () => {
* two places short of the end while the reader sat at the very bottom. */
const steer = document.createElement('div');
steer.id = 'steer-s1';
- steer.className = 'steer-render';
+ steer.setAttribute('data-steer-render', '');
steer.textContent = 'mid-run steer';
Object.defineProperty(steer, 'offsetTop', { value: 60, configurable: true });
Object.defineProperty(steer, 'offsetHeight', { value: 40, configurable: true });
diff --git a/e2e/specs/mock/steering.spec.ts b/e2e/specs/mock/steering.spec.ts
index d15252055a..56419f5582 100644
--- a/e2e/specs/mock/steering.spec.ts
+++ b/e2e/specs/mock/steering.spec.ts
@@ -117,7 +117,7 @@ test.describe('mid-run steering and queuing', () => {
* SURVIVES inside the response after run end, with no degradation to a
* queued follow-up turn.
*/
- test('steers mid-run: anchored bubble appears immediately and applies at the next tool boundary', async ({
+ test('steers mid-run: anchored bubble appears immediately and applies at the next tool boundary @scenario:steer-renders-in-thread', async ({
page,
}) => {
test.setTimeout(150000);
diff --git a/eslint-suppressions.json b/eslint-suppressions.json
index 0c430ac9be..98c2925607 100644
--- a/eslint-suppressions.json
+++ b/eslint-suppressions.json
@@ -228,10 +228,7 @@
},
"client/src/components/Chat/Input/Files/Table/DataTable.tsx": {
"shadcn/no-restyle": {
- "count": 14
- },
- "shadcn/no-unknown-classes": {
- "count": 1
+ "count": 13
}
},
"client/src/components/Chat/Input/HeaderOptions.tsx": {
@@ -360,13 +357,10 @@
},
"client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx": {
"shadcn/no-arbitrary-values": {
- "count": 1
+ "count": 2
},
"shadcn/no-inline-styles": {
"count": 2
- },
- "shadcn/no-raw-colors": {
- "count": 1
}
},
"client/src/components/Chat/Messages/Content/AgentHandoff.tsx": {
@@ -459,14 +453,8 @@
"shadcn/no-inline-styles": {
"count": 9
},
- "shadcn/no-raw-colors": {
- "count": 1
- },
"shadcn/no-restyle": {
"count": 6
- },
- "shadcn/no-unknown-classes": {
- "count": 3
}
},
"client/src/components/Chat/Messages/Content/Parts/BashCall.tsx": {
@@ -531,9 +519,6 @@
}
},
"client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx": {
- "shadcn/no-arbitrary-values": {
- "count": 3
- },
"shadcn/no-inline-styles": {
"count": 4
},
@@ -551,7 +536,7 @@
},
"client/src/components/Chat/Messages/Content/Parts/SteerPart.tsx": {
"shadcn/no-unknown-classes": {
- "count": 2
+ "count": 1
}
},
"client/src/components/Chat/Messages/Content/Parts/Summary.tsx": {
@@ -2183,4 +2168,4 @@
"count": 1
}
}
-}
\ No newline at end of file
+}