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: Set the Elapsed Reading on the Column Its Neighbors Share (#15195)

Danny Avilacc0111b3cf90
diff --git a/client/src/components/Chat/Messages/Elapsed.tsx b/client/src/components/Chat/Messages/Elapsed.tsx
index 913f75b81b..62c330ce2b 100644
--- a/client/src/components/Chat/Messages/Elapsed.tsx
+++ b/client/src/components/Chat/Messages/Elapsed.tsx
@@ -59,8 +59,13 @@ const Elapsed = memo(function Elapsed({ index }: { index: number }) {
}, [start]);
const labels = getElapsedDurationLabels(seconds * 1000, i18n.language);
+ /** `ps-1.5` puts the reading on the column everything else in this slot
+ * shares: the streaming dot pads the same 6px to center on the size-6
+ * header icon's axis (see `EmptyTextPart`), and the hover-button glyphs
+ * that replace the timer sit behind the same `p-1.5`. Inline-start, so
+ * the alignment holds in RTL. */
return (
- <span className="flex items-center text-text-secondary">
+ <span className="flex items-center ps-1.5 text-text-secondary">
<span aria-hidden="true" className="tabular-nums" data-testid="stream-elapsed">
{localize(labels.key, labels.values)}
</span>
diff --git a/client/src/components/Chat/Messages/__tests__/Elapsed.spec.tsx b/client/src/components/Chat/Messages/__tests__/Elapsed.spec.tsx
index dbc86e732e..15da454316 100644
--- a/client/src/components/Chat/Messages/__tests__/Elapsed.spec.tsx
+++ b/client/src/components/Chat/Messages/__tests__/Elapsed.spec.tsx
@@ -34,6 +34,9 @@ describe('Elapsed', () => {
expect(screen.getByTestId('stream-elapsed')).toHaveTextContent(/^5s$/);
expect(screen.getByTestId('stream-elapsed')).toHaveAttribute('aria-hidden', 'true');
expect(screen.getByText('5 seconds elapsed')).toHaveClass('sr-only');
+ /** The 6px inline-start inset that lines the reading up with the
+ * streaming dot and the hover-button glyphs that replace it. */
+ expect(screen.getByTestId('stream-elapsed').parentElement).toHaveClass('ps-1.5');
advance(54_000);
expect(screen.getByTestId('stream-elapsed')).toHaveTextContent(/^59s$/);