The best way to control Claude Code, Codex and more from any computer or phone
refactor(web): sidebar resize options stay cached without "use memo" (#20776)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 23:21 UTC
fc73c24ad37764c5b78e3b0ec1e91db5a5dc6e37
1 file changed
+3
-4
apps/web/src/components/ui/sidebar.tsx
+3
-4
@@ -177,8 +177,7 @@ function SidebarProvider({
177
);
178
}
179
180
-/** The rail's width restore and drag refresh key on this value. */
181
-function useResolvedSidebarResizable({
180
+function resolveSidebarResizable({
181
collapsible,
182
isMobile,
183
resizable,
@@ -187,7 +186,6 @@ function useResolvedSidebarResizable({
186
isMobile: boolean;
187
resizable: boolean | SidebarResizableOptions;
188
}): SidebarResolvedResizableOptions | null {
190
- "use memo";
189
if (isMobile || collapsible === "none" || !resizable) {
190
return null;
191
}
@@ -217,7 +215,8 @@ function Sidebar({
215
resizable?: boolean | SidebarResizableOptions;
216
}) {
217
const { isMobile, state, openMobile, setOpenMobile, setMobileSheetElement } = useSidebar();
220
- const resolvedResizable = useResolvedSidebarResizable({ collapsible, isMobile, resizable });
218
+ // The rail's width restore and drag refresh key on this value.
219
+ const resolvedResizable = resolveSidebarResizable({ collapsible, isMobile, resizable });
220
const instanceContextValue: SidebarInstanceContextProps = { side, resizable: resolvedResizable };
221
222
if (collapsible === "none") {