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

fix: Keep Running Chat Ring Centered at Any UI Scale (#16810)

Marco Beretta71ad832cfbea
diff --git a/client/src/components/Conversations/Convo.tsx b/client/src/components/Conversations/Convo.tsx
index be05477697..197075123e 100644
--- a/client/src/components/Conversations/Convo.tsx
+++ b/client/src/components/Conversations/Convo.tsx
@@ -390,7 +390,8 @@ function Conversation({
describedBy={projectBadgeProjectId ? projectLabelId : undefined}
>
{/* Status sits on the avatar so the row's trailing edge stays free for its badges
- and menu. The ring is 34px around the 20px icon: offset by half the difference. */}
+ and menu. The ring is 2.125rem around the 1.25rem icon: offset by half the
+ difference. Both are rem so the ring follows the icon box at any UI scale. */}
<span className="relative flex size-5 shrink-0 items-center justify-center">
<ConversationEndpointIcon conversation={conversation} size={20} context="menu-item" />
{isGenerating && (
@@ -398,7 +399,7 @@ function Conversation({
size={34}
strokeWidth={1.9}
bgOpacity={0.14}
- className="pointer-events-none absolute -top-[7px] -left-[7px]"
+ className="pointer-events-none absolute -top-[0.4375rem] -left-[0.4375rem] size-[2.125rem]"
/>
)}
{isUnseen && !isGenerating && (
diff --git a/client/src/components/Conversations/__tests__/Convo.status.spec.tsx b/client/src/components/Conversations/__tests__/Convo.status.spec.tsx
index 67ce2383a2..92953265cd 100644
--- a/client/src/components/Conversations/__tests__/Convo.status.spec.tsx
+++ b/client/src/components/Conversations/__tests__/Convo.status.spec.tsx
@@ -9,8 +9,8 @@ jest.mock('@librechat/client', () => ({
useMediaQuery: () => false,
useRemScale: () => 1,
useToastContext: () => ({ showToast: jest.fn() }),
- Spinner: ({ className }: { className?: string }) => (
- <svg data-testid="status-ring" className={className} />
+ Spinner: ({ className, size }: { className?: string; size?: string | number }) => (
+ <svg data-testid="status-ring" className={className} data-size={size} />
),
Button: ({ children, ...props }: React.ComponentProps<'button'>) => (
<button {...props}>{children}</button>
@@ -111,6 +111,21 @@ describe('Conversation row status', () => {
expect(rowButton()).toContainElement(ring);
});
+ it('sizes the ring in rem so it follows the avatar box at any UI scale', () => {
+ renderRow({ isGenerating: true });
+
+ expect(screen.getByTestId('status-ring').getAttribute('class')).toContain('size-[2.125rem]');
+ });
+
+ it('offsets the ring in rem so it stays centered on the avatar at any UI scale', () => {
+ renderRow({ isGenerating: true });
+
+ const className = screen.getByTestId('status-ring').getAttribute('class') ?? '';
+ expect(className).toContain('-top-[0.4375rem]');
+ expect(className).toContain('-left-[0.4375rem]');
+ expect(className).not.toMatch(/\[\d+px\]/);
+ });
+
it('marks an unseen reply on the avatar and in the title weight', () => {
mockIsUnseen = true;
const { container } = renderRow();