diff --git a/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx b/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx index 5b8bc23155..0c91612261 100644 --- a/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx +++ b/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx @@ -97,7 +97,6 @@ export const ThinkingButton = memo( shimmerLabel?: boolean; }) => { const localize = useLocalize(); - const fontSize = useAtomValue(fontSizeAtom); const [isCopied, setIsCopied] = useState(false); @@ -116,10 +115,11 @@ export const ThinkingButton = memo( onClick={onClick} aria-expanded={isExpanded} aria-controls={contentId} - className={cn( - 'group/button flex flex-1 items-center justify-start rounded-lg pr-10 leading-[18px]', - fontSize, - )} + /** `tool-status-text`, not the reader's body size: this header is a + * row in the same list as tool calls, grouped thoughts and phase + * summaries, all set at that scale. Sized to the body it read as a + * second, larger kind of row beside them. */ + className="group/button tool-status-text flex flex-1 items-center justify-start rounded-lg pr-10" > { - const fontSize = useAtomValue(fontSizeAtom); return (
-
+
- {label} + {label}
); diff --git a/client/src/components/Chat/Messages/Content/Parts/__tests__/Thinking.test.tsx b/client/src/components/Chat/Messages/Content/Parts/__tests__/Thinking.test.tsx new file mode 100644 index 0000000000..d06f277361 --- /dev/null +++ b/client/src/components/Chat/Messages/Content/Parts/__tests__/Thinking.test.tsx @@ -0,0 +1,51 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { ThinkingButton, ThinkingLabel } from '../Thinking'; + +jest.mock('~/hooks', () => ({ + useLocalize: () => (key: string) => key, + useExpandCollapse: () => ({ style: {}, ref: { current: null } }), +})); + +jest.mock('~/store/fontSize', () => ({ + fontSizeAtom: { toString: () => 'fontSizeAtom' }, +})); + +jest.mock('jotai', () => ({ + ...jest.requireActual('jotai'), + useAtomValue: () => 'text-xl', +})); + +jest.mock('~/components/Messages/Content/CopyButton', () => ({ + __esModule: true, + default: () =>