The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the browser surface slot compiles with the React Compiler (#20542)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 22:19 UTC
7a08cdf5f2852fc82978a50cd2d53095b0393f2f
1 file changed
+7
-1
apps/web/src/browser/BrowserSurfaceSlot.tsx
+7
-1
@@ -87,7 +87,13 @@ export function BrowserSurfaceSlot(props: {
87
useLayoutEffect(() => {
88
presentationRef.current = { visible, cornerRadius, zIndex };
89
updateRef.current?.();
90
- }, [cornerRadius, layoutVersion, visible, zIndex]);
90
+ }, [
91
+ cornerRadius,
92
+ // oxlint-disable-next-line react/exhaustive-effect-dependencies -- A layoutVersion bump means the slot moved without resizing, so it re-presents at the new position.
93
+ layoutVersion,
94
+ visible,
95
+ zIndex,
96
+ ]);
97
98
return <div ref={elementRef} className={className} data-browser-surface-slot={tabId} />;
99
}