The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 08:00 UTC
perf(web): toggle groups compile with the React Compiler (#20453)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 18:46 UTC
e9712d261e74ca54e7fb662d7a04a033423aa0f8
2 files changed
+5
-2
apps/web/reactCompiledFiles.ts
+1
@@ -28,4 +28,5 @@ export const REACT_COMPILED_FILES = [
28
"apps/web/src/components/ComposerPromptEditorTiptap.tsx",
29
"apps/web/src/browser/ServerBrowserSurface.tsx",
30
"apps/web/src/assets/assetUrls.ts",
31
+ "apps/web/src/components/ui/toggle-group.tsx",
32
] as const;
apps/web/src/components/ui/toggle-group.tsx
+4
-2
@@ -16,12 +16,14 @@ const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariant
16
function ToggleGroup({
17
className,
18
variant = "segmented",
19
- size = variant === "segmented" ? "segmented" : "default",
19
+ size: sizeProp,
20
orientation = "horizontal",
21
children,
22
...props
23
}: ToggleGroupPrimitive.Props & VariantProps<typeof toggleVariants>) {
24
- const value = React.useMemo(() => ({ size, variant }), [size, variant]);
24
+ const size =
25
+ sizeProp === undefined ? (variant === "segmented" ? "segmented" : "default") : sizeProp;
26
+ const value = { size, variant };
27
return (
28
<ToggleGroupPrimitive
29
className={cn(