@devries-cameron20 / t3code-1 / commits / 7591b64ec0
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

perf(web): the font previews compile with the React Compiler (#20601)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 16, 2026 at 22:02 UTC 7591b64ec0deb9be51e504b48ddb24d4c47ed7db
1 file changed +4 -3
apps/web/src/components/settings/SettingsFontPreviews.tsx
+4 -3
@@ -1,5 +1,5 @@
1 import { preloadPatchFile } from "@pierre/diffs/ssr";
2 -import { useCallback, useEffect, useRef, useState } from "react";
2 +import { useEffect, useRef, useState } from "react";
3 import { ComposerPromptEditor, type ComposerPromptEditorHandle } from "../ComposerPromptEditor";
4 import { EMPTY_COMPOSER_CONTEXT_RECORDS } from "../composerContextPresentation";
5 import { terminalThemeFromApp } from "../ThreadTerminalDrawer";
@@ -22,10 +22,10 @@ export function PromptFontPreview() {
22 const editorRef = useRef<ComposerPromptEditorHandle>(null);
23 const [prompt, setPrompt] = useState(PROMPT_PREVIEW_TEXT);
24 const [cursor, setCursor] = useState(PROMPT_PREVIEW_TEXT.length);
25 - const onChange = useCallback((nextValue: string, nextCursor: number) => {
25 + const onChange = (nextValue: string, nextCursor: number) => {
26 setPrompt(nextValue);
27 setCursor(nextCursor);
28 - }, []);
28 + };
29 return (
30 <div className="mt-1 mb-2 rounded-lg border border-border bg-background px-3 py-2">
31 <ComposerPromptEditor
@@ -173,6 +173,7 @@ export function TerminalFontPreview({ family, size }: { family: string; size: nu
173 const surface = surfaceRef.current;
174 if (!mount || !surface) return;
175 surface.setTheme(terminalThemeFromApp(mount));
176 + // oxlint-disable-next-line react/exhaustive-effect-dependencies -- The tokens come from the DOM's computed styles, which a theme change rewrites.
177 }, [theme, resolvedTheme]);
178
179 useEffect(() => {