The best way to control Claude Code, Codex and more from any computer or phone
fix(web): keep right panel maximize available in narrow windows (#25389)
Alex committed
Oct 27, 2026 at 00:38 UTC
70eccd48e47398cc66d422d47de9c2af8e1c30e5
1 file changed
+11
-3
apps/web/src/components/ChatView.tsx
+11
-3
@@ -277,6 +277,7 @@ import { useOpenFavoriteEditorShortcut } from "./chat/OpenInPickerShortcut";
277
import {
278
PanelLayoutControls,
279
type PanelLayoutControlsProps,
280
+ RightPanelMaximizeControl,
281
ThreadPanelHeaderControl,
282
WorkspaceTitlebarControls,
283
} from "./chat/PanelLayoutControls";
@@ -678,7 +679,7 @@ export default function ChatView(props: ChatViewProps) {
679
window.addEventListener("dragend", clearWorkspaceFileDrag);
680
return () => window.removeEventListener("dragend", clearWorkspaceFileDrag);
681
}, [isWorkspaceFileDragActive]);
681
- const shouldUsePlanSidebarSheet = useMediaQuery(RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY);
682
+ const prefersPlanSidebarSheet = useMediaQuery(RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY);
683
const isMobileViewport = useMediaQuery("max-sm");
684
const [workspaceLayoutElement, setWorkspaceLayoutElement] = useState<HTMLDivElement | null>(null);
685
const threadPanelPopoverAnchorRef = useRef<HTMLElement | null>(null);
@@ -948,6 +949,7 @@ export default function ChatView(props: ChatViewProps) {
949
const rightPanelState = useRightPanelStore((state) =>
950
selectThreadRightPanelState(state.byThreadKey, activeThreadRef),
951
);
952
+ const shouldUsePlanSidebarSheet = prefersPlanSidebarSheet && rightPanelState.maximized !== true;
953
const activeRightPanelSurface = useRightPanelStore((state) =>
954
selectActiveRightPanelSurface(state.byThreadKey, activeThreadRef),
955
);
@@ -990,7 +992,7 @@ export default function ChatView(props: ChatViewProps) {
992
activePreviewMiniPlayer?.source ?? null,
993
renderedRightPanelSurface,
994
);
993
- const canMaximizeRightPanel = rightPanelOpen && !shouldUsePlanSidebarSheet;
995
+ const canMaximizeRightPanel = rightPanelOpen;
996
const rightPanelMaximized = canMaximizeRightPanel && rightPanelState.maximized === true;
997
const inlineRightPanelOwnsTitleBar = rightPanelOpen && !shouldUsePlanSidebarSheet;
998
const [threadPanelPopoverHandle] = useState(PopoverCreateHandle);
@@ -3757,7 +3759,13 @@ export default function ChatView(props: ChatViewProps) {
3759
maximized={rightPanelMaximized}
3760
layoutControls={
3761
rightPanelOpen ? (
3760
- <div className="mr-px flex items-center">{panelToggleControls}</div>
3762
+ <div className="mr-px flex items-center gap-1">
3763
+ <RightPanelMaximizeControl
3764
+ maximized={rightPanelMaximized}
3765
+ onToggle={toggleRightPanelMaximizedStable}
3766
+ />
3767
+ {panelToggleControls}
3768
+ </div>
3769
) : null
3770
}
3771
surfaces={renderedRightPanelSurfaces}